a week ago
Hi,
We have a requirement to Sort a report by Purchase Order and Purchase Requisition, and label each group with the corresponding PO& PR Number. (Please see screenshot below from ME2L)
My problem is, i am unable to recall the ABAP/ALV terminology to do this.
Can anyone point me in the right direction, so i can use it for searching further.
I tried 'Sort' & 'Aggregation'. But this does not seem to be it.
We are looking for the below effect which can be seen in ME2L. Where there report is sorted by Vendor/Supplying plant & Purchasing document. But whenever a new Vendor starts in the report, the large yellow line appears with a label identifying the Vendor/Supplying plant with the number and name. Whenever a new Purchasing document starts in the report, a large yellow line appears with a label identifying the Purchasing document.
I analysed the background code. I noticed they are just passing in the 'SORT' table with the two fields. I am unable to identify anything which says, "Group together like this, and start each group with a heading like this.."
Regards,
Joshua.
a week ago
If you use CL_GUI_ALV_GRID (?)
a week ago
Thank you for the reply, Sandra.
Yes I am using CL_GUI_ALV_GRID.
Let me try as you suggested. Earlier, I tried with just SORT table it did not have the desired effect.
Please note that the screenshot is not actually labelling the subtotals. Instead, it is labelling the start of every new Vendor/Purchase document.
Also, for further reference, any suggestion on how i go about searching for this? I am just unsure what this is called. I searched with heading, grouping, header, row group, aggregation, labelling, group heading.
Thursday - last edited Thursday
Thank you @Sandra_Rossi .
This has worked. I also searched and managed to find out this thread where you have explained how to get it working completely in front end. And this helped too. -> https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-subtotal-...
Logging a few of my learnings here, for my own future reference or for others
EDIT: Not sure how to mark this as answered/Solved. So, if anyone can help, please help.