Hi Frds,
In the print program,
i got the material totals variable is gv_bdmng.
each line time material is gv_bdmng1.
Based on above i did a subtotal and need to display through these variable gv_bdmng2
Script Subtotal calculation not working
DATA:lv_qn TYPE p DECIMALS 3 VALUE 0.
LOOP AT gt_resb INTO gw_resb WHERE matnr = resbd-matnr AND werks = resbd-werks.
ON CHANGE OF index_tab-matnr.
lv_qn = ( gv_bdmng1 / gv_bdmng ) * 100.
ENDON.
ENDLOOP.
gv_bdmng2 = lv_qn.
CLEAR : lv_qn.
Pls help me out