Skip to Content
author's profile photo Former Member
Former Member

How to create filed catalog dynamically

Hi SDN,

i am having following structure

TYPES:BEGIN OF ty_final,

pspnr TYPE prps-pspnr,

psphi TYPE prps-psphi.

INCLUDE STRUCTURE cosp.

TYPES END OF ty_final.

when i am selecting data to internal table created & passing it to

the FM REUSE_ALV_FIELDCATALOG_MERGE

it is giving me the dump

please tell me if any FM available which will create the Field Catalog.

Regards,

Rahul

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on Dec 05, 2007 at 04:12 PM

    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'

    EXPORTING

    i_structure_name = str_report

    CHANGING

    ct_fieldcat = p_it_fieldcat

    EXCEPTIONS

    inconsistent_interface = 1

    program_error = 2

    OTHERS = 3.

    IF sy-subrc <> 0.

    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

    ENDIF.

    str_report is your structure or table name and the p_it_fieldcat is the fieldcat table.

    define both variables or you can directly pass the structure or table.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 05, 2007 at 02:48 PM
    TYPES:BEGIN OF ty_final,
    pspnr LIKE prps-pspnr,
    psphi LIKE prps-psphi.
    INCLUDE STRUCTURE cosp.
    TYPES END OF ty_final.

    Try this... it might work......

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 05, 2007 at 04:04 PM

    Can you paste the whole code for analysis?

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2007 at 04:15 PM
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.