Why do internal tables have a header line AND a body?
Continue Reading This Article
Enjoy this article as well as all of our content, including E-Guides, news, tips and more.
In order to process a record from an internal table you have to place it into a work area, which is a structure with the same structure as the table. With header tables, this work area is defined for free - it also means that various operations do not require the work area to be explicitly defined. The problem is that this can cause ambiguity. FREE ITAB. works differently from FREE ITAB[]. The former empties the work area, the latter empties the table. For this reason, SAP recommends not using header tables, but define the work area explicitly. E.g. for table ITAB, define work area W_ITAB. However, ranges and select options and function module table parameters still use header tables.
Dig Deeper on SAP workflow development
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.
Meet all of our SAP administration / development experts
View all SAP administration / development questions and answers
Start the conversation
0 comments