2013 Feb 20 5:58 AM
Hi All,
My internal table is having 6 fields among them 4 fields are filled with some values and i need to fill the other 2 fields using filled fields.
so i am looping the internal table into work area and filling the remaining 2 fields using 'MODIFY' and Sy-TABIX commond.
when i execute in debugging mode the empty 2 fields are filling in to the corresponding row properly, but when i loop the internal table after filling all empty fields of each row, the values are getting interchanged.
i used MODIFY itab from WA index sy-tabix.
i am not getting a clue why the calculated values are getting inter changed??????????? plz suggest
Thanks,
Harish
2013 Feb 20 6:03 AM
Hi Harish,
It will be better to understand the problem if you paste your code snippet here.
Regards,
Santanu Mohapatra.
2013 Feb 20 6:10 AM
hi harish,
while looping your internal table itself you do one thing,
data : int type i.
loop at itab into wa.
int = sy-tabix.
do the changes
and
modify itab from wa index int.
try this will work
hope it helps,
Vinoth
2013 Feb 20 6:28 AM
Hi Harish,
Why don't you use a field-symbol? Then, you won't have to use the MODIFY statement at all.
LOOP AT itab ASSIGNING <field-symbol>
2013 Feb 20 6:48 AM
Hi Harish,
Please try to add keyword TRANSPORTING on the MODIFY command.
MODIFY itab from WA index sy-tabix TRANSPORTING field1 field2.
And make sure the MODIFY command is executed inside the loop.
Regards,
Oki