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: 

Exception No_Fieldcatalog_Found in ALV?

Former Member
0 Kudos

Hi All,

I am trying to build the fieldcatalog dynamically using the function module reuse_alv_fieldcatalog_merge but it is rasing the eception" no_fielcatalog_found", please tell me what is wrong in my declaration part so that i can remove this error?

the code is as follows.

tables: ekko, ekpo.

parameters: p_bstyp type ekko-bstyp.

types: begin of st_ekko,

ebeln type ekko-ebeln,

bukrs type ekko-bukrs,

bstyp type ekko-bstyp,

bsart type ekko-bsart,

statu type ekko-statu,

aedat type ekko-aedat,

ernam type ekko-ernam,

lifnr type ekko-lifnr,

end of st_ekko.

data: it_ekko type standard table of st_ekko initial size 0,

wa_ekko type st_ekko.

select ebeln

bukrs

bstyp

bsart

statu

aedat

ernam

lifnr from ekko into table it_ekko where bstyp = p_bstyp.

type-pools: slis.

data: fact type slis_t_fieldcat_alv with header line,

event type slis_t_event with header line.

data: i_repid type sy-repid.

i_repid = sy-repid.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

I_PROGRAM_NAME = i_repid

I_INTERNAL_TABNAME = 'IT_EKKO'

  • I_STRUCTURE_NAME =

  • I_CLIENT_NEVER_DISPLAY = 'X'

I_INCLNAME = i_repid

  • I_BYPASSING_BUFFER =

  • I_BUFFER_ACTIVE =

CHANGING

CT_FIELDCAT = fact[]

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

event-name = 'TOP_OF_PAGE'.

event-form = 'TOP'.

append event.

clear event.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = SY-CPROG

I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

  • I_CALLBACK_TOP_OF_PAGE = ' '

  • I_CALLBACK_HTML_TOP_OF_PAGE = ' '

  • I_CALLBACK_HTML_END_OF_LIST = ' '

  • I_STRUCTURE_NAME =

  • I_BACKGROUND_ID = ' '

  • I_GRID_TITLE =

  • I_GRID_SETTINGS =

  • IS_LAYOUT =

IT_FIELDCAT = fact[]

  • IT_EXCLUDING =

  • IT_SPECIAL_GROUPS =

  • IT_SORT =

  • IT_FILTER =

  • IS_SEL_HIDE =

  • I_DEFAULT = 'X'

  • I_SAVE = ' '

  • IS_VARIANT =

IT_EVENTS = event[]

  • IT_EVENT_EXIT =

  • IS_PRINT =

  • IS_REPREP_ID =

  • I_SCREEN_START_COLUMN = 0

  • I_SCREEN_START_LINE = 0

  • I_SCREEN_END_COLUMN = 0

  • I_SCREEN_END_LINE = 0

  • IT_ALV_GRAPHICS =

  • IT_HYPERLINK =

  • IT_ADD_FIELDCAT =

  • IT_EXCEPT_QINFO =

  • I_HTML_HEIGHT_TOP =

  • I_HTML_HEIGHT_END =

  • IMPORTING

  • E_EXIT_CAUSED_BY_CALLER =

  • ES_EXIT_CAUSED_BY_USER =

TABLES

T_OUTTAB = it_ekko.

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

FORM TOP.

data: listheader type slis_t_listheader with header line.

listheader-typ = 'H'.

listheader-info = 'List of Purchasing Orders'.

append listheader.

clear listheader.

Regards,

MD

5 REPLIES 5

matt
Active Contributor
0 Kudos

It would help considerably if you'd surround your code with tags.

Former Member
0 Kudos

Thanks for your response,

but i dint get what u are trying to say, i would appreciate if you could elaborate on that.

Regards,

MD.

0 Kudos

>

> Thanks for your response,

>

> but i dint get what u are trying to say, i would appreciate if you could elaborate on that.

>

> Regards,

> MD.

Mat is saying simply whenever you post your code than pls select your code and click the option <> which is right next to U option ,than it may be clearly visible to we guys .

Edited by: Amit Gujargoud on Sep 3, 2008 1:48 PM

Former Member
0 Kudos

Thanks for your help, Amit.

Please answer my query.

I am trying to build the fieldcatalog dynamically using the function module reuse_alv_fieldcatalog_merge but it is rasing the eception" no_fielcatalog_found", please tell me what is wrong in my declaration part so that i can remove this error?

the code is as follows.

 tables: ekko, ekpo.
 parameters: p_bstyp type ekko-bstyp.

types: begin of st_ekko,
       ebeln type ekko-ebeln,
       bukrs type ekko-bukrs,
       bstyp type ekko-bstyp,
       bsart type ekko-bsart,
       statu type ekko-statu,
       aedat type ekko-aedat,
       ernam type ekko-ernam,
       lifnr type ekko-lifnr,
       end of st_ekko.

data: it_ekko type standard table of st_ekko initial size 0,
      wa_ekko type st_ekko.

select ebeln
       bukrs
       bstyp
       bsart
       statu
       aedat
       ernam
       lifnr from ekko into table it_ekko where bstyp = p_bstyp.

type-pools: slis.

data: fact type slis_t_fieldcat_alv with header line,
      event type slis_t_event with header line.

 data: i_repid type sy-repid.

 i_repid = sy-repid.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
 EXPORTING
   I_PROGRAM_NAME               = i_repid
   I_INTERNAL_TABNAME           = 'IT_EKKO'
*   I_STRUCTURE_NAME             =
*   I_CLIENT_NEVER_DISPLAY       = 'X'
   I_INCLNAME                   = i_repid
*   I_BYPASSING_BUFFER           =
*   I_BUFFER_ACTIVE              =
  CHANGING
    CT_FIELDCAT                  = fact[]
* 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.

event-name = 'TOP_OF_PAGE'.
event-form = 'TOP'.
append event.
clear event.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
 EXPORTING
   I_CALLBACK_PROGRAM                = SY-CPROG
  I_CALLBACK_USER_COMMAND           = 'USER_COMMAND'
*   I_CALLBACK_TOP_OF_PAGE            = ' '
*   I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
*   I_CALLBACK_HTML_END_OF_LIST       = ' '
*   I_STRUCTURE_NAME                  =
*   I_BACKGROUND_ID                   = ' '
*   I_GRID_TITLE                      =
*   I_GRID_SETTINGS                   =
*   IS_LAYOUT                         =
   IT_FIELDCAT                       = fact[]
*   IT_EXCLUDING                      =
*   IT_SPECIAL_GROUPS                 =
*   IT_SORT                           =
*   IT_FILTER                         =
*   IS_SEL_HIDE                       =
*   I_DEFAULT                         = 'X'
*   I_SAVE                            = ' '
*   IS_VARIANT                        =
   IT_EVENTS                         = event[]
*   IT_EVENT_EXIT                     =
*   IS_PRINT                          =
*   IS_REPREP_ID                      =
*   I_SCREEN_START_COLUMN             = 0
*   I_SCREEN_START_LINE               = 0
*   I_SCREEN_END_COLUMN               = 0
*   I_SCREEN_END_LINE                 = 0
*   IT_ALV_GRAPHICS                   =
*   IT_HYPERLINK                      =
*   IT_ADD_FIELDCAT                   =
*   IT_EXCEPT_QINFO                   =
*   I_HTML_HEIGHT_TOP                 =
*   I_HTML_HEIGHT_END                 =
* IMPORTING
*   E_EXIT_CAUSED_BY_CALLER           =
*   ES_EXIT_CAUSED_BY_USER            =
  TABLES
    T_OUTTAB                          = it_ekko.
* 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.

FORM TOP.

data: listheader type slis_t_listheader with header line.

listheader-typ = 'H'.
listheader-info = 'List of Purchasing Orders'.
append listheader.
clear listheader.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

IT_LIST_COMMENTARY = listheader[].




ENDFORM.

Former Member
0 Kudos

Hi MD,

I have seen your code, Fact[] is the structure you are passing for ALV Display.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = SY-CPROG

I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

I_CALLBACK_TOP_OF_PAGE = ' '

I_CALLBACK_HTML_TOP_OF_PAGE = ' '

I_CALLBACK_HTML_END_OF_LIST = ' '

I_STRUCTURE_NAME =

I_BACKGROUND_ID = ' '

I_GRID_TITLE =

I_GRID_SETTINGS =

IS_LAYOUT =

IT_FIELDCAT = fact[]

IT_EXCLUDING =

IT_SPECIAL_GROUPS =

IT_SORT =

IT_FILTER =

IS_SEL_HIDE =

I_DEFAULT = 'X'

I_SAVE = ' '

IS_VARIANT =

In the above function module, you should mention the database structure in I_STRUCTURE_NAME parameter. if not how can it populate your Fact[] internal table. Better you use your own field catalog statements to populate your Fact[] table.

do like this.

dATA : fact[] TYPE SLIS_T_FIELDCAT_ALV,

FIELDCAT_LN LIKE LINE OF fact[],

ADD 1 TO COL_POS.

FIELDCAT_LN-REF_TABNAME = 'MARA'.

FIELDCAT_LN-FIELDNAME = 'BISMT'.

FIELDCAT_LN-KEY = 'X'.

FIELDCAT_LN-DO_SUM = SPACE.

FIELDCAT_LN-COL_POS = COL_POS.

FIELDCAT_LN-NO_OUT = SPACE.

FIELDCAT_LN-QFIELDNAME = SPACE.

FIELDCAT_LN-HOTSPOT = SPACE.

APPEND FIELDCAT_LN TO fact.

CLEAR FIELDCAT_LN.

ADD 1 TO COL_POS.

FIELDCAT_LN-REF_TABNAME = 'MARA'.

FIELDCAT_LN-FIELDNAME = 'MATNR'.

FIELDCAT_LN-KEY = 'X'.

FIELDCAT_LN-DO_SUM = SPACE.

FIELDCAT_LN-COL_POS = COL_POS.

FIELDCAT_LN-NO_OUT = SPACE.

FIELDCAT_LN-QFIELDNAME = SPACE.

FIELDCAT_LN-HOTSPOT = SPACE.

APPEND FIELDCAT_LN TO fact.

CLEAR FIELDCAT_LN.

ADD 1 TO COL_POS.

FIELDCAT_LN-REF_TABNAME = 'MAKT'.

FIELDCAT_LN-FIELDNAME = 'MAKTX'.

FIELDCAT_LN-KEY = 'X'.

FIELDCAT_LN-DO_SUM = SPACE.

FIELDCAT_LN-COL_POS = COL_POS.

FIELDCAT_LN-NO_OUT = SPACE.

FIELDCAT_LN-QFIELDNAME = SPACE.

FIELDCAT_LN-HOTSPOT = SPACE.

APPEND FIELDCAT_LN TO fact.

CLEAR FIELDCAT_LN.

-


-


Remove your REUSE_FIELDCATALOG_MERGE function module.

Regards,

Santosh Kumar M.