‎2008 May 05 8:47 AM
Hi All,
I have a small doubt in Internal table. Say I have an internal table itab[] with around 1000 entries in it. I want to set a particular field of the Internal table to the same value for all the 1000 entries in the internal table.
Apart from looping over the internal table is there any better way like modify all entries....and setting the field to a particular value or something like this.
Regards, Vinay
‎2008 May 05 8:49 AM
‎2008 May 05 8:50 AM
hi Vinay,
You can use MODIFY statement with where condition to achieve that ..
Regards,
Santosh
‎2008 May 05 8:55 AM
hi,
u can set the same value for a field, if it already has same values for all 1000 entries.
u can do that using
itab_wa-field1 = 'abc'.
MODIFY itab FROM itab_wa
TRANSPORTING field1 WHERE field1 = 'xyz'.
otherwise it is not possible to change all the values of a particualr field. u have to loop through and change
regards,
madhumitha