We are a new SAP site developing ABAP coding standards for the first time. Those of us who have attended SAP training...
were told to avoid using internal tables with header lines. Online documentation also suggests avoiding header lines to avoid confusion (and in some cases - tables in structures, you CAN'T use header lines.) Our consultant insists that we should use header lines as a standard because they are more efficient. What do you think?
I don't think it makes very much difference - I've never heard of efficiency issues regarding header lines. I would question your consultant on exactly what is meant. I can't imagine a program having its performance issues solved by using tables with headers!
Following SAPs advice will prevent confusion as to whether the object being address is the whole table, or just the work area, which may help in maintenance and support. However, much of standard SAP using tables with headers. Also, RANGES and SELECT-OPTIONS have headers by default.
This being the case, I would not include a statement on the use of tables with headers in your coding standards, as whichever you chose, you would have exceptions.
Dig Deeper on SAP ABAP
Related Q&A from Matthew Billingham
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 information on how to change the password on several SAP user accounts from a central location.continue reading
An SAP user needs to transfer customer purchase order spreadsheet data to SAP VA01 to create a new sales order.continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.