Application Development and Automation 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: 
Read only

dump in ALV

Former Member
0 Likes
890

HI.

I created ALV by Function module 'REUSE_ALV_FIELDCATALOG_MERGE'.its giving DUMP like inconsistent interface i.e. sy-subrc = 1.

Could you tell me the reasons.how can i resolve this problem.

Regards.

jay

HI.

I created ALV by Function module 'REUSE_ALV_FIELDCATALOG_MERGE'.its giving DUMP like inconsistent interface i.e. sy-subrc = 1.

Could you tell me the reasons.how can i resolve this problem.

Regards.

jay

4 REPLIES 4
Read only

Former Member
0 Likes
762

You need to declare the Internal table in the below mentioned way . and Use LIKE instead of TYPE when declaring the fields.

data: begin of itab occurs 0,
          vbeln like vbap-vbeln,
          matnr like vbap-matnr,
        end of itab.  
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
      i_program_name         = sy-repid
      i_internal_tabname     = 'ITAB'
      i_inclname             = sy-repid     " <=-==this is important
    CHANGING
      ct_fieldcat            = it_fieldcat[]
    EXCEPTIONS
      inconsistent_interface = 1
      program_error          = 2
      OTHERS                 = 3.
  IF sy-subrc <> 0.
 
  ENDIF.

Read only

Former Member
0 Likes
762

Thanks for all

Read only

Former Member
0 Likes
762

Hi,

You need to do the following steps to get your problem solved

1.) Declare the TYPES for the data of internal table. and while declaring the data you need to use LIKE and not TYPE otherwise it will throw dump.

types: begin of ty_itab,

matnr like mara-matnr,

end of ty_itab.

2.) Define the internal table

data: t_itab type table of ty_itab with header line.

3.) pass the program name in local variable

l_repid = sy-repid

4.) pass the values to function module

call function 'REUSE_ALV_FIELDCATALOG_MERGE'

exporting

i_program_name = l_repid" Program Name

i_internal_tabname = 'T_ITAB' " Name of output table

changing

ct_fieldcat = gt_fieldcat " Field catalog with

exceptions

inconsistent_interface = 1

program_error = 2

others = 3

Please reward if you find the answer useful.

Thanks,

Kamesh