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

field catalog generation using merge function

i am trying to generate the field catalog using the below finction module, but i am not able to generate one and it is showing that 'FIeld catalog not generated'

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

I_PROGRAM_NAME = LV_prog_name

I_INTERNAL_TABNAME = 'UT_FINAL'

  • I_STRUCTURE_NAME =

  • I_CLIENT_NEVER_DISPLAY = 'X'

I_INCLNAME = LV_prog_name

  • I_BYPASSING_BUFFER =

  • I_BUFFER_ACTIVE =

CHANGING

CT_FIELDCAT = LT_FIELDCAT

EXCEPTIONS

INCONSISTENT_INTERFACE = 1

PROGRAM_ERROR = 2

OTHERS = 3

please help.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

8 Answers

  • Best Answer
    Posted on Jan 08, 2007 at 08:32 AM

    Hello Pramod

    The following sample report show how to use definitions of internal tables for creating (SLIS) fieldcatalogs. The data include contains the data definition that is commented (below INCLUDE statement).

    *&---------------------------------------------------------------------*
    *& Report  ZUS_SDN_FIELDCATALOG_1
    *&
    *&---------------------------------------------------------------------*
    *&
    *&
    *&---------------------------------------------------------------------*
    
    REPORT  zus_sdn_fieldcatalog_1.
    
    
    TYPE-POOLS: slis.
    
    include zus_sdn_slisfcat_Data.
    *DATA: BEGIN OF ty_s_list.
    *DATA:   bukrs    LIKE knb1-bukrs.
    *DATA:   kunnr    LIKE knb1-kunnr.
    *DATA:   vkorg    TYPE knvv-vkorg.  " type does not work !!!
    *DATA: END OF ty_s_list.
    
    
    DATA:
      gs_list         LIKE ty_s_list,
      gt_list         LIKE ty_s_list OCCURS 0.
    
    DATA:
      gt_fcat         TYPE slis_t_fieldcat_alv.
    
    
    START-OF-SELECTION.
    
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          i_program_name               = syst-repid
          i_internal_tabname           = 'TY_S_LIST'
    *     I_STRUCTURE_NAME             =
    *     I_CLIENT_NEVER_DISPLAY       = 'X'
          i_inclname                   = 'ZUS_SDN_SLISFCAT_DATA'
          I_BYPASSING_BUFFER           = 'X'
    *     I_BUFFER_ACTIVE              =
        CHANGING
          ct_fieldcat                  = gt_fcat
        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.
    
    
    
    
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
        EXPORTING
          i_structure_name = 'LVC_S_FCAT'
        TABLES
          t_outtab         = gt_fcat
        EXCEPTIONS
          program_error    = 1
          OTHERS           = 2.
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    
    END-OF-SELECTION.

    Regards

    Uwe

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2007 at 07:19 AM

    See this link:

    http://www.sap-img.com/fu015.htm

    Basically what this fm does is, that it will build a field catalog table based on the standard data elements and the domains the fields in the internal table are referring to.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2007 at 07:24 AM

    U shud be specifiying a ictionary structure in structure_name

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2007 at 07:46 AM

    i want to generate the field catalog using the internal table only..i cannot use the dictionary structure.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 08, 2007 at 07:59 AM
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2007 at 08:00 AM

    Hi promod,

    Check whether LV_prog_name = sy-repid is done in u r coding.

    or change u r code,

    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

    EXPORTING

    I_PROGRAM_NAME = sy-repid

    I_INTERNAL_TABNAME = 'UT_FINAL'

    I_INCLNAME = sy-repid

    CHANGING

    CT_FIELDCAT = LT_FIELDCAT

    EXCEPTIONS

    INCONSISTENT_INTERFACE = 1

    PROGRAM_ERROR = 2

    OTHERS = 3

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2007 at 08:06 AM

    1. Checkout if ur program name and include name are same

    2. In ur internal table , use LIKE instead of TYPES

    do not use MATNR TYPE MATNR but use

    MATNR LIKE MARA-MATNR.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2007 at 10:01 AM

    Hi Uwe Schieferstein,

    Thanx for the solution.

    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.