Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Internal table Updation

Former Member
0 Likes
653

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
613

Hi,

Try it.

Loop at itab into wa.
   wa-currency = 'SGD'.
   modify itab from wa transporting currency.
endloop.

Regards,

Chris Gu

4 REPLIES 4
Read only

Former Member
0 Likes
613

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

Read only

Former Member
0 Likes
613
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.
Read only

Former Member
0 Likes
614

Hi,

Try it.

Loop at itab into wa.
   wa-currency = 'SGD'.
   modify itab from wa transporting currency.
endloop.

Regards,

Chris Gu

Read only

0 Likes
613

Thanks all, ur answer solved my problem...........