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: 

REUSE_ALV_GRID_DISPLAY - Counter for subtotal

Former Member
0 Kudos

Hi ,

I am using REUSE_ALV_GRID_DISPLAY for my ALv output.

In that I am sub-totaling for quantity based on order type.

For eahc order type I want to display the number of orders against the subtotal.

Is there any property to be passed?.

Regards

Elini.P

2 REPLIES 2

Former Member
0 Kudos

Hi

You can insert a new colunm, its value is always 1, so when you do a subtotal the system'll sum this colunm and the result'll be orders number.

Max

former_member188685
Active Contributor
0 Kudos

you need to create the sort table for the order type.

*-Sales Document #

IT_SORT_DATA-SPOS = L_SPOS.

IT_SORT_DATA-FIELDNAME = 'VBELN'.

IT_SORT_DATA-TABNAME = 'IT_DISPLAY'.

IT_SORT_DATA-UP = 'X'.

it_sort-group = 'X'.

it_sort-subtot = 'X'.

APPEND IT_SORT_DATA.

CLEAR IT_SORT_DATA.

and then layout-subtotals_text = 'SUBTOTALS'

and pass this info to FM(layout,sort table along with fieldcat)

vijay