09-30-2005 4:34 PM
dear frnds,
I have an itab1 with records in it. i want to transfer all the records of itab1 to itab2. then the itab1 is refreshed and it gets second set of records. i want to append this to itab2 again.
any neat and optimal soln. for this ?
regrds madan.
09-30-2005 4:36 PM
Hi Madan
append lines of ITAB1 TO ITAB2.
REFRESH ITAB1.
--->FILL ITAB1
append lines of ITAB1 TO ITAB2.
REFRESH ITAB1.
Max
09-30-2005 4:36 PM
Hi Madan
append lines of ITAB1 TO ITAB2.
REFRESH ITAB1.
--->FILL ITAB1
append lines of ITAB1 TO ITAB2.
REFRESH ITAB1.
Max
09-30-2005 4:48 PM
dear max..
itz working fine.
but one draw back. i want atleast one blank line to be inserted if there is no records in the itab1 and still im appending it.
is it possible????
i gave u 6 pts for ur 1st reply :)- .
madan
09-30-2005 4:53 PM
Hi
If ITAB1[] IS INITIAL.
APPEND INITIAL LINE TO ITAB2.
ELSE.
APPEND LINES OF ITAB1 TO ITAB2.
ENDIF.
Max
09-30-2005 4:59 PM
09-30-2005 4:43 PM
Hi,
I believe itab1 and itab2 have the same structure in
your case.
First time just write
<b>itab2[] = itab1[].</b>
This will copy the entire contents from itab2 to itab1.
Then in the second time write
<b> Append lines of itab1 to itab2</b>
<b>OR</b> <b>
DATA : wa_itab1 like line of itab1.
LOOP AT itab1 into wa_itab1
append wa_itab1 to itab2.
clear wa_itab1.
ENDLOOP.</b>
Note : Place the above code whereever you want to append from itab1 to itab2.
This will solve your problem.
Please reward points if this explanation is useful.
Regards,
Siva
Message was edited by: Sivakumar Muthusamy