‎2007 Nov 17 11:27 AM
I selected some data from table and put into internal table.I want to change some fields by some calculations.I tried using read stmt.it fetches only one record.I need to change group of records(not in dbase.)in internal table.How to do this?
‎2007 Nov 17 11:41 AM
loop at itab.
*--change fields of record
itab-field1 = 'A'.
modify itab index sy-tabix.
endloop.
‎2007 Nov 17 11:43 AM
Hi Khanna,
You can do in this way... implement for your requirement...
Types: begin of ty_tab1,
a type i,
b type i,
c type i,
end of ty_tab1.
Data: itab1 type table of ty_tab1,
wa1 type ty_tab1.
wa1-a = 10.
wa1-b = 20.
append wa1 to itab1.
wa1-a = 15.
wa1-b = 25.
append wa1 to itab1.
loop at itab1 into wa1.
wa1-c = wa1-a + wa1-b.
modify itab1 from wa1 transporting c.
clear wa1.
endloop.Reward Points if this helps.
Satish
‎2007 Nov 17 11:54 AM
use EDITOR-CALL key
syntax is
EDITOR-CALL FOR ITAB TITLE 'editing of it'.
if it is helpful reward points
thanks
‎2007 Nov 17 4:20 PM
You can do it with LOOP statment.
LOOP AT ITAB INTO WA_ITAB WHERE FIELD = 'TEST'.
WA_ITAB-FIELD2 = 'TEST11'.
MODIFY ITAB FROM WA_ITAB.
ENDLOOP.Regards,
Naimesh Patel