Create dynamic structure for ALV
I would like to ask some help with regards to my requirement.
The requirement is to make the ALV output dynamic, I had already the idea but my problem is how to make the structure or internal table dynamic instead of declaring manually a maximum number of fields. Currently I used the function module 'REUSE_ALV_FIELDCATALOG_MERGE' which is to build the field catalog. I created a structure which contains all the fields I need to display in the ALV but I need to change it now to make it dynamic because there are columns which will only display depends of the data inputted on the selection-screen which is of data type a988-kschl. Do you have any idea? Your suggestions is very much appreciated and especially sample code is provided.
This is how I declare may parameters:
SELECT-OPTIONS: s_kschl FOR a988-kschl.