Application Development and Automation 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: 
Read only

REG Function Module

Former Member
0 Likes
446

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

3 REPLIES 3
Read only

Former Member
0 Likes
423

can you please paste the code here?

Read only

Former Member
0 Likes
423

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.

Read only

Former Member
0 Likes
423

i think u have to take one variable after the FM to store the sum once. after the loop , FM variable should be updated.