Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Is ABAP Objects support Header Lines?

Former Member
0 Likes
439

Hello Friends,

Is ABAP Objects (Object Oriented) Supports Header Lines? If not, why Abap Objects doesn't Support?

Thanks & Regards

Sathish Kumar

1 ACCEPTED SOLUTION
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
400

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

2 REPLIES 2
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
401

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

Read only

Former Member
0 Likes
400

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.