‎2008 Dec 12 2:24 AM
Hi ,
I had a requirement in which i need to update internal table. I had one field in the internal table which will be blank, i need to update that field with some constant values.How can i do it?
To be a bit clearer for eg. i had one internal table with currency code field as empty. I need to pass the value 'SGD' to that field in the internal table.Please Help.
Thanks & Regards,
Arun.
‎2008 Dec 12 3:10 AM
Hi,
Try it.
Loop at itab into wa.
wa-currency = 'SGD'.
modify itab from wa transporting currency.
endloop.Regards,
Chris Gu
‎2008 Dec 12 2:32 AM
Hi Rajan,
As per my understanding of your question:
It would be simple enough if you move that constant value into the corresponding field of internal table and say.. modify transporting that wa into it.
ex:
wa_currency = SGD
modify it transporting wa.
would serve the purpose i think!!!
Regards,
BabuSrinath
‎2008 Dec 12 2:37 AM
DATA itab TYPE STANDARD TABLE OF tcurc WITH HEADER LINE.
data:wa LIKE LINE OF itab.
START-OF-SELECTION.
* Get data
SELECT * UP TO 100 ROWS
FROM
tcurc
INTO TABLE itab.
wa-isocd = 'CONSTANT'."Constant value
modify itab FROM wa TRANSPORTING isocd WHERE isocd = ' '."this will modify all entries of Itab where ISOCD is blank.
‎2008 Dec 12 3:10 AM
Hi,
Try it.
Loop at itab into wa.
wa-currency = 'SGD'.
modify itab from wa transporting currency.
endloop.Regards,
Chris Gu
‎2008 Dec 12 3:24 AM