2024 Dec 16 8:43 AM - edited 2024 Dec 16 8:48 AM
Hello friends, One of my program I created one custom button using toolbar function. So based on the selection records I want to process BAPI FM. For that I'm trying to learn code using 7.4 syntax.
LOOP AT lt_selected_rows INTO ls_selected_line.
lv_index = ls_selected_line-index.
READ TABLE gt_mara INDEX lv_index INTO ls_mara.
PERFORM BAPI.
ENDLOOP.
how to convert this code in ABAP 7.4
Your answer will be more helpful for my learning journey.
2024 Dec 16 8:58 AM
LOOP AT lt_selected_rows INTO DATA(ls_selected_line).
DATA(lv_index) = ls_selected_line-index.
DATA(ls_mara) = gt_mara[ lv_index ].
"PERFORM BAPI.
call_bapi( ).
ENDLOOP.
2024 Dec 16 12:25 PM
2024 Dec 16 11:36 AM
In fact, the only obsolete part in your code is PERFORM (obsolete since 2010), the rest of your code is perfectly valid. You should use ABAP Objects (method instead of subroutine).
Anyway, rewriting that code is just a waste of time, except just exercising.
2024 Dec 16 12:25 PM