ALV - add new fields

Advertisement
Hi All,
i am using REUSE_ALV_FIELDCATALOG_MERGE to populate fieldcat. the Internal table used is TB_FINAL with 20 fields.
in additon ,i have to add new fields to the Fieldcat based on a custom table . if the custom table is having 3 entries , i need to add 3 new fields to the Fieldcat.
and i need to Populate those new fields with data from CABN ( Characteristics table)
how to do this?
waiting for your replies.
Thanks in advance.
Suki.
Advertisement

Replay

FORM ZI004_FIELDCAT_MOULD .
    wa_fieldcat-fieldname = 'ZMLDCDID' .      "Mould Code ID
    wa_fieldcat-tabname   = 'IT_MLDETAILS' .
    wa_fieldcat-outputlen = 40 .
    wa_fieldcat-seltext_l = text-010 .
    APPEND wa_fieldcat TO it_fieldcat.
    CLEAR wa_fieldcat.
    wa_fieldcat-fieldname = 'ZMLDID' .        "Mould ID
    wa_fieldcat-tabname   = 'IT_MLDETAILS' .
    wa_fieldcat-outputlen = 20 .
    wa_fieldcat-seltext_l = text-011 .
    APPEND wa_fieldcat TO it_fieldcat.
    CLEAR wa_fieldcat.
    wa_fieldcat-fieldname = 'ZMLDCODE' .      "Mould Code
    wa_fieldcat-tabname   = 'IT_MLDETAILS' .
    wa_fieldcat-outputlen = 40 .
    wa_fieldcat-seltext_l = text-012 .
    APPEND wa_fieldcat TO it_fieldcat.
    CLEAR wa_fieldcat.
endform.