2007 Mar 24 10:58 AM
I have two internal Tables ITAB and JTAB. I want to append 1st and 5 th rows of ITAB's to JTAB.....How could i do that....
Also using Modify statement I want to change only column of ITAB without changing other's data... How to acheive it.
2007 Mar 24 11:02 AM
declare one counter.
then use like
if counter = 1 or counter = 5.
do.
endif.
2007 Mar 24 11:03 AM
loop at itab.
if sy-tabix eq 1 or sy-tabix eq 5.
jtab = itab.
append jtab.
endif.
endloop.
2007 Mar 24 11:07 AM
First question : use the following syntax
APPEND LINES OF <itab1> [FROM <n1>] [TO <n 2>] TO <itab2>.
Second question :
MODIFY itab [FROM wa] TRANSPORTING f1 ... fn
Regards
2007 Mar 24 5:35 PM
Hi..,
<b>
To append only the 1st and 5th rows ....</b>
loop at itab into wa_itab.
if sy-tabix eq 1 or sy-tabix eq 5.
wa_jtab = wa_itab.
append wa_jtab to jtab.
clear wa_jtab.
endif.
endloop.
<b>
To append rows from 1 to 5..</b>
append lines of itab from 1 to 5 to jtab.
<b>To change onli some particular column values .. we have the option called TRANSPORTING</b>
wa_itab should contain the new values to be modified..
modify itab from wa_itab transporting <C1> <C2>...
reward points if helpful...
sai ramesh