10-11-2007 8:57 AM
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
10-11-2007 9:06 AM
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.
10-11-2007 9:04 AM
Sorry but your question is not clear..could you please detail on what exactly u want?
10-11-2007 9:06 AM
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.
10-11-2007 9:06 AM
Hi,
I don't think there is any other way than LOOP AT... MODIFY. ENDLOOP.
Regards, Joerg