‎2007 Jan 24 8:27 AM
‎2007 Jan 24 8:29 AM
‎2007 Jan 24 8:29 AM
1. Add one more field to ur final internal table
data : begin of itab occurs 0,
seq_no like sy-tabix,
........
end of itab.
2. loop at itab into wa_itab.
itab-seq_no = sy-tabix.
modify itab from wa_itab.
endloop.
‎2007 Jan 24 8:37 AM
‎2007 Jan 24 8:31 AM
data : begin of itab occurs 0,
slno type i,
colma(5) typec,
colmb(5) type c,
end of itab.
after fetching all the data in itab.
loop at itab.
itab-slno = sy-tabix.
modify itab.
endloop.
now your itab sl no contains 1 a b, 2 b c like that.
ifyou want to write that.
after fetching all the data in your itab
loop at itab.
write : / sy-tabix, itab-colma,itab-colmb.
endloop.
here you dont need to declare the slno in itab.
regards
shiba dutta
‎2007 Jan 24 8:34 AM
Hi khan,
<b>check this code</b>
data : begin of itab occurs 0,
sno like sy-tabix,
vbeln like likp-vbeln,
netwr like likp-netwr,
end of itab.
itab-vbeln = '0005002035'.
itab-netwr = '5.78'.
append itab.
clear itab.
itab-vbeln = '0005002035'.
itab-netwr = '-3.25'.
append itab.
clear itab.
itab-vbeln = '0005002035'.
itab-netwr = '-8.47'.
append itab.
clear itab.
itab-vbeln = '0005002035'.
itab-netwr = '1.98'.
append itab.
clear itab.
loop at itab.
itab-sno = sy-tabix.
modify itab index sy-tabix.
endloop.
loop at itab.
write : / itab-sno , itab-vbeln , itab-netwr .
endloop.
‎2007 Jan 24 8:39 AM
loop at itab.
itab-sqno = sy-tabix.
modify itab index sy-tabix.
endloop.