hello all,
our requirement is we are generating an ALV report to show PM Orders whose total actual quantity is equal to total withdrawn quantity...
i.e it should not display records like below,
RSNUM material BDMNG SHKZG ENMNG
-------------------------------------------------------------------------------------
800268591 ***** 3 H 3
800268591 **** 3 S 0
800268591 *** 3 H 0
800268591 ***** 3 S 3
where as the report should show only records like below...
RSNUM material BDMNG SHKZG ENMNG
-------------------------------------------------------------------------------------
8000208770 MTE30001 50 H 50
8000208770 MTE30001 50 S 50
8000208770 MTO10020 20 H 20
8000208770 MTO10020 20 S 20.
i.e each material wise i should check this ,
my code is like below
****************************************************************************************
loop at it_resb INTO wa_resb.
if wa_resb-shkzg eq'H'.
lv_bdmng1 = lv_bdmng1 + wa_resb-bdmng.
lv_enmng1 = lv_enmng1 + wa_resb-enmng.
ELSEIF wa_resb-shkzg eq'S'.
lv_enmng2 = lv_enmng2 + wa_resb-enmng.
lv_bdmng2 = lv_bdmng2 + wa_resb-bdmng.
endif.
endloop.
if lv_bdmng1 eq lv_bdmng2 AND lv_enmng1 eq lv_enmng2.
if lv_enmng1 ne0and lv_enmng2 ne0.
APPEND LINESOF it_resb to it_resb1.
endif.
endif.
endif.
endloop.
****************************************************************************************