ALV Block list Display
I have a problem in display of a report.
The data in the internal table stored according to the material num. The requirement is such that the material numbers have to be the column heading and the second heading should be new/old. And the list should contain the count of old and new qty of the material.
For eg -
10 / 20
I have to use block list as there are many lists to be displayed in the same format according to the users' choice. How will i achive it ?
Ravikumar Allampallam replied
Do you know how many materials you are going to have? If yes, you can create a structure with so many fields and specify the heading of the column in the field catalog. This heading with come from the internal table and at the same you can also count.
If you don't know the number of materials then its a little tricky. Assume you have materials in ITAB. Now you will have to build the catalog using that.
LOOP AT ITAB.
FIELDCAT-FIELDNAME = ITAB-MATNR.
FIELDCAT-SELTEXT = ITAB-MATNR.
Now create a dynamic internal table using this field catalog.
Now populate this table with whatever data you want to display.
Note : Please mark the helpful answers