Application Development 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: 

Regarding ALV Report

sreeramkumar_madisetty
Active Contributor
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

4 REPLIES 4

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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]

sreeramkumar_madisetty
Active Contributor
0 Kudos

solved