Skip to Content
0

I have error with REUSE_ALV_FIELDCATALOG_MERGE with wrong with my program

Nov 21, 2016 at 09:06 AM

65

avatar image
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.
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
ananthachari enjarapu Nov 22, 2016 at 04:45 AM
1
,

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

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Thank you i already got answer.

I don't know how to close my question.

0

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

0
Anucha Chamdoung Nov 22, 2016 at 06:00 AM
-1

Question is answer.

Show 1 Share
10 |10000 characters needed characters left 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".

0
Duane Addink Nov 21, 2016 at 09:43 PM
0

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.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Duane,

Error again i don't know why i got the error because i think my code that correct.

0