2012 Oct 09 10:59 AM
Hi,
Can you help me rectify the below error.
| An exception occurred that is explained in detail below. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| The exception, which is assigned to class 'CX_SY_DYN_CALL_PARAM_NOT_FOUND', was | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| not caught in | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| procedure "DISPLAY_ALV_REPORT" "(FORM)", nor was it propagated by a RAISING | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| clause. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Since the caller of the procedure could not have anticipated that the | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| exception would occur, the current program is terminated. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| The reason for the exception is: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Function module "REUSE_ALV_GRID_DISPLAY" was called | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with the parameter "IF_FIELDCAT". | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| This parameter is not defined. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Thanks
2012 Oct 09 11:11 AM
Hi Raj,
The field catalog you have defined is incorrect.
Define the fieldcatalog properly and declare this with reference to Type SLIS_T_FIELDCAT_ALV.
If still not able to solve post your code where in you are building the fieldcatalog and the internal table if_fieldcat is filling.
Rgds,
Sandeep Katoch
2012 Oct 09 11:03 AM
HI,
Field Catalog is Not Defined Propelry
PLease POst Your Code.
2012 Oct 09 11:06 AM
REPORT ZALVGRID_DRILLDOWN.
tables: zekko.
type-pools: slis.
types: begin of t_ekko,
ebeln type zekpo-ebeln,
ebelp type zekpo-ebelp,
aedat type zekpo-aedat,
matnr type zekpo-matnr,
menge type zekpo-menge,
meins type zekpo-meins,
netpr type zekpo-netpr,
peinh type zekpo-peinh,
end of t_ekko.
data: it_ekko type standard table of t_ekko initial size 0,
wa_ekko type t_ekko.
*ALV data declarations.
data: fieldcatalog type slis_t_fieldcat_alv with header line,
gd_tab_group type slis_t_sp_group_alv,
gd_layout type slis_layout_alv,
gd_repid like sy-repid,
gt_events type slis_t_event,
gd_prntparams type slis_print_alv.
******************************************************************
*Start of selection
Start-of-selection.
perform data_retrieval.
perform build_fieldcatalog.
perform build_layout.
perform build_events.
perform build_print_params.
perform display_alv_report.
*&---------------------------------------------------------------------*
*& Form BUILD_FIELDCATALOG
*&---------------------------------------------------------------------*
* Build Fieldcatalog for ALV Report
*----------------------------------------------------------------------*
form build_fieldcatalog.
fieldcatalog-fieldname = 'EBELN'.
fieldcatalog-seltext_m = 'Purchase Order'.
fieldcatalog-col_pos = 0.
fieldcatalog-outputlen = 10.
fieldcatalog-emphasize = 'X'.
fieldcatalog-key = 'X'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'EBELP'.
fieldcatalog-seltext_m = 'PO Item'.
fieldcatalog-col_pos = 1.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'AEDAT'.
fieldcatalog-seltext_m = 'Item Change date'.
fieldcatalog-col_pos = 2.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MATNR'.
fieldcatalog-seltext_m = 'Material Number'.
fieldcatalog-col_pos = 3.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MENGE'.
fieldcatalog-seltext_m = 'PO Quantity'.
fieldcatalog-col_pos = 4.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MEINS'.
fieldcatalog-seltext_m = 'Order Unit'.
fieldcatalog-col_pos = 5.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'NETPR'.
fieldcatalog-seltext_m = 'Net Price'.
fieldcatalog-col_pos = 6.
fieldcatalog-outputlen = 15.
fieldcatalog-do_sum = 'X'.
fieldcatalog-datatype = 'CURR'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'PEINH'.
fieldcatalog-seltext_m = 'Price Unit'.
fieldcatalog-col_pos = 7.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
endform. " BUILD_FIELDCATALOG
*&---------------------------------------------------------------------*
*& Form BUILD_LAYOUT
*&---------------------------------------------------------------------*
* Build layout for ALV grid report
*----------------------------------------------------------------------*
form build_layout.
gd_layout-no_input = 'X'.
gd_layout-colwidth_optimize = 'X'.
gd_layout-totals_text = 'Totals'(201).
endform.
*&--------------------------------------------------------------------*
*& Form DISPLAY_ALV_REPORT
*&---------------------------------------------------------------------*
* Display report using ALV grid
*----------------------------------------------------------------------*
form display_alv_report.
gd_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = gd_repid
i_callback_top_of_page = 'TOP-OF-PAGE'
i_callback_user_commnad = 'USER_COMMAND'
is_layout = gd_layout
if_fieldcat = fieldcatalog[]
it_events = gt_events
is_print = gd_prntparams
i_save = 'X'
TABLES
t_output = 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.
endform.
*&---------------------------------------------------------------------*
*& Form DATA_RETRIEVAL
*&---------------------------------------------------------------------*
* Retrieve data form EKPO table and populate itab it_ekko
*----------------------------------------------------------------------*
form data_retrieval.
select ebeln ebelp aedat matnr menge meins netpr peinh
up to 10 rows
from zekpo
into table it_ekko.
endform.
*-------------------------------------------------------------------*
* Form TOP-OF-PAGE *
*-------------------------------------------------------------------*
* ALV Report Header *
*-------------------------------------------------------------------*
Form top-of-page.
data: t_header type slis_t_listheader,
wa_header type slis_listheader,
t_line like wa_header-info,
ld_lines type i,
ld_linesc(10) type c.
* title
wa_header-typ = 'H'.
wa_header-info = 'EKKO Table Report'.
append wa_header to t_header.
clear wa_header.
* Date
wa_header-typ = 'S'.
wa_header-key = 'Date: '.
concatenate sy-datum+6(2) '.'
sy-datum+4(2) '.'
sy-datum(4) into wa_header-info. "todays date
append wa_header to t_header.
clear wa_header.
* Total No. of Records Selected.
describe table it_ekko lines ld_lines.
ld_linesc = ld_lines.
concatenate 'Total No. of Records Selected: ' ld_linesc into t_line separated by space.
wa_header-typ = 'A'.
wa_header-info = t_line.
append wa_header to t_header.
clear wa_header.
call function 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = t_header.
endform.
*------------------------------------------------------------------*
* FORM USER_COMMAND *
*------------------------------------------------------------------*
* --> R_UCOMM *
* --> RS_SELFIELD *
*------------------------------------------------------------------*
form User_command using r_ucomm like sy-ucomm
rs_selfield type slis_selfield.
case r_ucomm.
when '&ICI'.
* Check field clicked on within ALVgrid report
if rs_selfield-fieldname = 'EBELN'.
* Read data table, using index of row user clicked on
read table it_ekko into wa_ekko index rs_selfield-tabindex.
* set parameter id for transaction screen field.
set parameter id 'BES' field wa_ekko-ebeln.
*execute transaction me23n, and skip initial data entry screen.
call transaction 'ME23N' and skip first screen.
endif.
endcase.
endform.
*&---------------------------------------------------------------------*
*& Form BUILD_EVENTS
*&---------------------------------------------------------------------*
* Build events table
*----------------------------------------------------------------------*
form build_events.
data: ls_event type slis_alv_event.
call function 'REUSE_ALV_EVENTS_GET'
exporting
i_list_type = 0
importing
et_events = gt_events[].
read table gt_events with key name = slis_ev_end_of_page
into ls_event.
if sy-subrc = 0.
move 'END_OF_PAGE' to ls_event-form.
append ls_event to gt_events.
endif.
read table gt_events with key name = slis_ev_end_of_list
into ls_event.
if sy-subrc = 0.
move 'END_OF_LIST' to ls_event-form.
append ls_event to gt_events.
endif.
endform. "BUILD_EVENTS
*&---------------------------------------------------------------------*
*& Form BUILD_PRINT_PARAMS
*&---------------------------------------------------------------------*
* Setup print parameters
*----------------------------------------------------------------------*
form build_print_params.
gd_prntparams-reserve_lines = '3'.
gd_prntparams-no_coverpage = 'X'.
endform.
*&---------------------------------------------------------------------*
*& Form END_OF_PAGE
*&---------------------------------------------------------------------*
form END_OF_PAGE.
data: listwidth type i,
ld_pagepos(10) type c,
ld_page(10) type c.
write: sy-uline(50).
skip.
write: /40 'Page:', sy-pagno.
endform.
*&---------------------------------------------------------------------*
*& Form END_OF_LIST
*&---------------------------------------------------------------------*
form end_of_list.
data: listwidth type i,
ld_pagepos(10) type c,
ld_page(10) type c.
skip.
write:/40 'Page:', sy-pagno.
endform.
2012 Oct 09 11:11 AM
Hi Raj,
The field catalog you have defined is incorrect.
Define the fieldcatalog properly and declare this with reference to Type SLIS_T_FIELDCAT_ALV.
If still not able to solve post your code where in you are building the fieldcatalog and the internal table if_fieldcat is filling.
Rgds,
Sandeep Katoch
2012 Oct 09 11:27 AM
*&--------------------------------------------------------------------*
*& Form DISPLAY_ALV_REPORT
*&---------------------------------------------------------------------*
* Display report using ALV grid
*----------------------------------------------------------------------*
form display_alv_report.
gd_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = gd_repid
i_callback_top_of_page = 'TOP-OF-PAGE'
i_callback_user_commnad = 'USER_COMMAND'
is_layout = gd_layout
if_fieldcat = fieldcatalog[]
it_events = gt_events
is_print = gd_prntparams
i_save = 'X'
TABLES
t_output = 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.
endform.
2012 Oct 09 11:42 AM
Field catalog internal table type should be slis_fieldcat_alv
2012 Oct 09 11:49 AM
Hi Raj,
You have typed wrong name in FM.
Instead of if_fieldcat use it_fieldcat
Hope it helps.
Rgds,
Sandeep katoch
2012 Oct 09 12:02 PM
Hi Raj,
Replace your code in subroutine DISPLAY_ALV_REPORT as below :
form display_alv_report.
gd_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = gd_repid
i_callback_top_of_page = 'TOP-OF-PAGE'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
it_events = gt_events
is_print = gd_prntparams
i_save = 'X'
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.
endform.
You have wrongly coded FM Interface parameter(highlighted in bold) so dump is coming, this will definitely not trigger any dump.
Regards,
Gagan Choudha
2012 Oct 09 12:11 PM
2012 Oct 09 12:24 PM
Thanks you guys...got the error resolved....
it was indeed a type error IT_FIELDCAT instead of IF_FIELDCAT...