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
Related Q&A from Matthew Billingham
An SAP user needs information on how to change the password on several SAP user accounts from a central location. Continue Reading
An SAP user is trying to run a report in an SAP ALV Grid online and wants to know how to get the data in the report to appear along with the header. Continue Reading
An SAP user needs to transfer customer purchase order spreadsheet data to SAP VA01 to create a new sales order. Continue Reading