Skip to Content
0
Former Member
Feb 18, 2011 at 04:12 AM

Display dynamic columns in ALV

475 Views

Hi All,

I have a requirement in which I have develop a report displaying material master basic data and classification data. The basic data I am getting from MARA and MAKT tables. And for classification data I am getting the class maintained from each material from tables INOB,KSSK and from KLAH, then I am getting the characteristics and its values by calling BAPI u2018BAPI_OBJCL_GETDETAILu2019 for each material .

Now I have to prepare ALV having column name for basic data (would be static) and characteristic name (would be dynamic, and I have to display characteristics values under it, for each material ).

For example: if material u2018CHWOJA4u2019 has 2 characteristics as u2018country (value u2018Franceu2019)u2019 and u2018creation season(value u2018Decu2019)u2019 and second material u2018E50480u2019 has 3 characteristics as u2018Abacus (value u2018yesu2019)u2019 ,u2018country (value u2018Indiau2019)u2019 and u2018 season(value Jank)u2019 , the ALV output would be :

Material Number; Material description; Base Unit of Measure;Material Group; Abacus; Country;season

CHWOJA4; JACKET;PC;Z05; ; France;Dec

E50480;BRAZIL REAL;PC;Z06; yes; India;Jan

In short, my last column of the ALV would be the characteristic name and the content would be the char. value.

Can you please suggest some ways to achieve this? A quick reply would be highly appreciated!

Thanks,

Vanitha