04-11-2017 10:27 AM
Hi,
In abap 7.40/7.50, is there an easier way to loop through an itab and change data than this example?
Didn't find a way to use gt_data = VALUE #( ... )
* Get mara
Select *
from mara
into table @data(lt_mara).
* Reconcile
Loop at gt_data assigning field-symbol(<ls_data>).
<ls_data>-bismt = lt_mara[ matnr = <ls_data-matnr ]-bismt.
Endloop.
04-11-2017 10:58 AM
Looks easy enough to me... You can probably do it use a table comprehension.
04-11-2017 1:42 PM
You can only try to join mara in query where you fill gt_data if it possible.
Or do you want some magic command to move corresponding fields by key?
04-18-2017 8:03 AM
Yep, it was the magic I was looking for 😉 But if it's not invented yet, the loop works 🙂 Thanks!