03-09-2007 1:03 PM
Hi Gurus/Experts
I am doing the alv report and my requirement is as follows:
Net Value | Sales Unit
10 | pc
10 | pc
20 | kg
5 | kg
15 | gm
At the end of the report it has to be displayed as :
60 | and
20 | pc
25 | kg
15 | gm
means it has to be display the grand total and sales unit wise totals.
Please let me know the procedure .
It's little bit urgent.
Points definetely given for correct and helpful answers.
Please understand the requirement first and give the appropiate answers only.
Thanks in advance.
Regards,
Kumar
03-09-2007 1:13 PM
hi
sort by sales unit and then enable the subtotals option
chk this example
wa_sortinfo-fieldname = 'Sales_unit'.
wa_sortinfo-tabname = 'I_OUTPUT'.
wa_sortinfo-spos = 1. " First sort by this field.
wa_sortinfo-up = 'X'. " Ascending
wa_sortinfo-subtot = 'X'. " Subtotal at Name1
APPEND wa_sortinfo TO i_sortcat.
regards,
madhu
03-09-2007 1:13 PM
hi
sort by sales unit and then enable the subtotals option
chk this example
wa_sortinfo-fieldname = 'Sales_unit'.
wa_sortinfo-tabname = 'I_OUTPUT'.
wa_sortinfo-spos = 1. " First sort by this field.
wa_sortinfo-up = 'X'. " Ascending
wa_sortinfo-subtot = 'X'. " Subtotal at Name1
APPEND wa_sortinfo TO i_sortcat.
regards,
madhu
03-09-2007 1:16 PM
set qfieldname and qtabname in fcat
data : begin of itab occurs 0,
menge like mseg-menge,
meins like mara-meins,
end of itab.
***************************
if fcat-fieldname = 'MENGE'.
fcat-qfieldname = 'MEINS'.
fcat-qtabname = 'ITAB'.
fcat-do_sum = 'X'.
modify fcat.
endif.
Message was edited by:
Mustafa SADIK
03-09-2007 1:19 PM
hi Sreeram,
This code give you an idea as how to proceed ...
[code]* Populating Event Names
t_event-name = slis_ev_end_of_list.
t_event-form = 'END_OF_LIST'.
APPEND t_event TO it_event.
----
FORM END_OF_LIST *
----
........ *
----
FORM end_of_list.
For Detail Report
< write the relevant logic here for the summary .. this comes at the end of your report >
ENDFORM.[/code]
03-14-2007 12:20 PM