Problem solve Get help with specific problems with your technologies, process and projects.

Why do internal tables have a header line AND a body?

What is the idea behind internal tables having a header line and a body? Wouldn't having an internal table the same way as any other table suffice?
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.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.