Application Development 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: 

UPDATE Question

Former Member
0 Kudos

Hello experts,

Imagine that you have an internal table (iTable) already filled with your data, and you need to update one field to 'ABC'. That is every record inside iTable will have 'ABC' in that field.

In SQL, we can do something like UPDATE [TABLE] SET field='ABC' (WHERE <conditions>).

In this one we don't need no conditions because the iTable already has the right data, so all i need is to update the field.

How can i do this in one step, i mean without having to loop the iTable and UPDATE each record?

Maybe i got this question badly, but the loop will take longer than the simple update right?

Regards,

Jorge

1 ACCEPTED SOLUTION

Former Member
0 Kudos

t_data occurs 0,

matnr type matnr,

werks type werks,

st_data like line of t_data.

st_data-werks = 'STUFF'.

modify t_data from st_data transporting werks

where not matnr is initial.

3 REPLIES 3

abdulazeez12
Active Contributor
0 Kudos

Sorry but your question is not clear..could you please detail on what exactly u want?

Former Member
0 Kudos

t_data occurs 0,

matnr type matnr,

werks type werks,

st_data like line of t_data.

st_data-werks = 'STUFF'.

modify t_data from st_data transporting werks

where not matnr is initial.

Former Member
0 Kudos

Hi,

I don't think there is any other way than LOOP AT... MODIFY. ENDLOOP.

Regards, Joerg