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

FIELD CATALOG

Former Member
0 Likes
2,687

Hi alll,

I need to create fieldcatalog for VEIAV table and i am using reuse_alv_fieldcatlog_merge fm but it is giving dump error,how to resolve it.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,661

please check whether in ur report no line exceeds 72 characters...

means the length of each line of code does not exceed 72 characters..

Just Check it......it may or may not solve ur problem...

Hi alll,

I need to create fieldcatalog for VEIAV table and i am using reuse_alv_fieldcatlog_merge fm but it is giving dump error,how to resolve it.

24 REPLIES 24
Read only

Former Member
0 Likes
2,661

Hi Anjali,

Please provide the dump details.

Please check the table name.

kiran

Read only

0 Likes
2,661

this is the error msg

A RAISE statement in the program "CL_GUI

exception

condition "NO_FIELDCATALOG_AVAILABLE".

Read only

0 Likes
2,661

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

I_PROGRAM_NAME = 'ZG_ALV'

I_INTERNAL_TABNAME = 'I_SUMMARY'

  • I_STRUCTURE_NAME = 'S_SUMM'

  • I_CLIENT_NEVER_DISPLAY = 'X'

  • I_INCLNAME = sy-cprog

  • I_BYPASSING_BUFFER =

  • I_BUFFER_ACTIVE =

CHANGING

ct_fieldcat = i_fcat[]

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

endform.

Read only

0 Likes
2,661

Hi,

Try creating a structure of the internal table and pass it...

I_STRUCTURE_NAME = <pass the itab structure>

which will be VEIAV in your case....

Read only

Former Member
0 Likes
2,661

post the code of function call, you might be calling the function wrongly.

Read only

Former Member
0 Likes
2,661

that means you are not calling the function properly. try like this..

call function 'REUSE_ALV_FIELDCATALOG_MERGE'
       exporting
            i_program_name     = sy-repid
            i_structure_name   = 'VEIAV'   "are you passing the table name here...
            i_inclname         = sy-repid
       changing
            ct_fieldcat        = it_fieldcat.

Read only

0 Likes
2,661

yes i am passing the internal table name to that parameter

Read only

0 Likes
2,661

I even tried bu giving the structure name also but the same.

Read only

0 Likes
2,661

you want to build the fieldcatalog based on internal table or Database table.

if it is from table(DB) then you can do like this..

call function 'REUSE_ALV_FIELDCATALOG_MERGE'
       exporting
            i_program_name     = sy-repid
            i_structure_name   = 'VEIAV'   "are you passing the table name here...
            i_inclname         = sy-repid
       changing
            ct_fieldcat        = it_fieldcat.

if it is internal table then do like this.

call function 'REUSE_ALV_FIELDCATALOG_MERGE'
       exporting
            i_program_name     = sy-repid
            i_internal_tabname   = 'ITAB_VEIAV'   "pass internal table name here...
            i_inclname         = sy-repid
       changing
            ct_fieldcat        = it_fieldcat.

Read only

0 Likes
2,661

I want to create fcat based on internal table ,and i passed the internal table name only.

Read only

0 Likes
2,661

then check the above post.

Read only

Former Member
0 Likes
2,661

Try this one...


CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
  EXPORTING
    i_program_name         = l_repid
    i_structure_name       = 'VEIAV'
  CHANGING
    ct_fieldcat            = cht_fieldcat
  EXCEPTIONS
    inconsistent_interface = 1
    program_error          = 2
    OTHERS                 = 3.

Read only

Former Member
0 Likes
2,662

please check whether in ur report no line exceeds 72 characters...

means the length of each line of code does not exceed 72 characters..

Just Check it......it may or may not solve ur problem...

Read only

0 Likes
2,661

may not solve her problem.

Read only

0 Likes
2,661

In my program there are mony lines that are crossing 72 , if emoved will it be solved.

Read only

0 Likes
2,661

If many lines are crossing 72 chars.. then break them into 2 or more lines.....

Read only

0 Likes
2,661

I did but it is showing the same error

Read only

0 Likes
2,661

Hi,

Check this sample code it is working for me

REPORT ZSRK_022 .

TYPE-POOLS : SLIS.

DATA : I_SUMMARY TYPE TABLE OF VEIAV WITH HEADER LINE,

I_FCAT TYPE SLIS_T_FIELDCAT_ALV.

SELECT * FROM VEIAV

INTO TABLE I_SUMMARY

UP TO 10 ROWS.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

I_PROGRAM_NAME = 'ZSRK_022'

I_INTERNAL_TABNAME = 'I_SUMMARY'

I_STRUCTURE_NAME = 'VEIAV'

CHANGING

CT_FIELDCAT = I_FCAT[].

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = 'ZSRK_022'

IT_FIELDCAT = I_FCAT[]

TABLES

T_OUTTAB = I_SUMMARY[].

Read only

0 Likes
2,661

how have you defined the internal table for fieldcatalog i.e. field in changing parameter, please show me that code

Edited by: NIKHILKUMAR POOJARI on Oct 23, 2008 3:21 PM

Read only

0 Likes
2,661

internal table should be defined like this..if you are working with fieldcatalog merge and using the internal table to create the fieldcatalog.

data: begin of it_data occurs 0,  "table should be with header line
         matnr like mara-matnr,   "LIKE is must
         ...
         ...
        end of it_data.

why can't you show your code , from the beginning i am asking.

Read only

0 Likes
2,661

TYPES : BEGIN OF TY_summary ,

vbeln like vbak-vbeln,

audat like vbak-audat,

ernam like vbak-ernam,

vbtyp like vbak-vbtyp,

auart like vbak-auart,

netwr like vbak-netwr,

kunnr like vbak-kunnr,

END OF TY_summary.

DATA : wa_fcat TYPE slis_fieldcat_alv,

i_fcat TYPE slis_t_fieldcat_alv,

i_summary type STANDARD TABLE OF ty_summary,

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

I_PROGRAM_NAME = sy-repid

I_INTERNAL_TABNAME = 'I_SUMMARY'

I_INCLNAME = sy-repid

CHANGING

ct_fieldcat = i_fcat[]

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

endform.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = 'ZG_ALV'

i_callback_user_command = 'USERCOMMAND'

i_callback_top_of_page = 'TOPOFPAGE'

i_grid_title = 'UNPROCESSED SALES ORDERS'

is_layout = wa_layout

it_fieldcat = i_fcat[]

TABLES

t_outtab = i_summary[]

  • EXCEPTIONS

  • PROGRAM_ERROR = 1

  • OTHERS = 2

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDFORM. " display

Read only

0 Likes
2,661

change the declaration code like this and see..

data : BEGIN OF i_summary occurs 0,
vbeln like vbak-vbeln,
audat like vbak-audat,
ernam like vbak-ernam,
vbtyp like vbak-vbtyp,
auart like vbak-auart,
netwr like vbak-netwr,
kunnr like vbak-kunnr,
END OF i_summary.

DATA : wa_fcat TYPE slis_fieldcat_alv,
i_fcat TYPE slis_t_fieldcat_alv,
i_summary type STANDARD TABLE OF ty_summary,

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = sy-repid
I_INTERNAL_TABNAME = 'I_SUMMARY'
I_INCLNAME = sy-repid
CHANGING
ct_fieldcat = i_fcat[]

EXCEPTIONS

Read only

0 Likes
2,661

Thank you vijay ,i got it.

Read only

Former Member
0 Likes
2,661

Hi,

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

I_PROGRAM_NAME = 'ZG_ALV'

I_INTERNAL_TABNAME = 'I_SUMMARY'

I_STRUCTURE_NAME = 'VEIAV'

CHANGING

CT_FIELDCAT = I_FCAT[]

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