Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

ALV Block list Display

Hello,

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 -

123.123.123

new/old

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 ?

Thank you.

Tags:
replied

Usha,

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.

...

ENDLOOP.

Now create a dynamic internal table using this field catalog.

CL_ALV_TABLE_CREATE->CREATE_DYNAMIC_TABLE

Now populate this table with whatever data you want to display.

Regards,

Ravi

Note : Please mark the helpful answers

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question