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: 

Selective Sub-total in ALV Hierarchical list display

former_member188001
Active Participant
0 Kudos

All,

I am using  REUSE_ALV_HIERSEQ_LIST_DISPLAY to display Header and Item. The requirement is to have subtotal only for one item for a specific contract type. Although, they want me to display price for all line items.

Is this possible?

Regards,

Salil

1 ACCEPTED SOLUTION

Former Member
0 Kudos

You need to sort a column for having a subtotal. Which column are you sorting? There could be a dirty work around.

Add a pseudo column that will distinguish the item you want to have a subtotal on from other items and you can have your subtotal.

So, for items you want to have subtotal on, will have pseudo_column = 1.

Rest items will have pseudo_column = 2, 3, 4, 5,6.... and so on.

But I will really not recommend this.

What is your exact requirement?

4 REPLIES 4

Former Member
0 Kudos

You need to sort a column for having a subtotal. Which column are you sorting? There could be a dirty work around.

Add a pseudo column that will distinguish the item you want to have a subtotal on from other items and you can have your subtotal.

So, for items you want to have subtotal on, will have pseudo_column = 1.

Rest items will have pseudo_column = 2, 3, 4, 5,6.... and so on.

But I will really not recommend this.

What is your exact requirement?

0 Kudos

Thanks Chinmay.

Please see the following screen shot for my requirement.

Currently, the Prices for each line item is displayed and the sub-total is calculated for all 3 line items. My requirement is to show only 3,745 in the sub-total and not 7,490.

0 Kudos

Well, its a bit odd and against the definition of subtotal.

Why not just print an extra line at the bottom and copy the figure?

0 Kudos

I spoke to the team and explained the situation. We are now going to add an additional column only for the Items where we need sub-total on.

Thanks for your help.