Skip to Content

Loop thorugh and change data in ABAp 7.40/7.50

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.


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Apr 11, 2017 at 12: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?

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 18, 2017 at 07:03 AM

    Yep, it was the magic I was looking for ;) But if it's not invented yet, the loop works :) Thanks!

    Add comment
    10|10000 characters needed characters exceeded