‎2007 Feb 28 2:47 PM
‎2007 Feb 28 2:49 PM
http://help.sap.com/saphelp_470/helpdata//EN/fc/eb367a358411d1829f0000e829fbfe/frameset.htm
Message was edited by:
Jacek Slowikowski
‎2007 Feb 28 2:51 PM
Hi,
a) Data : itab like mara occurs 0 with header line.
b) Data: itab like mara occurs 0.
-While adding or retrieving records to / from internal table we have to keep the record temporarily.
-The area where this record is kept is called as work area for the internal table.
-The area must have the same structure as that of internal table. An internal table consists of a body and an optional header line.
-Header line is a implicit work area for the internal table. It depends on how the internal table is declared that the itab will have the header line or not.
Regards,
Ferry Lianto
‎2007 Feb 28 2:53 PM
Balu,
WITH HEADER LINE creates a field with the same name as the internal table and the same type as the line type of the internal table.
Meaning it creates a work area of the line type of the internal table..
Example
-
DATA: ITAB LIKE MARA WITH HEADER LINE.
**Now you can use ITAB as a structure also..
**meaning.
ITAB-MATNR = 'ABCD'.
IF ITAB-MATNR = 'ABCD'.
True
ENDIF.
If you don't give header line..then the workarea is not created..
Example
-
DATA: ITAB LIKE MARA OCCURS 0.
DATA: WA LIKE ITAB.
To access the data you have to create another workarea ..
READ TABLE ITAB INTO WA INDEX 1.
IF WA-MATNR = 'ABCD'.
...
ENDIF.
Regards.