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.reports

Former Member
0 Likes
483

Hi experts,

iam doing one alv report in that report i want to do the like this

matnr kwmeng lfimg

m123 1086 30

m124 1086 30

m125 1086 15

m126 1086 20

i want to do the sum of lfimg. and at last it will be deduct from kwmeng. bal = 1086-95 as like this

rewards are helpful answers.

thanks& regards,

Narasimha Rao.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
458

Hi Narayanadas,

You might have stored the data in the internal table itab.

loop at itab.

at last.

sum.

g_lfmng = itab-lfmng.

endat.

endloop.

Now the summation value will be available in g_lfmng.

g_bal = itab-kwmeng - g_lfmng.

here g_lfmng, g_bal are global variable which you have to declare.

thanks & regards

Kishore Kumar Maram

3 REPLIES 3
Read only

Former Member
0 Likes
459

Hi Narayanadas,

You might have stored the data in the internal table itab.

loop at itab.

at last.

sum.

g_lfmng = itab-lfmng.

endat.

endloop.

Now the summation value will be available in g_lfmng.

g_bal = itab-kwmeng - g_lfmng.

here g_lfmng, g_bal are global variable which you have to declare.

thanks & regards

Kishore Kumar Maram

Read only

anub
Participant
0 Likes
458

Hi,

Is KWMENG a one time value... i mean in the example you have added LFIMG values and subtracted from single value of KWMENG. Pls be clear in this regard.

Regards,

Anu.

Read only

Former Member
0 Likes
458

hi check this..

for the sum at the end

wa_fieldcat-fieldname = 'MATNR'.

wa_fieldcat-reptext_ddic = 'Material description'.

wa_fieldcat-do_sum = 'X'.

append wa_fieldcat to it_fieldcat .

regards,

venkat