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: 

"Field catalog not found" error in ALV program

0 Kudos

Hi,

Please help me,I can not find what is error is my code,I have always error message "Field catalog not found" .


report z01.

type-pools: slis .

tables:skat.

data:begin of wa_skat,

        ktopl like skat-ktopl,

        saknr like skat-saknr,

        txt20 like skat-txt20,

      end of wa_skat.

data:i_skat like standard table of wa_skat with header line.

data: fieldcat type slis_t_fieldcat_alv.

select-options:zacc for skat-saknr.

select * into corresponding fields of wa_skat

   from skat

    for all entries in zacc

   where saknr = zacc-low.

   append wa_skat to i_skat.

endselect.

call function 'REUSE_ALV_FIELDCATALOG_MERGE'

   exporting

     i_program_name         = sy-repid

     i_internal_tabname     = 'I_SKAT'

*   I_STRUCTURE_NAME       = 'wa_SKAT'

     i_inclname             = sy-repid

     i_bypassing_buffer     = 'X'

   changing

     ct_fieldcat            = fieldcat

   exceptions

     inconsistent_interface = 1

     program_error          = 2

     others                 = 3.

call function 'REUSE_ALV_GRID_DISPLAY'

   exporting

     it_fieldcat = fieldcat

   tables

     t_outtab    = i_skat.

4 REPLIES 4

Clemenss
Active Contributor
0 Kudos

Hi,

easy: you pass sy-repid (by reference) to the function module. As soon as REUSE_ALV_FIELDCATALOG_MERGE is processed, sy-repid changes value and your itab is not found.

use data lv_repid type sy-repid. lv_repid = sy-repid. and pass lv_repid to the function.

Regards Clemens

shaik_sajid
Active Contributor
0 Kudos

Dear Gacia,

Attached is the code in the Notepad.

Use it and it will work.

Attached is the file.

Regards

Shaik

former_member184158
Active Contributor
0 Kudos

Hi,

just change the name of i_internal_tabname    

     i_internal_tabname     = 'WA_SKAT'

it should be worked,

Regards

Ibrahim

former_member182915
Active Contributor
0 Kudos

Hi,

just you have to correct in fm 'REUSE_ALV_FIELDCATALOG_MERGE'

call function 'REUSE_ALV_FIELDCATALOG_MERGE'
   exporting
     i_program_name         = sy-repid

    i_internal_tabname     = 'WA_SKAT' "'I_SKAT'   << change internal table name

*   I_STRUTURE_NAME       = 'wa_SKAT'
     i_inclname             = sy-repid
     i_bypassing_buffer     = 'X'
   changing
     ct_fieldcat            = fieldcat
   exceptions
     inconsistent_interface = 1
     program_error          = 2
     others                 = 3.