I have developed a report in OOP. Fieldcatalog was built manually and cl_gui_alv_grid was used. My report function ok, i. e. ALV listing is OK. Because I developed in OOP, I do not want to develop fieldcatalog manually.
Can someone give me the method to use to develop my fieldcatelog exporting my ITAB. I mean the OOP of FM Reuse_alv_fieldcatalog_merge.
I have tried FM LVC_FIELDCATALOG_MERGE, but since I did not create a structure (because I do not want to use structure) rather an ITAB so I coded like this:
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
I_INTERNAL_TABNAME = ITAB
CT_FIELDCAT = IT_FIELDCAT
Problem: fieldcatslog "it_fieldcat" was not successfuly created.
What do I need? I just need a method in OOP which I would pass my ITAB onto and method should deliver fieldcatalog just as the FM Reuse_alv_fieldcatalog_merge does.
Hope I have made some sense.