Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

ALV REPORT

Hi everyone,

I have a doubt. I wrote the following code and while executing i am getting an error "fieldcatalog not found".. Please do help out.

type-pools : SLIS.

tables : aufk,afih,iflot,ordpar.

data : int_fcat type SLIS_T_FIELDCAT_ALV.

data i_repid like sy-repid.

data : begin of i_iflot occurs 0,

tplnr like iflot-tplnr,

end of i_iflot,

begin of i_aufk occurs 0,

aufnr like afih-aufnr,

end of i_aufk,

begin of i_afih occurs 0,

aufnr like afih-aufnr,

end of i_afih,

begin of it_output occurs 0,

pwert like ordpar-pwert,

waers like ordpar-waers,

end of it_output.

DATA : BEGIN OF i_tree OCCURS 0.

INCLUDE STRUCTURE iflo.

DATA : END OF i_tree.

DATA : ITAB LIKE I_TREE OCCURS 0 WITH HEADER LINE.

select-options : s_catgry for aufk-category, "obligatory,

s_auart for aufk-auart,

s_ilart for afih-ilart,

s_termab for sy-datum, "obligatory,

s_tplnr for iflot-tplnr,

s_iwerk for afih-iwerk,

s_ingpr for afih-ingpr.

parameters : chk_func as checkbox.

*if chk_func = 'X'.

*perform r_select_orders_heirarchy.

*else.

*perform r_select_orders.

*endif.

*

*form r_select_orders_heirarchy.

select tplnr from iflot into table i_iflot where tplnr in s_tplnr.

CALL FUNCTION 'FUNC_LOCATION_ARRAY'

EXPORTING

SELFIELD = 'TPLNR'

  • SPRAS = SY-LANGU

TABSTRUCTURE = 'IFLO'

TABLES

iflo_sel = I_IFLOT

iflo_tab = i_tree

  • EXCEPTIONS

  • NO_ENTRY_FOUND = 1

  • READ_ERROR = 2

  • SELECTION_NOT_POSSIBLE = 3

  • STRUCTURE_NOT_POSSIBLE = 4

  • OTHERS = 5

.

IF sy-subrc <> 0.

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

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

ENDIF.

i_repid = sy-repid.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

  • I_PROGRAM_NAME = i_repid

I_INTERNAL_TABNAME = 'I_TREE'

  • I_STRUCTURE_NAME =

  • I_CLIENT_NEVER_DISPLAY = 'X'

I_INCLNAME = i_repid

  • I_BYPASSING_BUFFER =

  • I_BUFFER_ACTIVE =

CHANGING

ct_fieldcat = int_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.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

  • I_INTERFACE_CHECK = ' '

  • I_BYPASSING_BUFFER = ' '

  • I_BUFFER_ACTIVE = ' '

  • I_CALLBACK_PROGRAM = ' '

  • I_CALLBACK_PF_STATUS_SET = ' '

  • I_CALLBACK_USER_COMMAND = ' '

  • I_CALLBACK_TOP_OF_PAGE = ' '

  • I_CALLBACK_HTML_TOP_OF_PAGE = ' '

  • I_CALLBACK_HTML_END_OF_LIST = ' '

I_STRUCTURE_NAME = 'IFLO'

  • I_BACKGROUND_ID = ' '

  • I_GRID_TITLE =

  • I_GRID_SETTINGS =

  • IS_LAYOUT =

  • IT_FIELDCAT = int_fcat

  • IT_EXCLUDING =

  • IT_SPECIAL_GROUPS =

  • IT_SORT =

  • IT_FILTER =

  • IS_SEL_HIDE =

  • I_DEFAULT = 'X'

  • I_SAVE = ' '

  • IS_VARIANT =

  • IT_EVENTS =

  • 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

  • I_HTML_HEIGHT_TOP = 0

  • I_HTML_HEIGHT_END = 0

  • IT_ALV_GRAPHICS =

  • IT_HYPERLINK =

  • IT_ADD_FIELDCAT =

  • IT_EXCEPT_QINFO =

  • IR_SALV_FULLSCREEN_ADAPTER =

  • IMPORTING

  • E_EXIT_CAUSED_BY_CALLER =

  • ES_EXIT_CAUSED_BY_USER =

TABLES

T_OUTTAB = I_TREE

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

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question