Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Perform some calculations with nested loops using FOR iteration in new syntax of ABAP 7.4

former_member599006
Participant
0 Kudos

Could someone help with, How to keep adding values of nested table and main perform some calculation on main table with FOR iteration in new syntax of ABAP 7.4

Eg :

LOOP at lt_item INTO DATA(lw_item).

CLEAR LV_QUAN.

LOOP AT lt_schedule INTO DATA(lw_schedule)
WHERE doc_number = lw_item-doc_number
AND itm_number = lw_item-itm_number.
lv_quan = lv_quan + lw_schedule-confir_qty.
ENDLOOP.
IF sy-subrc EQ 0.
lw_output_i-qty_cancelled = lw_item-req_qty - lv_quan.
ENDIF.

ENDLOOP.

0 REPLIES 0