Search This Blog

Monday, January 18, 2021

Internal tables with/without header line

Internal tables with/without header line


Without Header LIne :  If  we want to use any explicit work area then its better to go for an internal table without                                             header line.

DATA BEGIN OF it_lfa1 OCCURS 0,
         lifnr LIKE lfa1-lifnr,  " customer
         name1 LIKE lfa1-name1,  " customer name
         ort01 LIKE lfa1-ort01,  " city
       END OF it_lfa1.

DATA t_lfa1 TYPE TABLE OF lfa1,
       w_lfa1 TYPE lfa1.


With Header LIne :  If we don't want to use any explicit work area then its better to go for an internal table  with                                            header line.

DATA BEGIN OF it_lfa1 OCCURS 0,
         lifnr LIKE lfa1-lifnr,  " customer
         name1 LIKE lfa1-name1,  " customer name
         ort01 LIKE lfa1-ort01,  " city
       END OF it_lfa1.

DATA t_lfa1 TYPE TABLE OF lfa1 WITH HEADER LINE.



It is advisable not to use header lines. Moroever with 710 releases ABAP 3.0,this will give you a syntax error as this is not supported in ABAP Object Oriented Programming. 

No comments:

Post a Comment

Pages