07-12-2007 9:17 AM
pls tell me how can we modify data in internal table.pls send it usefull.
07-12-2007 9:26 AM
hI,
plz go through the below links..
http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb35de358411d1829f0000e829fbfe/content.htm
Regards,
Nagaraj
07-12-2007 9:20 AM
07-12-2007 9:23 AM
Hi,
Suppose you have internal table ITAB.
FIELD-SYMBOLS: <record> like line of ITAB.
LOOP AT ITAB ASSIGNING <record>.
<record>-field1 = (Change it here).
ENDLOOP.
or
READ TALE ITAB ASSIGNING <record> INDEX or WITH KEY...
change <record>.
Regards,
Sesh
07-12-2007 9:24 AM
Hi,
If u want to modify few fields use
Modify transporting <field1> <field2>....
Regards,
07-12-2007 9:24 AM
hi,
try like this
itab is a internal table with header line.
if itab is not initial
loop at itab.
read table itab with index sy-tabix.
itab-fld1 = 'new value'.
itab-fld2 = 'new value'.
...................
..........
modify itab.
endloop.
else
write:/10 'no data in internal table'.
endif.
this will modify all records in internal table. but if u want only for one record write READ TABLE statement outside of the loop and modify that record . while reading u can do in two ways
1. using INDEX
2. using KEY FILEDS
IF HELPFUL RREWARD SOME POINTS.
with regards,
Suresh.A
07-12-2007 9:26 AM
hI,
plz go through the below links..
http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb35de358411d1829f0000e829fbfe/content.htm
Regards,
Nagaraj
07-12-2007 9:29 AM
LOOP AT it_tab.
it_tab-field3 = it_tab-field1 + it_tab-field2.
<b> MODIFY it_tab INDEX sy-tabix.</b>
ENDLOOP.
CLEAR it_tab.