‎2008 Jun 10 5:53 PM
Hi,
I am new to abap. So can any body explain me the below code
data: t_datapak_2000 type standard table of data_package_structure,
t_datapak_2001 type standard table of data_package_structure.
data: s_datapak type data_package_structure.
loop at DATA_PACKAGE into s_datapak.
Thanks
‎2008 Jun 10 5:58 PM
Is that the code? O_o
data: t_datapak_2000 type standard table of data_package_structure,
"declare a table of structure data_package_structure
t_datapak_2001 type standard table of data_package_structure.
"declare another table with the same structure
data: s_datapak type data_package_structure.
"declase an structure, the same of the above tables
loop at DATA_PACKAGE into s_datapak.
"begins to loop at the contents of table data_package, the into adition is because every line of the table will go into this structure
"so you can use the data in each line, this is known as a work area
‎2008 Jun 10 5:58 PM
Is that the code? O_o
data: t_datapak_2000 type standard table of data_package_structure,
"declare a table of structure data_package_structure
t_datapak_2001 type standard table of data_package_structure.
"declare another table with the same structure
data: s_datapak type data_package_structure.
"declase an structure, the same of the above tables
loop at DATA_PACKAGE into s_datapak.
"begins to loop at the contents of table data_package, the into adition is because every line of the table will go into this structure
"so you can use the data in each line, this is known as a work area
‎2008 Jun 10 5:58 PM
data: t_datapak_2000 type standard table of data_package_structure,
t_datapak_2001 type standard table of data_package_structure.
you are creating two internal tables like the structure data_package_structure
data: s_datapak type data_package_structure.
you are creating a work area like the structure data_package_structure
loop at DATA_PACKAGE into s_datapak.
You are passing the header line of the internal table DATA_PACKAGE to the work area s_datapak
‎2008 Jun 10 5:58 PM
Hi Amrutha,
This code is creating two internal tables t_datapak_2000 and t_datapak_2001 of type data_package_structure with out header lines.
s_datapak is a structure of type data_package_structure which can be used to as work area when working around about created internal tables.
Looping the internal table DATA_PACKAGE by moving work area into s_datapak for each iteration.
Thanks,
Vinay
‎2008 Jun 10 5:59 PM
hi,
data: t_datapak_2000 type standard table of data_package_structure,
"---> Internal table declaration of type data_package_structure
t_datapak_2001 type standard table of data_package_structure.
"---> Internal table declaration of type data_package_structure
data: s_datapak type data_package_structure.
"---> Work area declaration of type data_package_structure