Skip to Content

I have error with REUSE_ALV_FIELDCATALOG_MERGE with wrong with my program

TYPE-POOLS slis.

DATA: fld_catalog TYPE slis_t_fieldcat_alv, "Lvc_t_fcat

      wa_fld_catalog LIKE LINE OF fld_catalog.



DATA g_repid LIKE sy-repid.

DATA: gs_layout TYPE slis_layout_alv.

DATA: w_variant TYPE disvariant.





DATA: BEGIN OF TY_DISPLAY OCCURS 0,

   matnr LIKE marc-matnr,

   werks LIKE marc-werks,

END OF TY_DISPLAY.





DATA: it_display LIKE STANDARD TABLE OF ty_display  WITH HEADER LINE.





SELECTION-SCREEN: BEGIN OF BLOCK a1 WITH FRAME TITLE text-i01.

SELECT-OPTIONS: s_matnr FOR marc-matnr, " Material number

                s_werks FOR marc-werks. " Material group

SELECTION-SCREEN END OF BLOCK a1.



AT SELECTION-SCREEN.

  SELECT *

    INTO CORRESPONDING FIELDS OF TABLE it_display

    FROM marc

    WHERE werks IN s_werks

    AND matnr IN s_matnr.







INITIALIZATION.



START-OF-SELECTION.

g_repid = sy-repid.

  CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

    EXPORTING

      i_program_name         = g_repid

      i_internal_tabname     = 'IT_DISPLAY'

    CHANGING

      ct_fieldcat            = fld_catalog[]

    EXCEPTIONS

      inconsistent_interface = 1

      program_error          = 2.



END-OF-SELECTION.

  gs_layout-colwidth_optimize = 'X'.

  gs_layout-zebra             = 'X'.

  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

      i_callback_program = g_repid

      is_layout          = gs_layout

      it_fieldcat        = fld_catalog

      i_save             = 'A'

    TABLES

      t_outtab           = it_display

    EXCEPTIONS

      program_error      = 1

      OTHERS             = 2.
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Nov 22, 2016 at 04:45 AM
    ,

    Hi,

    I_INTERNAL_TABNAME = 'IT_DISPLAY'

    I_STRUCTURE_NAME = 'YOUR STRUCTURE' "Create structure and assign here.

    Please create structure and assign it in FM

    Regards,

    E.Ananthachari

    Add comment
    10|10000 characters needed characters exceeded

    • If you've got your answer, then share it here. This is supposed to be two-way community - give as well as take.

      To close a question either "accept" the answer you think gives the answer, or go to "actions" and click on "close".

  • Nov 22, 2016 at 06:00 AM
    -1

    Question is answer.

    Add comment
    10|10000 characters needed characters exceeded

    • If you've got your answer, then share it here. This is supposed to be two-way community - give as well as take.

      To close a question either "accept" the answer you think gives the answer, or go to "actions" and click on "close".

  • avatar image
    Former Member
    Nov 21, 2016 at 09:43 PM

    Anucha,

    Change your FM call as follows ...

    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    i_program_name = g_repid
    i_internal_tabname = 'IT_DISPLAY'
    i_inclname = g_repid
    CHANGING
    ct_fieldcat = fld_catalog[]
    EXCEPTIONS
    inconsistent_interface = 1
    program_error = 2.

    Add comment
    10|10000 characters needed characters exceeded