Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Fieldcatalog Merge in Alv report

Former Member
0 Kudos

Hi friends,

while i am using field catalog merge in report (REUSE_ALV_FIELDCATALOG_MERGE)

the report shows a dump error "The ABAP program lines are wider than the internal table.".

so i have removed the fieldcatalog merge FM and i used fieldcatalog directly then i got the output perfectly..

How can i use fieldcatalog merge .

regards,

sateesh.

6 REPLIES 6

GauthamV
Active Contributor
0 Kudos

Goto SE37 ,give REUSE_ALV_FIELDCATALOG_MERGE fm and click

where used list button you will get so many programs.

Former Member
0 Kudos

Hi

Are u working on rel ECC 6?

If it's so probably the error is due to new editor:

here u can write the abap code on the line longer than 72 char, but the fm REUSE_ALV_FIELDCATALOG_MERGE try to upload the abap code in an internal table with field of 72 char: so you'll get that dump.

If you need to use the fm REUSE_ALV_FIELDCATALOG_MERGE u need to format your abap code.

As soos as you're in abap editot go to:

Utilities->Setting: here check the option for 72 char: Downwards-Comp line lntgh(72)

Max

Former Member
0 Kudos

hi,

in my case i have used like this


*&---------------------------------------------------------------------*
FORM set_fieldcat .

  CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
   EXPORTING
     i_program_name               = w_repid
*   I_INTERNAL_TABNAME           = ' '
     i_structure_name             = 'ZADMIN_APERAK_ERRORS_ALV'
*   I_CLIENT_NEVER_DISPLAY       = 'X'
*   I_INCLNAME                   =
*   I_BYPASSING_BUFFER           =
*   I_BUFFER_ACTIVE              =
    CHANGING
      ct_fieldcat                  = t_fieldcat
   EXCEPTIONS
     inconsistent_interface       = 1
     program_error                = 2
     OTHERS                       = 3
            .

its better use the wherelist to see the programs which used this FM

chck the field lenghts

former_member555112
Active Contributor
0 Kudos

Hi,

Please check your ABAP editor settings.

Go to Utilities->Settings in your ABAP editor and maintain the line size as 72.

Regards,

Ankur Parab

Former Member
0 Kudos

Hi,

Try the below setting to avoid short dump.

Function REUSE_ALV_FIELDCATALOG_MERGE dumps if the program contains lines longer than 72 characters, even if the lines are comment lines. An easy remedy is to turn on the switch preventing lines to be longer than 72. (Utilities -> settings. Tab-page “ABAP-Editor”, sub tab-page “Editor”, set a check mark in the field “Downwards-Comp. Line Lngth(72)”).

Refer the link

http://www.sap-img.com/abap/alv-reporting-z-list-materials.htm

Hope it helps,

Regards

Sumana

Former Member
0 Kudos

Hi,

Kindly refer the sample code below,



*PARAMETERS : p_waers TYPE tcurc-waers.

**FIELD CATALOG
*DATA : it_field TYPE slis_t_fieldcat_alv,
*       wa_field TYPE slis_fieldcat_alv.

***INTERNAL TABLE
**DATA : BEGIN OF it_final OCCURS 0.
***         chk(1) TYPE c.
**        INCLUDE STRUCTURE tcurc.
**DATA : END OF it_final.

**  CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
**    EXPORTING
**      i_program_name         = sy-repid
**      i_internal_tabname     = 'IT_FINAL'
***      i_structure_name       = 'TCURC'     "tcurc is the table name
**      i_inclname             = sy-repid
**    CHANGING
**      ct_fieldcat            = it_field
**    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.

Hope it helps

Regards

Mansi