Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
arup_goswami
Explorer

Step by Step creation of Exit type Data Slice for Planning Cube.

It is a very common requirement in SAP IP or BPC 10.1 Embedded or IBP project that data entry protection is required based on business requirement. The standard selection type data slice is not at all helpful to fulfill the business requirement. This article will describe how we can create an exit type data slice on the top of planning cube.

>> Go to se24 and create an exit type data slice class from standard class CL_RSPLS_DS_EXIT_BASE.

>> Press copy and give a different name starting with Z. Save and activate it.

>> You have to write your own code in method IF_RSPLS_DS_METHODS~IS_PROTECTED. The Planning cube contains an info object 0GL_ACCOUNT. In our example we will do some logical check only for 0GL_ACCOUNT. So I have to add below code for G/L account.

FIELD-SYMBOLS <fs_gl_account>  TYPE /bi0/oigl_account.

ASSIGN COMPONENT 'GL_ACCOUNT'      OF STRUCTURE i_s_data TO <fs_gl_account>.

Logic is that you can add many info objects and you can do calculation / business validation in data slice exit. So your business logic check can be achieved within newly created class. After checking the logic if you want to protect the data for update in the cube then you have to add below code.

e_noinput = rs_c_true.

We assume for G/L Account no ‘111101’ no data will be updated in cube then the code for data slice would be below.

FIELD-SYMBOLS <fs_gl_account>  TYPE /bi0/oigl_account.

ASSIGN COMPONENT 'GL_ACCOUNT'      OF STRUCTURE i_s_data TO <fs_gl_account>.

e_noinput = rs_c_false.

If  <fs_gl_account>  = ‘0000111101’.

e_noinput = rs_c_true.

  1. Endif.

>> Activate the class.

>> Add the exit type data slice in cube via rsplan. For Our example we will use G/L account for logical check so we need to select Is restricted as checked.

For your example if you want more info objects will be checked runtime then we have to check those info object in data slice tab.

>> Writing the same code as describe earlier and activate it.

>> We have some planning function in planning cube which will upload the planning data in planning cube. We will run the planning function with below data save as csv file in my local work station. For your case you can take any planning sequence which will change data in planning cube.

>> Run the planning Function to upload the data in planning cube. To check run time we put a brake point in IF_RSPLS_DS_METHODS~IS_PROTECTED.

>> This is the error message we are getting when we run the planning sequence for data upload in planning cube. The error message display can be changed as per your own.

6 Comments
Labels in this area