‎2009 Nov 09 10:02 AM
Hi All Expert's.
i want to use SUM (Total Qty) for other calculation. i am do sum with foll code.
wa_fieldcat-row_pos = 1.
wa_fieldcat-col_pos = 5.
wa_fieldcat-tabname = 'ITAB'.
wa_fieldcat-fieldname = 'ORDER_QTY'.
wa_fieldcat-seltext_m = 'ORDER QTY'.
wa_fieldcat-outputlen = '9'.
wa_fieldcat-do_sum = 'X'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.(same Calculation for Delv qty, Order Qty, Total.)
Then i disp SUM when u run report. i wnt to use this total qty in other function like calculation of percentage.
My criiterica is.
TOTAL ORDER QTY / TOTAL Delivery qty * 100. ????
hw to put this code in ALV
Thanks
Bhavesh panchal
‎2009 Nov 09 11:07 AM
Dear ,
Writing a code Fucntionality In ALV is not seems to be possible .
Use this formula at the Final loop there might be any loop existing in the system where u can apply your formula .
And add one field and dislpay .
Rgds aryan
‎2009 Nov 09 11:25 AM
Hi,
Capturing the SUM field and using that in another calculation is not possible. Why dont you have another field with the name SUM. When you loop thru the internal table just keep on assing the values to the SUM field and later use this field for your calculation