cancel
Showing results for 
Search instead for 
Did you mean: 

How to use exit data slice on hana

0 Kudos

Hi,

i tried to implement exit data slices using Hana sql.

It's a simple test scenario:

Aggregation Layer

Multiprovider

Realtime Infocube

I implemented the interface IF_RSPLS_DS_EXIT_HDB to my existing exit class.

For the moment i only return dummy data - no real db scheme or procedure name.

Report RSPLS_PLANNING_ON_HDB_ANALYSIS shows green signs on the Multiprovider.

I set breakpoints to both methods

GET_SQLSCRIPT_PARAMETERS

GET_SQLSCRIPT_INFO

When i run the planning query none of the methods is called - only the existing ABAP implementation.

System SAP BW 7.5 SP 5

I've spent quite some time now debugging the Controller/Mapping classes to find the switch to Hana processing - so any help would be greatly appreciated.

Carsten

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Carsten,

check the following link with information about existing How-To paper, there you can find also a document about SQL Script based implementation of characteristic relationships (very similar to data slices):

https://blogs.sap.com/2016/06/28/sap-how-to-guides-for-bpc-embedded-pakbw-ip-and-analysis-for-office...

As long as you don't return SQL Script method names in if_rspls_ds_exit_hdb, GET_SQLSCRIPT_INFO the system uses the ABAP fallback (check note 1956085 for more information).

Regards,

Gregor

0 Kudos

Hi Gregor,

thanks for your answer.

The methods

GET_SQLSCRIPT_PARAMETERS

GET_SQLSCRIPT_INFO

aren't called, so the system cannot see whether i'm returning real data ir not.

Or is there some other mechanism,that analyzes the method implemenation without calling it?

I've only seen that there's a check if the Interface is implemented - that works fine.

To be sure that the methods weren't called and it's not just a debugger issue, i implemented a division by zero to provoke a dump but it doesn't happen.

Carsten

0 Kudos

Hi Carsten,

if the data slice is only relevant in the visible result set then the ABAP implementation is used; the reason is explained here:

https://scn.sap.com/thread/3766588

You can configure disaggregation or a planning function that runs on HANA the check the SQL implementation.

Regards,

Gregor

0 Kudos

That explains a lot - thanks for the helpfull answer!

0 Kudos

Hi Gregor,

I'm trying to write SQL script in a HANA Database Procedure defined in a method called "AMDP_PROTECTED"

I'm calling the above method as shown below:

method IF_RSPLS_DS_EXIT_HDB~GET_SQLSCRIPT_INFO.

E_PROCEDURE_NAME_PROTECTED = 'ZCL_DATASLICE_01=>AMDP_PROTECTED'.

endmethod.

My question is what Parameters should I define for the method: AMDP_PROTECTED ??

I wanted to read the incoming info objects which are checked as relevant for Data Slice Locks.

If I'm following the ABAP Fallback method (IF_RSPLS_DS_METHODS~IS_PROTECTED) I would typically read the structure i_s_data .. code will look like below:

ASSIGN COMPONENT 'FISCYEAR' OF STRUCTURE i_s_data TO <lv_fiscyear>.

ASSIGN COMPONENT 'ACCOUNT' OF STRUCTURE i_s_data TO <lv_account>.

For a SQL Script based Characteristic Relationship I would define the Import & Export parameters as shown in the below screen shot.

But I'm not sure what to define for Data Slice SQL method - AMDP_PROTECTED ????

0 Kudos

Hi Sreekar,

you can find the information in the documentation:

https://help.sap.com/viewer/0ecf5244825c4742a7b062a89d11c2ac/7.5.12/en-US/83d963a1e4784d988aa20738aa...

Exit data slices on HANA don't work records based as in ABAP, the performance would be really bad. As mentioned in the documentation you get a table of records to be checked and you return the records that are protected by the data slice. The column names of the table are defined in the CONSTRUCTOR of the class, cf. CL_RSPLS_DS_EXIT_BASE, you can read also the parameter documentation in SE24.

Example: Exit data slice on 0FISCVARNT, 0FISCPER that protects first period of year 2010 using fiscal year variant K4.

zcl-gd-ds-exit.txt


Regards,

Gregor


former_member589205
Participant
0 Kudos

Hi Carsten,

Did you manage to make it work based on code example by Gregor? I made some minor changes to Gregor's code to test protecting 0calmonth. It still runs the abap exit instead of SQLScript.

Hi all,

Can someone help to see what I'm doing wrong? zcl-ds-amdp-zwd001-02.txt

Regards,
Wira

0 Kudos

Hi Wira,

i wanted to use the Data Slice on the frontend and there it does not work(ABAP is always used there).

Carsten

Answers (0)