2008 Nov 18 1:16 PM
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!!
2008 Nov 18 1:20 PM
2008 Nov 18 1:38 PM
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!!!
2008 Nov 18 1:39 PM
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.
2008 Nov 18 1:40 PM
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