Reputation: 1
I wrote a test class and tried to run it from RSPLAN
.
I created a planning function in RSPLF1
with these settings:
I enter the planning sequence in RSPLAN
, but when I start it, I get a dump:
UNCAUGHT_EXCEPTION
CX_RSR_X_MESSAGE
SAPLRRMS
BW4-AE
I created a class using the standard interfaces IF_RSPLFA_SRVTYPE_IMP_EXEC
and IF_RSPLFA_SRVTYPE_TREX_EXEC
, and ES_DATA
- completely replicates the aggregation level on which my planning sequence is based.
My full class:
CLASS zicl_rspls_script DEFINITION
PUBLIC FINAL
CREATE PUBLIC.
PUBLIC SECTION.
INTERFACES if_amdp_marker_hdb.
INTERFACES if_rsplfa_srvtype_imp_exec.
INTERFACES if_rsplfa_srvtype_trex_exec.
TYPES:
BEGIN OF es_data,
infoprov TYPE rsinfoprov,
icaccfem TYPE /bic/oiicaccfem,
icbunit TYPE /bic/oiicbunit,
icesuvers TYPE /bic/oiicesuvers,
icfipasst TYPE /bic/oiicfipasst,
icfipproj TYPE /bic/oiicfipproj,
icinesuvr TYPE /bic/oiicinesuvr,
icrstep TYPE /bic/oiicrstep,
icvrplfem TYPE /bic/oiicvrplfem,
ifkeyfig TYPE /bic/oiifkeyfig,
END OF es_data.
" Table type
TYPES et_data TYPE STANDARD TABLE OF es_data WITH EMPTY KEY.
CLASS-METHODS r_calc
IMPORTING VALUE(i_view) TYPE et_data
EXPORTING VALUE(e_view) TYPE et_data.
ENDCLASS.
CLASS zicl_rspls_script IMPLEMENTATION.
METHOD if_rsplfa_srvtype_imp_exec~execute.
ENDMETHOD.
METHOD if_rsplfa_srvtype_imp_exec~finish_execution.
ENDMETHOD.
METHOD if_rsplfa_srvtype_trex_exec~init_and_check.
e_trex_supported = rs_c_true.
ENDMETHOD.
METHOD if_rsplfa_srvtype_imp_exec~init_execution.
ENDMETHOD.
METHOD if_rsplfa_srvtype_trex_exec~trex_execute.
DATA lr_sql_script TYPE REF TO if_rspls_sql_script.
DATA lv_procedure_name TYPE string.
DATA lt_iobj_param TYPE if_rsr_pe_adapter=>tn_t_iobj_param.
lr_sql_script = cl_rspls_session_store_manager=>get_sql_script_instance(
i_r_store = i_r_store ).
lr_sql_script->get_parameter_values(
EXPORTING i_r_param_set = i_r_param_set
i_para_name_for_procedure = 'R_CALC'
IMPORTING e_procedure_name = lv_procedure_name
e_t_iobj_param = lt_iobj_param ).
lv_procedure_name = 'ZICL_RSPLS_SCRIPT=>R_CALC'.
r_s_view-view = lr_sql_script->execute_sql_script(
i_view = i_view
i_t_iobj_param = lt_iobj_param
i_proc_name = lv_procedure_name
i_sql_script_returns_ai = abap_true
i_r_msg = i_r_msg ).
ENDMETHOD.
METHOD r_calc BY DATABASE PROCEDURE FOR HDB
LANGUAGE SQLSCRIPT
OPTIONS READ-ONLY.
E_VIEW = SELECT * FROM I_VIEV;
ENDMETHOD.
ENDCLASS.
If I start debugging, it crashes inside the call to the method execute_sql_script
, marked below with -->
:
lv_procedure_name = 'ZICL_RSPLS_SCRIPT=>R_CALC'.
--> r_s_view-view = lr_sql_script->execute_sql_script(
i_view = i_view
i_t_iobj_param = lt_iobj_param
i_proc_name = lv_procedure_name
i_sql_script_returns_ai = abap_true
i_r_msg = i_r_msg ).
If I go further inside execute_sql_script
, there are some standard functions written by SAP. Since the dump is standard, I think there is an error somewhere in the declaration/syntax, but I can't find it.
The program does not even enter the method R_CALC
.
Below is a source code snippet from the dump message
*... keine Meldung, wenn kein Handler initialisiert
IF g_active IS INITIAL.
return.
ELSE.
l_type = 'W'.
ENDIF.
" if i_r_previous was passed, also print out the exception
IF i_r_previous IS BOUND.
CALL FUNCTION 'RRMS_EXCEPTION_HANDLING'
EXPORTING
i_r_exception = i_r_previous
i_msgty = l_type.
ENDIF.
CALL FUNCTION 'RRMS_MESSAGE_HANDLING'
EXPORTING
i_class = 'BRAIN'
i_type = l_type
i_number = '299'
i_msgv1 = i_program
i_msgv2 = i_text.
ELSE.
DATA: l_text TYPE string,
l_repid TYPE syrepid.
l_repid = i_program.
l_text = i_text.
--> RAISE EXCEPTION TYPE cx_rsr_x_message
EXPORTING
text = l_text
program = l_repid
previous = i_r_previous.
ENDIF.
ENDFUNCTION.
l_text = MATERIALIZE_VIEW-03
l_repid = CL_RSPLS_SESSION_STORE_MANAGER
Contents of system fields
SY-SUBRC 0
SY-INDEX 1
SY-TABIX 0
SY-DBCNT 1
SY-FDPOS 40
SY-LSIND 0
SY-PAGNO 0
SY-LINNO 1
SY-COLNO 1
SY-PFKEY STATUS_2000
SY-UCOMM
SY-TITLE View scheduling sequence
SY-MSGTY E
SY-MSGID RSR_PE
SY-MSGNO 005
SY-MSGV1 2.048
SY-MSGV2 column store error: alterPlanningSession error:
SY-MSGV3 [38001] Session ‘2024122811113532_9870660’ not
SY-MSGV4 valid.#Last error: Condition ‘pi-
SY-MODNO 0
SY-DATUM 20241228
SY-UZEIT 143532
SY-XPROG SAPLRSR_TRANSACTION_HANDLING
SY-XFORM XAB_WFLUSH
I've been trying to find something about the error RSR_PE 005 2.048. On the saphelp forum there was a solution to change the field names in the internal table to different ones from the aggregation level, but unfortunately it didn't help me.
I will be glad for any help/advice.
Upvotes: 0
Views: 62