Skip to Content

Getting Dump while executing Custom planning function.

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.

dump1.jpgdump2.jpgdump4.jpg

dump1.jpg (67.9 kB)
dump2.jpg (62.8 kB)
dump4.jpg (59.6 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Feb 05, 2019 at 02:43 PM

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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.