on 2019 Feb 02 8:32 AM
Hi Team,
I have created a custom planning fuction type. While executing the Planning sequence i am getting dump. Could you please check and let me know if any correction needed for the below code.
class ZCL_CPY_PFTY_01 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 TY_AQPL,
CALMONTH2 TYPE CHAR2 ,
CALYEAR TYPE CHAR4 ,
Z_PROD TYPE CHAR20 ,
ZRC_AMT TYPE INTEGER ,
ZRC_QTY TYPE INTEGER ,
END OF TY_AQPL.
TYPES : TT_AQPL TYPE STANDARD table of TY_AQPL.
CLASS-METHODS MY_HANA_PROCEDURE
IMPORTING VALUE(LT_AGG) TYPE TT_AQPL
EXPORTING VALUE(LT_AG1) TYPE TT_AQPL .
protected section.
private section.
ENDCLASS.
CLASS ZCL_CPY_PFTY_01 IMPLEMENTATION.
METHOD IF_RSPLFA_SRVTYPE_IMP_EXEC~EXECUTE.
EXIT.
endmethod.
METHOD if_rsplfa_srvtype_trex_exec~init_and_check.
e_trex_supported = rs_c_true.
"exit.ENDMETHOD.
METHOD IF_RSPLFA_SRVTYPE_TREX_EXEC~trex_execute.
DATA: l_r_sql_script TYPE REF TO if_rspls_sql_script,
l_procedure_name TYPE string,
l_t_iobj_param TYPE if_rsr_pe_adapter=>tn_t_iobj_param.
l_r_sql_script = cl_rspls_session_store_manager=>get_sql_script_instance( i_r_store = i_r_store ).
l_r_sql_script->get_parameter_values(
EXPORTING
i_r_param_set = i_r_param_set
i_para_name_for_procedure = 'HANA_PROCEDURE_NAME'
IMPORTING
e_procedure_name = l_procedure_name
e_t_iobj_param = l_t_iobj_param ).
l_procedure_name = 'ZCL_CPY_PFTY_01=>MY_HANA_PROCEDURE'.
r_s_view-view = l_r_sql_script->execute_sql_script(
i_view = i_view
i_t_iobj_param = l_t_iobj_param
i_proc_name = l_procedure_name
* i_sql_script_returns_ai = abap_true
i_r_msg = i_r_msg ).
ENDMETHOD.
METHOD MY_HANA_PROCEDURE
BY DATABASE procedure
for hdb
language SQLSCRIPT.
LT_AG1 = SELECT CALMONTH2 ,
'2020' AS CALYEAR ,
Z_PROD ,
ZRC_AMT ,
ZRC_QTY
FROM :LT_AGG;
ENDMETHOD.
ENDCLASS.
If i comment the code e_trex_supported = rs_c_true, then execution is not going into dump. I have attached the dump screenshot. Please adivse on how to proceed.
Request clarification before answering.
How to implement IF_RSPLFA_SRVTYPE_IMP_EXEC interface and her method ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
please add "OPTIONS READ-ONLY" in procedure definition after "FOR HDB LANGUAGE SQLSCRIPT".
In addition please debug ABAP and find out in which stage dump happens...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 40 | |
| 9 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.