04-26-2007 8:06 AM
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.
04-26-2007 10:39 AM
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.
04-26-2007 10:41 AM
04-26-2007 10:42 AM
means in end of list,
use the 'DESCRIBE' command to get the no of rows in the tables.