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

Work area vs. header lines for developing tables

Wondering about the difference between work areas and header lines in tables? Application development expert Matt Billingham advises a user who is developing tables.

What is the difference between a work area and a header line of an internal table?
Work areas are what you should be using for tables. Header lines are no longer in fashion (although they are still existing in FM parameters and ranges!).

A table with a header was simply a table with a built-in work area, with the same name as the table. So the ABAP code:

RANGES: r_myrng ...
...gives you an internal table, r_myrng, and a work area r_myrng. You only know from the context whether a specific instance of r_myrng is the table or the work area (= the header line).

Use seperately defined and differently named work areas.

For example, for the internal table T_MYDATA, use this work area:

DATA W_MYDATA TYPE LINE OF T_MYDATA

Dig Deeper on SAP ABAP

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchERP

SearchOracle

SearchDataManagement

SearchAWS

SearchBusinessAnalytics

SearchContentManagement

SearchHRSoftware

Close