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 Issue...

Former Member
0 Likes
488

Hi Friends,

I m doing OOPs based ALV using classes.

I want subtotal of my line item(at customer level) but i don't want grand total line that comes at the end of report.

When i use class <b>cl_salv_aggregations</b> to get subtotal, i am also getting grand total line.

Please tell me how can i get <b>only subtotal and NO grand total line</b> ..

Thanks

Hi Friends,

I m doing OOPs based ALV using classes.

I want subtotal of my line item(at customer level) but i don't want grand total line that comes at the end of report.

When i use class <b>cl_salv_aggregations</b> to get subtotal, i am also getting grand total line.

Please tell me how can i get <b>only subtotal and NO grand total line</b> ..

Thanks

2 REPLIES 2
Read only

Former Member
0 Likes
466

Try to set the attribute NO_TOTLINE = 'X' in the ALV grid layout structure LVC_S_LAYO.

Regards,

Rao A

Read only

Former Member
0 Likes
466

Hi,

guess this will help.

For subtotal,

TYPE-POOLS: SLIS.

DATA: GS_SORT TYPE SLIS_SORTINFO_ALV.

CLEAR GS_SORT.

GS_SORT-FIELDNAME = 'FIELD1'.

GS_SORT-SPOS = 1. “ Sort first on column FIELD1.

GS_SORT-UP = 'X'.“ Ascending order.

GS_SORT-SUBTOT = 'X'.“ Display sub-total at change of

“ FIELD1.

APPEND GS_SORT TO GT_SORT.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

is_layout = ls_layout

it_fieldcat = lt_fieldcat

it_sort = gt_sort

TABLES

t_outtab = gt_vbak.

ENDFORM. " F_DISPLAY_DATA

Regards,

Rama Murthy.P