‎2008 Aug 29 5:30 PM
Code#1
DATA: ITAB LIKE SPFLI.
With that code#1, we copy the table structure of spfli table (correct me if I am wrong or missing something with my statement).
Code#2
DATA: BEGIN ITAB,
C1 LIKE SPFLI-CARRID,
END OF ITAB.
With this code#2, does the C1 just copies the structure of the CARRID field of table SPFLI? That is my question.
pls help. thanks.
‎2008 Aug 29 5:34 PM
Greetings..
yes you are right, If you defined in a table with single field, C1 will have all attributes of field CARRID..
While in Code#1 it will have all fields for SPFLI. This can be used as work area.
hope this makes things clear..
thanks!!
ags..
‎2008 Aug 29 5:32 PM
‎2008 Aug 29 5:34 PM
Greetings..
yes you are right, If you defined in a table with single field, C1 will have all attributes of field CARRID..
While in Code#1 it will have all fields for SPFLI. This can be used as work area.
hope this makes things clear..
thanks!!
ags..
‎2008 Aug 29 5:35 PM
DATA: ITAB LIKE SPFLI.
This will only create a workarea in your program which has the same strucutre of the SPFLI.
So, you can populate the values by using its fields.
Like:
ITAB-CARRID = '1'.
DATA: BEGIN ITAB,
C1 LIKE SPFLI-CARRID,
END OF ITAB.
This will create a structure with only field C1 and that C1 has the same definition as the SPFLI-CARRID.
You can use ITAB-C1 to populat the contents.
ITAB-C1 = '1'.
Regards,
Naimesh Patel
‎2008 Aug 29 5:36 PM