2007 Feb 06 9:18 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 9:20 AM
Hi Sathish,
ABAP Objects does not support Header Lines.
Here's an excerpt stating the reason:
Tables with header lines not allowed
Only tables without header lines can be declared in ABAP Objects.
Error message in ABAP Objects if the following syntax is used:
DATA itab TYPE LIKE TABLE OF ... WITH HEADER LINE.
Correct syntax:
DATA: itab TYPE LIKE TABLE OF ... ,
wa LIKE LINE OF itab.
<b>Reason:
It depends on the statement whether the body or header line of a table is accessed. The table name should identify the table uniquely. Programs are easier to read. Tables with header lines do not improve performance.</b>
Note:
When calling external procedures (subroutines and function modules), which contain TABLES parameters in their parameter interface, please note that a TABLES parameter always requires a header line in addition to a table body. When a table without header line is transferred, the header line of the TABLES parameter retains its initial value. When calling such procedures in methods, you have to check whether transfer of the header line is expected in the procedure and evaluated there. You may have to adjust or rewrite the procedure. Method interfaces do not have TABLES parameters.
2007 Feb 06 9:20 AM
Hi Sathish,
ABAP Objects does not support Header Lines.
Here's an excerpt stating the reason:
Tables with header lines not allowed
Only tables without header lines can be declared in ABAP Objects.
Error message in ABAP Objects if the following syntax is used:
DATA itab TYPE LIKE TABLE OF ... WITH HEADER LINE.
Correct syntax:
DATA: itab TYPE LIKE TABLE OF ... ,
wa LIKE LINE OF itab.
<b>Reason:
It depends on the statement whether the body or header line of a table is accessed. The table name should identify the table uniquely. Programs are easier to read. Tables with header lines do not improve performance.</b>
Note:
When calling external procedures (subroutines and function modules), which contain TABLES parameters in their parameter interface, please note that a TABLES parameter always requires a header line in addition to a table body. When a table without header line is transferred, the header line of the TABLES parameter retains its initial value. When calling such procedures in methods, you have to check whether transfer of the header line is expected in the procedure and evaluated there. You may have to adjust or rewrite the procedure. Method interfaces do not have TABLES parameters.
2007 Feb 06 10:43 AM
Hi ,
Abap Objects doesn't support header lines you have create a table type for declaring a table or using standard table keyword .
You require wa to be declared separately .
Please reward if useful.