Skip to Content
0
Feb 23, 2010 at 10:03 AM

No fieldcatalog generated when using REUSE_ALV_FIELDCATALOG_MERGE

25 Views

Hello Experts,

I am trying to use the said FM but my fieldcatalog table is not generated. I tried using SY-REPID in the

'i_program_name' and 'i_inclname' parameters. I also tried putting the name of my include program where

my data declaration is lcoated. Below is my code:

Include ZTXXR_P911_9000:

TYPES: BEGIN OF y_batchrun,
        zattrrultyp LIKE ztxx_pt9125-zattrrultyp,
        zattrrulid  LIKE ztxx_pt9126-zattrrulid,
        zattrrulde  LIKE ztxx_pt9125-zattrrulde,
        zattrseq    LIKE ztxx_pt9126-zattrseq,
        aedat       LIKE ztxx_pt9125-aedat,
        aenam       LIKE ztxx_pt9125-aenam,
        ersda       LIKE ztxx_pt9125-ersda,
        ernam       LIKE ztxx_pt9125-ernam,
       END OF y_batchrun.

DATA: is_ztxx_pt9124 TYPE STANDARD TABLE OF ztxx_pt9124,
      ts_batchrun    TYPE STANDARD TABLE OF y_batchrun.

PERFORM f_build_fieldcatalog
                      USING
                         'TS_BATCHRUN'
                      CHANGING
                         ts_batchrun
                         is_fieldcat.

Include ZTXXR_P911_TEST(Main program):

FORM f_build_fieldcatalog USING us_itabname TYPE slis_tabname
                       CHANGING ch_table TYPE STANDARD TABLE
                                ch_fieldcat TYPE lvc_t_fcat.

  REFRESH is_slis_fieldcat.

  CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
      i_program_name               = 'ZTXXR_P911_9000'
      i_internal_tabname           = us_itabname
*     I_STRUCTURE_NAME             =
*     I_CLIENT_NEVER_DISPLAY       = 'X'
      i_inclname                   = 'ZTXXR_P911_9000'
*     I_BYPASSING_BUFFER           =
*     I_BUFFER_ACTIVE              =
    CHANGING
      ct_fieldcat                  = is_slis_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.
  ENDIF.

ENDFORM.                    "f_build_fieldcatalog