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

ALV SUBTOTAL.

Former Member
0 Likes
836

In ALV if you want only the subtotal to be displayed, and dont want the grand total to be displayed, how can it be done?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
806

Hi,

IT displays both subtotal and grand total ...

Regards,

Santosh

In ALV if you want only the subtotal to be displayed, and dont want the grand total to be displayed, how can it be done?

6 REPLIES 6
Read only

Former Member
0 Likes
806

Hi

You can't do it

Max

Read only

Former Member
0 Likes
806

Hi,

See the below Sample program for LIST:-

http://www.sap-basis-abap.com/sapalv.htm

See the below Sample program for Grid:

http://sap.niraj.tripod.com/id64.html

Regards

Sudheer

Read only

Former Member
0 Likes
807

Hi,

IT displays both subtotal and grand total ...

Regards,

Santosh

Read only

0 Likes
806

Hi,

Use the below code.

data:LAYOUT TYPE SLIS_LAYOUT_ALV,

<b>layout-no_totalline = 'X'</b>.

and pass this to ALV function module

IS_LAYOUT = LAYOUT

Read only

0 Likes
806

Thanks that worked.

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
806

Yes, it can be done. All you need to do is set a flag.




data: layout type SLIS_LAYOUT_ALV.

<b>layout-no_totalline = 'X'.</b>

* CALL ABAP LIST VIEWER (ALV)
  call function 'REUSE_ALV_GRID_DISPLAY'
       exporting
<b>            is_layout   = layout</b>
            it_fieldcat = fieldcat
       tables
            t_outtab    = imara.

Now when you subtotal, it will give only subtotals, the grand total will not show.

Regards,

Rich Heilman