When we are Displaying the ALV GRID using SET_TABLE_FOR_FIRST_DISPLAY ,Some times we may get error message like
'FIELD CATALOG NOT FOUND".
If you are using the below Function Module to create fieldcatalog, then make sure that the ZSTRUCT should be DataDictionary Object.
If you Create ZSTRUCT as local structure by using TYPES statement,You will get the error.
FM Signature:
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
I_STRUCTURE_NAME = 'ZSTRUCT' "DDIC object
I_INTERNAL_TABNAME = ITAB_OUTPUT "Interanal table based on your requirement
CHANGING
CT_FIELDCAT = ITAB_FIELDCAT "Field catalog ref to lvc_s_fcat
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
I_STRUCTURE_NAME = 'ZSTRUCT' "DDIC object
I_INTERNAL_TABNAME = ITAB_OUTPUT "Interanal table based on your requirement
CHANGING
CT_FIELDCAT = ITAB_FIELDCAT "Field catalog ref to lvc_s_fcat
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3.