‎2008 Jan 21 3:56 PM
how to modify a particular record of an internal table in runtime
‎2008 Jan 21 3:58 PM
‎2008 Jan 21 3:59 PM
HI,
You can do as below:
loop at itab.
if condition.
if sy-subrc eq 0.
"change the contents of itab-field.
modify itab.
clear itab.
endif.
endif.
endloop.
Thanks,
Sriram Ponna.
‎2008 Jan 21 4:07 PM
to modify a particular record of an internal table in runtime
should i use any additional extension with the modify statement ........ because i need to modify a particular record only not whole internal table..pls help
‎2008 Jan 21 4:12 PM
Hi kumar,
you can try this.
loop at itab into wa_itab.
if <check for condition in wa_itab>.
change the wa_itab.
modify itab from wa_itab.
endif.
endloop.
where wa_itab is the work area for itab.
Hope this helps.
cheers
~goldie
‎2008 Jan 21 4:14 PM
Hi Kumar, Please use modify with transporting option
ie. MODIFY scarr_tab INDEX idx FROM scarr_wa
TRANSPORTING currcode
This stmt will only modify currcode... So what ever field you want to modify specify them after transporting. please let me know if you still have a problem..
Regards,
Swaroop Patri