‎2007 Jul 09 8:54 AM
Hi all,
i need to modify internal table from a value which is stored in a field symbol.how can i do this.
Thanks in advance.
Swati Garg
‎2007 Jul 09 9:01 AM
Hi,
You can read that record which you want to modify using
READ TABLE itab ASSIGNING <fs_symbol1> WITH KEY field1 = <fs_symbol>.
Then change the values in <fs_symbol1> the internal table is modifed.
You need not use MODIFY statement as you are taking the record into a field symbol ans changing it directly.
Regards,
Ses
‎2007 Jul 09 8:57 AM
Hi try this one...
report zrich_0006.
data: begin of rt occurs 0,
lgart(4) type c,
value type i,
end of rt.
data: begin of intab occurs 0,
1000 type i,
2000 type i,
3000 type i,
end of intab.
field-symbols: <fs_wa> type i.
rt-lgart = '1000'.
rt-value = 123.
append rt.
rt-lgart = '2000'.
rt-value = 456.
append rt.
rt-lgart = '3000'.
rt-value = 789.
append rt.
loop at rt.
assign component rt-lgart
of structure intab to <fs_wa>.
<fs_wa> = rt-value.
at last.
append intab.
endat.
endloop.
‎2007 Jul 09 9:01 AM
Hi,
You can read that record which you want to modify using
READ TABLE itab ASSIGNING <fs_symbol1> WITH KEY field1 = <fs_symbol>.
Then change the values in <fs_symbol1> the internal table is modifed.
You need not use MODIFY statement as you are taking the record into a field symbol ans changing it directly.
Regards,
Ses
‎2007 Jul 09 9:02 AM
Hi,
go through this link...
http://72.14.203.104/search?q=cache:PW0nTfKGW78J:www.sap-img.com/ab030.htmDYNAMICINTERNALTABLEABAP+&hl=en&gl=in&ct=clnk&cd=1
http://www.kabai.com/abaps/z53.htm
<b>Reward points</b>
Regards