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: 

ALV

Former Member
0 Kudos
117

1) how to display icons in ALV ?

2) what is layout in ALV ?

3) how to display subtotal and grand total in ALV ?

1 ACCEPTED SOLUTION

Former Member
0 Kudos
91

Hi,

3) Create a new sort order for which you want to do the sub-total..

Check the following.

DATA: T_SORT TYPE SLIS_T_SORTINFO_ALV.

DATA: S_SORT TYPE SLIS_SORTINFO_ALV.

S_SORT-SPOS = '1'.

S_SORT-FIELDNAME = 'VBELN'. "Sales order #

S_SORT-UP = 'X'.

APPEND S_SORT TO T_SORT..

Then in the fieldcatalog internal table for the field you want to do the sum..set the DO_SUM field to 'X'..

Pass the sort internal table to the ALV..

Thanks,

Naren

1 REPLY 1

Former Member
0 Kudos
92

Hi,

3) Create a new sort order for which you want to do the sub-total..

Check the following.

DATA: T_SORT TYPE SLIS_T_SORTINFO_ALV.

DATA: S_SORT TYPE SLIS_SORTINFO_ALV.

S_SORT-SPOS = '1'.

S_SORT-FIELDNAME = 'VBELN'. "Sales order #

S_SORT-UP = 'X'.

APPEND S_SORT TO T_SORT..

Then in the fieldcatalog internal table for the field you want to do the sum..set the DO_SUM field to 'X'..

Pass the sort internal table to the ALV..

Thanks,

Naren