Hello,
I have an internal table storing some of the customer's data and I want to append a column from another table which stores e-mail addresses. LIFNR is the common field between tables.
I have the function itself already working:
LOOP AT gt_email_addr INTO gwa_email_addr.
LOOP AT gt_main INTO gwa_main.
IF gwa_main-lifnr = gwa_email_addr-lifnr.
gwa_main-smtp_addr = gwa_email_addr-smtp_addr.
MODIFY gt_main FROM gwa_main.
ENDIF.
ENDLOOP.
ENDLOOP.
BUT I would prefer it to work as a FOR loop. At the moment I am trying something like this:
gt_main = VALUE #( BASE gt_main FOR wa IN gt_email_addr ( CORRESPONDING #( wa ) ) ).But it doesn't work - the line above actually just appends a new record to gt_main. The documentation seems to be very "tip-of-the-iceberg" about it and provides just some theory and all other sources explain how I can use such a loop to add literal values provided within the code instead and I can't find anything about moving data from one table to another in this way.