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

command for summation in th report

Former Member
0 Likes
715

Hi All.

my issue is regarding the report.

the report that i am working with is the display with the colour display and not using any functional module like the list/grid display.Only write and get statements are used herein.

Now my question is after this display i wish to display the consolidated view and summing the fields together to give summed value in the view.

Say,e.g,for one customer there are diffrent company codes,descrition,pay terms,amount,interest charges etc are attached and my requireement is to display them after summing it.i.e for one cusotmer it will add the amount(fields that can b summed and descrition is alomst same in all cases) and will display.i have heard that there is just few lines of code and no function module required.

kindly suggest if you have idea as there exist some code for summing automatically.

thanks!!

Hi All.

my issue is regarding the report.

the report that i am working with is the display with the colour display and not using any functional module like the list/grid display.Only write and get statements are used herein.

Now my question is after this display i wish to display the consolidated view and summing the fields together to give summed value in the view.

Say,e.g,for one customer there are diffrent company codes,descrition,pay terms,amount,interest charges etc are attached and my requireement is to display them after summing it.i.e for one cusotmer it will add the amount(fields that can b summed and descrition is alomst same in all cases) and will display.i have heard that there is just few lines of code and no function module required.

kindly suggest if you have idea as there exist some code for summing automatically.

thanks!!

4 REPLIES 4
Read only

former_member203501
Active Contributor
Read only

0 Likes
690

THANKS!

but still the question is there is command,once i will put ....the report will automatically do the sumation and give out the output!notihng to be done logic as such

see if you help me out!!!

Read only

0 Likes
690

hi do like this ..

report .

tables:pa0008.

data: begin of itab occurs 0 ,

pernr like pa0008-pernr,

ansal like pa0008-ansal,

bet01 like pa0008-bet01 ,

end of itab .

data: v_sum type pa0008-bet01 .

select-options:s_pernr for pa0008-pernr .

start-of-selection .

select pernr

ansal

bet01

from pa0008

into table itab

where pernr in s_pernr .

loop at itab .

v_sum = v_sum + itab-bet01.

at end of pernr .

write:/ itab-pernr ,

itab-ansal,

v_sum.

endat .

endloop.

Read only

Former Member
0 Likes
690

hi tanisha ,

can u send tht piece of code which is requred for calculation of amounts for particulra customer,

actuallly it is simple by using some control break statements and using syntax like

SUM.

try also to use aggregate functiions in select quries