Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Execute HANA stored procedure with input parameters from ECC

Former Member
0 Likes
1,661

Hello HANA Experts,

I have been reading some discussions and I am not able to visualize/understand the following scenario.

Small Description: I have a Report in ECC with a Selection Screen that is executed at runtime. This report will be run by many people with different values. These values will be use as filters and sortings on my Analytic Views in HANA.

I was planning to create a table that stores these values at runtime and replicate via SLT to HANA but I am not sure if this is an efficient way.

Can anyone please suggest or advice how can we pass these values to HANA? Also, can you please let me know how these values can become the trigger point of execution?

Thanks

Hello HANA Experts,

I have been reading some discussions and I am not able to visualize/understand the following scenario.

Small Description: I have a Report in ECC with a Selection Screen that is executed at runtime. This report will be run by many people with different values. These values will be use as filters and sortings on my Analytic Views in HANA.

I was planning to create a table that stores these values at runtime and replicate via SLT to HANA but I am not sure if this is an efficient way.

Can anyone please suggest or advice how can we pass these values to HANA? Also, can you please let me know how these values can become the trigger point of execution?

Thanks

3 REPLIES 3
Read only

vairma
Product and Topic Expert
Product and Topic Expert
0 Likes
812

Hi Oviedo,


Just a thought..this would be the one of the options[but very weird].


You can use APPLY_FILTER SQL Script function available in HANA  SP6. But, as of now APPLY_FILTER doesn't work on Analytic view.

If some how, you can achieve Analytic view logic via Calculation View, then you can use "APPLY_FILTER" on Calculation view.

Following are the steps, you can try once you have converted Analytic view into calculation view:

1. Use the class CL_LIB_SELTAB in ECC system to convert the range table into WHERE Clause string.


DATA(lv_sel_tab) = cl_lib_seltab=>new( it_sel = ABC[] ).

  DATA(lv_where_clause) = lv_sel_tab->sql_where_condition( iv_field = '"ABC"' ).

2. Create HANA procedure with input parameter as varchar and during run time, while calling procedure  in ECC system, you can populate the input parameter of the procedure with the "where clause" string[created at step1].

3. Then within the HANA procedure, you can use "where clause" string passed as input parameter of the procedure, within the  "APPLY_FILTER" function.

For more information on Step 3. you can refer this link 

http://scn.sap.com/community/developer-center/hana/blog/2013/07/01/using-dynamic-filters-in-sap-hana

Best regards,

Vaibhav

Read only

Former Member
0 Likes
812

Hello Vaibhav Kumar.

Cuurently we do not have package SHDB_TOOLS (CL_LIB_SELTAB) in our ECC environment,  Is there another alternative solution to this?

Regards

Read only

yeushengteo
Product and Topic Expert
Product and Topic Expert
0 Likes
812

Hi,

I assumed you are using a side car deployment here?

Will it be possible for you to convert the select-option field into SQL where condition using the FM

RSDS_RANGE_TO_WHERE and just call to the HANA DB via ADBC technique and bypass HANA procedure directly?

Regards.

YS