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

Updating Internal table

Former Member
0 Likes
730

Hi,

I have a Internal table in which there is field emplty for every record.

I have update this field in internal table in run time , and the field value is the same in every record.

Is there any method to update without looping through the internal table.

for example



table:

A   B   C  D

1   2   3
1   2   3
1   2   3


in run time I found the value of D as 4

and I have to update as

A   B   C  D

1   2   3    4
1   2   3    4
1   2   3    4


without looping... is it possible

Regards

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
701

Try this :

MODIFY itab [FROM wa] TRANSPORTING f1 ... fn WHERE cond. 

regards,

Advait

Edited by: Advait Gode on Apr 9, 2009 10:31 AM

Hi,

I have a Internal table in which there is field emplty for every record.

I have update this field in internal table in run time , and the field value is the same in every record.

Is there any method to update without looping through the internal table.

for example



table:

A   B   C  D

1   2   3
1   2   3
1   2   3


in run time I found the value of D as 4

and I have to update as

A   B   C  D

1   2   3    4
1   2   3    4
1   2   3    4


without looping... is it possible

Regards

4 REPLIES 4
Read only

Former Member
0 Likes
702

Try this :

MODIFY itab [FROM wa] TRANSPORTING f1 ... fn WHERE cond. 

regards,

Advait

Edited by: Advait Gode on Apr 9, 2009 10:31 AM

Read only

Former Member
0 Likes
701

try below

wa_tab-d = '4'.

modify itab from wa_tab  transporting D
                              where D is initial

it works

Read only

awin_prabhu
Active Contributor
0 Likes
701

wa-d = '4'.

MODIFY itab FROM wa TRANSPORTING d.

Read only

Former Member
0 Likes
701

Try using following statement :

say your initial internal table name is itab and at runtime you found value of d which is present in wa_itab.

So you can write :

MODIFY itab FROM wa_itab

TRANSPORTING d WHERE d is initial.

hope it helps

ashwani