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: 

Total option in REUSE_ALV_LIST_DISPLAY

Former Member
0 Kudos

Hi,

If we CHECK total option in REUSE_ALV_LIST_DISPLAY we get a total of numeric value with yellow color at the bottom.

Requirement:

Let say I have 3 line item records in the display, with 20 fields and one amount field. So I get the total of the amount field. Apart from that I want the Total number of LINE ITEMS to get displayed on that line. Is that possible . How?

Thanks in Advance.

3 REPLIES 3

Former Member
0 Kudos

Hi Mohan Kumar,

I think this is not possible using the total option in REUSE_ALV_LIST_DISPLAY. A small shortcut is to provide another field called line item number (Populate with number 1) and use the sort parameter for the FM.Populate the sort table with the key fields of header and pass it to the FM 'REUSE_ALV_LIST_DISPLAY'.

If U dont want to see the item number also then U need to use the FM 'REUSE_ALV_FIELDCATALOG_MERGE'. Fill the first table with the Header data 2nd table with the item details and the 3rd table with the totals.

Former Member
0 Kudos

To do that, in End_of_list event describe the output table.

0 Kudos

means in end of list,

use the 'DESCRIBE' command to get the no of rows in the tables.