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

Reuse_Feildcatlog_merge

Hi Experts,

I am working In ECC 6.0. I am using the funtion module '<b>REUSE_FEILDCATLOG_MERGE'</b>. If i pass the internal table structure to this function module the feild catlog is not creating and if i create a structure in <b>SE11</b> and if pass it is generating the feild catlog. But here i must not create any global structure . Is there any way with out creating the global structure i can populate the feild catlog.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Posted on Sep 09, 2007 at 10:25 AM

    Hi ,

    U may be doing something wrong here..

    Just past the code here..

    May be we can help u..

    Cheers,

    Simha.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 09, 2007 at 10:35 AM

    Hi Sinha,

    This is the code

    TABLES : MARA.

    type-pools: slis.

    SELECT-OPTIONS: MATERIAL FOR MARA-MATNR.

    TYPES : BEGIN OF TY_MARA,

    MATNR TYPE MATNR,

    ERSDA TYPE ERSDA,

    END OF TY_MARA.

    DATA : WA_MARA TYPE TY_MARA,

    IT_MARA TYPE TABLE OF TY_MARA.

    DATA:

    IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,

    IT_HEADING TYPE SLIS_T_LISTHEADER WITH HEADER LINE,

    IT_EVENTS TYPE SLIS_T_EVENT WITH HEADER LINE.

    SELECT MATNR ERSDA FROM MARA INTO TABLE IT_MARA WHERE MATNR IN material.

    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

    EXPORTING

    I_PROGRAM_NAME = SY-REPID

    I_INTERNAL_TABNAME = it_MARA

    • I_STRUCTURE_NAME = 'TY_MARA'

    • I_CLIENT_NEVER_DISPLAY = 'X'

    • I_INCLNAME = SY-REPID

    • I_BYPASSING_BUFFER =

    • I_BUFFER_ACTIVE =

    CHANGING

    CT_FIELDCAT = 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.

    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

    EXPORTING

    • I_INTERFACE_CHECK = ' '

    • I_BYPASSING_BUFFER =

    • I_BUFFER_ACTIVE = ' '

    I_CALLBACK_PROGRAM = SY-REPID

    • I_CALLBACK_PF_STATUS_SET = ' '

    • I_CALLBACK_USER_COMMAND = ' '

    • I_STRUCTURE_NAME =

    • IS_LAYOUT =

    IT_FIELDCAT = it_fieldcat[]

    • IT_EXCLUDING =

    • IT_SPECIAL_GROUPS =

    • IT_SORT =

    • IT_FILTER =

    • IS_SEL_HIDE =

    • I_DEFAULT = 'X'

    • I_SAVE = ' '

    • IS_VARIANT =

    • IT_EVENTS =

    • IT_EVENT_EXIT =

    • IS_PRINT =

    • IS_REPREP_ID =

    • I_SCREEN_START_COLUMN = 0

    • I_SCREEN_START_LINE = 0

    • I_SCREEN_END_COLUMN = 0

    • I_SCREEN_END_LINE = 0

    • IR_SALV_LIST_ADAPTER =

    • IT_EXCEPT_QINFO =

    • I_SUPPRESS_EMPTY_DATA = ABAP_FALSE

    • IMPORTING

    • E_EXIT_CAUSED_BY_CALLER =

    • ES_EXIT_CAUSED_BY_USER =

    TABLES

    T_OUTTAB = it_mara[]

    • 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.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
         EXPORTING
             I_PROGRAM_NAME = sy-repid
             I_INTERNAL_TABNAME = 'IT_MARA'
             I_INCLNAME = sy-repid
      CHANGING
            CT_FIELDCAT = IT_FIELDCAT[]
      EXCEPTIONS
            INCONSISTENT_INTERFACE = 1
            PROGRAM_ERROR = 2
            OTHERS = 3.
      

      The internal table name has to be in Capital letters.

      best regards,

      Thangesh

  • author's profile photo Former Member
    Former Member
    Posted on Sep 09, 2007 at 11:04 AM

    Hi Hari,

    I had tried by using dictionary reference dut the feild catlog is not created.

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi,

      Make the following changes in ur F.M

      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

      EXPORTING

      I<b>_PROGRAM_NAME = SY-REPID

      I_INTERNAL_TABNAME = 'IT_MARA'

      I_INCLNAME = SY-REPID

      CHANGING

      CT_FIELDCAT = IT_FIELDCAT[]</b>

      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.

      And remember that ur row in the program doesnot have to exceed more than 72 characters length. Runtime error will ocur.

      <b>SELECT MATNR ERSDA FROM MARA INTO TABLE IT_MARA WHERE MATNR IN material.</b>

      Ur above quesy exceeds 72 charcters, so split it in to two rows.

      <b>SELECT MATNR ERSDA FROM MARA

      INTO TABLE IT_MARA WHERE MATNR IN material.</b>

      Like this.

      It will work...

      Cheers,

      Simha.

  • author's profile photo Former Member
    Former Member
    Posted on Sep 09, 2007 at 01:41 PM

    REUSE_ALV_FIELDCATALOG_MERGE does not work with TYPES definition of the structure.

    Define your structure:

    DATA: BEGIN OF st_report,
       matnr LIKE ekko-matnr,
       ebeln LIKE ekko-ebeln,
       ebelp LIKE ekpo-ebelp,
       text1(20)  type C,
    END OF st_report,
    tbl_report TYPE TABLE OF st_report.
    
    

    Then, pass the name of the structure to the function in upper case enclosed in quotes - 'ST_REPORT'

    Andrew

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 10, 2007 at 02:50 AM

    Hi Friends,

    Thanks for your repiles. I had tried in all the ways you had suggested but the feild catlog is not created.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      HI,

      see ur code now.

      TABLES : MARA.

      type-pools: slis.

      SELECT-OPTIONS: MATERIAL FOR MARA-MATNR.

      TYPES : BEGIN OF TY_MARA,

      MATNR TYPE MATNR,

      ERSDA TYPE ERSDA,

      END OF TY_MARA.

      DATA : WA_MARA TYPE TY_MARA.

      <b>DATA:IT_MARA TYPE TY_MARA occurs 0.</b>

      DATA:

      <b>IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,</b>

      IT_HEADING TYPE SLIS_T_LISTHEADER WITH HEADER LINE,

      IT_EVENTS TYPE SLIS_T_EVENT WITH HEADER LINE.

      SELECT MATNR ERSDA FROM MARA INTO TABLE IT_MARA WHERE MATNR IN material.

      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

      EXPORTING

      I_PROGRAM_NAME = SY-REPID

      <b>I_INTERNAL_TABNAME = 'IT_MARA'</b>

      <b>I_INCLNAME = SY-REPID</b>

      CHANGING

      <b>CT_FIELDCAT = IT_FIELDCAT.</b>

      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

      EXPORTING

      I_CALLBACK_PROGRAM = SY-REPID

      <b>IT_FIELDCAT = it_fieldcat</b>

      TABLES

      <b> T_OUTTAB = IT_MARA.</b>

      <b>reward if helpful</b>

      rgds,

      bharat.

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.