‎2007 Feb 06 8:45 AM
Hello Friends,
Is ABAP Objects (Object Oriented) Supports Header Lines? If not, why Abap Objects doesn't Support?
Thanks & Regards
Sathish Kumar
‎2007 Feb 06 8:46 AM
Hi,
ABAP objects does not support HEADER LINE. you will get syntax error if your use OCCURS or WITH HEADER LINE in any class methods.
ABAP objects concept was brought to proivde strict type checkings. ABAP objects is a relatively new concept. even in normal ABAP program HEADER LINE is obsolete.
Use of tables with header line might lead to some coding error specially when maintaining.
If you use CLEAR itab, it clears the work area may be you intend to clear the table.
to clear the table you have to use CLEAR itab[]. This syntax is not advised and error prone so it is not allowed in ABAP objects. Its allowed in ABAP to be consistant with old programs which still use header line.
Regards,
Sesh
Message was edited by:
Seshatalpasai Madala
‎2007 Feb 06 8:46 AM
Hi,
ABAP objects does not support HEADER LINE. you will get syntax error if your use OCCURS or WITH HEADER LINE in any class methods.
ABAP objects concept was brought to proivde strict type checkings. ABAP objects is a relatively new concept. even in normal ABAP program HEADER LINE is obsolete.
Use of tables with header line might lead to some coding error specially when maintaining.
If you use CLEAR itab, it clears the work area may be you intend to clear the table.
to clear the table you have to use CLEAR itab[]. This syntax is not advised and error prone so it is not allowed in ABAP objects. Its allowed in ABAP to be consistant with old programs which still use header line.
Regards,
Sesh
Message was edited by:
Seshatalpasai Madala
‎2007 Feb 06 4:40 PM
Hi Sathish,
No, ABAP objects dont support header lines.
Header lines are normally confusing since you use the same name to refer to the work area and the internal table. The readability of a code is somewhat lost, since you dont understand if it means a header line or the table itself.
SAP has made header lines ir-releavant in OO first. You will see this restriction in newer releases of SAP as well.
hope this answers ur question. Reward points if it does
Rgds,
Prashanth.
SAP.