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

Issues when building ALV catalog

Hello experts,

I am using the following function module to build my ALV catalog:

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
      i_program_name     = 'ZLRLEXC_QUANTS_X_MATERIAL'
      i_internal_tabname = 'ALV_ITAB'
      i_inclname         = 'ZLRLEXC_QUANTS_X_MATERIAL_TOP'
    CHANGING
      ct_fieldcat        = field.
  IF sy-subrc <> 0.
    WRITE: 'SY-SUBRC: ', sy-subrc, 'REUSE_ALV_FIELDCATALOG_MERGE'.
  ENDIF.

The problem that I'm facing is that the "field" internal table does not contain any information after processing, and the odd thing is that sy-subrc = 0.

Any help would be highly appreciate it!

Regards,

-C

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on Jul 23, 2008 at 02:31 PM

    data: v_repid type sy-repid.

    v_repid = 'ZLRLEXC_QUANTS_X_MATERIAL_TOP'

    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          i_program_name     = SY-REPID
          i_internal_tabname = 'ALV_ITAB'
          i_inclname            =  V_REPID
        CHANGING
          ct_fieldcat        = field.
      IF sy-subrc  0.
        WRITE: 'SY-SUBRC: ', sy-subrc, 'REUSE_ALV_FIELDCATALOG_MERGE'.
      ENDIF.

    All the Internal tables field should be defined using LIKE

    you should define in the below mentioned way...

    Data: begin of itab occurs 0,
               matnr like mara-matnr,  
             end of itab.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 23, 2008 at 02:28 PM

    how are field and alv_itab defined?

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 23, 2008 at 02:30 PM

    use like this:

    DATA:  lt_fieldcat TYPE slis_t_fieldcat_alv.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          i_program_name         = sy-repid
          i_structure_name       = 'FAGL_S_RFBELJ10_COMPANY_CODES'
        CHANGING
          ct_fieldcat            = lt_fieldcat
        EXCEPTIONS
          inconsistent_interface = 1
          program_error          = 2
          OTHERS

    it should work.

    Amit.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 23, 2008 at 02:34 PM

    hi did you defield like this..

    data: alv_itab type SLIS_TABNAME .

    data: ZLRLEXC_QUANTS_X_MATERIAL_TOP type TRDIR-NAME .

    data: field type SLIS_T_FIELDCAT_ALV .

    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.