‎2008 Nov 20 7:01 PM
Hi,
I have two internal tables defined as follows:
data: lt_1 like ztable occurs 0.
data: lt_2 like ztable occurs 0.
data: ls_1 like line of lt_1[].
data: low type i value '1',
hight type i value '20,000',
limit type i.
The logic in my program fills data into lt_1.
describe lt_1.
limit = sy-tfill.
Till high < limit I want to perform following:
APPEND rows from low to high in lt_1 to lt_2.
Then increment both low and high with the value of high.
low = low + high.
high = high + high.
I can read lt_1 into ls_1 and then copy fields from ls_1 to header line of lt_2 and then do append for lt_2.
But can this append be done directly without looping throught lt_1 and doing copy of fields.
Thanks,
CD
‎2008 Nov 20 7:13 PM
Check help on syntax APPEND specifially for the LINES OF jtab FROM idx1 TO idx2
You can use it like this:
APPEND LINES OF jtab FROM L_LOW TO L_HIGH TO ITAB.
Regards,
Naimesh Patel
‎2008 Nov 20 7:10 PM
‎2008 Nov 20 7:13 PM
Check help on syntax APPEND specifially for the LINES OF jtab FROM idx1 TO idx2
You can use it like this:
APPEND LINES OF jtab FROM L_LOW TO L_HIGH TO ITAB.
Regards,
Naimesh Patel