cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Implementing Business Logic on HANA

Former Member
0 Kudos
490

  Hello, Gurus.

I have diificulties in implementing Customer Function Types for execution of SQL Scripts.

I created  Class as described in “How To Use Data from Another Aggregation Level”.  http://scn.sap.com/docs/DOC-53376

I also created Planning Function Type where this class is used. But when I try to activate this planning function type I got an error “Class ZCL does not
implement the requested interface IF_RSPLFA_SRVTYPE_IMP_EXEC_REF.

But in generated code through RSPLS_SQL_SCRIPT_TOOL there is no implementation of this class. There is only declaration.

So my question is How this interface should be implemented?

Thanks in advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Marina,

 

I’m sure whether I got your problem correctly.

During creation of a planning function type you have to decide whether the planning function type requires reference date or not. If you activated the checkbox “Reference Data” the implementing class must also implement the interface IF_RSPLFA_SRVTYPE_IMP_EXEC_REF, in case that checkbox is switched off the class must implement interface IF_RSPLFA_SRVTYPE_IMP_EXEC.

Also in the program RSPLS_SQL_SCRIPT_TOOL there exists parameter “Reference Data”. Dependent on this parameter one or the other interface is suggested to be used.

For hints how the interfaces should be implemented please check the documentation for creating customer defined planning function types.

Best Regards,

Hans-Georg Beuter

Former Member
0 Kudos

Thanks a lot for your reply, Hans-Georg

I decided that my type requires reference data, so checkbox “Reference Data” is activated.

As far as I know interface IF_RSPLFA_SRVTYPE_IMP_EXEC_REF (or  IF_RSPLFA_SRVTYPE_IMP_EXEC) is used to implement logic in ABAP.

In my case I want to implement logic with SQL Script, so that planning function could be executed on HANA.

 

I created class ZCL which uses 3 interfaces  if_rsplfa_srvtype_trex_exec_r, if_rsplfa_srvtype_imp_exec_ref,  if_amdp_marker_hdb.

Interface if_rsplfa_srvtype_trex_exec_r has method trex_execute  which calls methods execute_sql_script. And this method (execute_sql_script) contains SQL script which should be run. (I’m not very familiar with ABAP, so please, let me know if I’m wrong).

So can you please clarify:

If I have logic written in SQL script, should I also have the same logic written in ABAP in interface IF_RSPLFA_SRVTYPE_IMP_EXEC_REF?

Any help is appreciated.

Thanks.

Former Member
0 Kudos

Hi Marina,

It is sufficient to implement the methods of the Interface if_rsplfa_srvtype_imp_exec_ref as empty implementations. Nethertheless I’d recommend to return en error message (added into parameter I_R_MSG) in in method IF_RSPLFA_SRVTYPE_IMP_EXEC_REF~EXECUTE.

Better would be to implement the full logic of the planning function in this method as well.

Best Regards,

Hans-Georg Beuter