‎2006 Oct 31 7:46 AM
Hi all,
I am calling a FM in my report which calculates the sum of revenues of a material for a single customer.Now i have to do it for multiple customers(s_kunnr with no intervals) and get the output as sum of revenues for the 2 customers though i have looped the FM i am getting incorrect values wht shall i do.
regards
Ganesh
‎2006 Oct 31 7:52 AM
‎2006 Oct 31 7:56 AM
Ur code should look like below..if not there is an issue
loop at s_kunnr.
clear : variables.
call function 'calculate_value'
exporting
customer = s_kunnr-low
importing
revenue = ltot.
processing ltot.
Endloop.
‎2006 Oct 31 8:02 AM
i think u have to take one variable after the FM to store the sum once. after the loop , FM variable should be updated.