Skip to Content
Author's profile photo Arup Goswami

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

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.

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Madhavi S Bichakal
      Madhavi S Bichakal

      Thankyou Arup !  Really good document ! This was somehting that we needed for our project ! Keep up the good work.


      Author's profile photo Former Member
      Former Member

      Nice document but how do you call this data slice in a workbook? How to call this data in planning function?How?



      Aditya Bakshi

      Author's profile photo Cornelia Lezoch
      Cornelia Lezoch

      Hi Aditya,


      Data Slices are always called as soon as you read data from the cube where the slice is activated.

      This is done for queries as well as functions.



      Author's profile photo mahesh kosuri
      mahesh kosuri

      Hi Cornelia,

      I have a Question

      if I run planning sequence, will it call data slice or buffered data formed by active data slice?

      Author's profile photo Cornelia Lezoch
      Cornelia Lezoch

      Hi Arup,


      could you add some example, how to include more than one char into the exit data slice.

      for example, how to implement a data slice on the combination of year and version, when

      in one year version 1 and 2 shall be protected

      in another year only version 1 shall be protected.


      thanks and best regards


      Author's profile photo Daniel Elwart
      Daniel Elwart

      H Cornelia,


      just add the needed field-Symbols:

      FIELD-SYMBOLS <fs_version>  TYPE /bi0/oiversion.

      FIELD-SYMBOLS <fs_year>  TYPE /bi0/oicalyear.

      Assign them:

      ASSIGN COMPONENT ‘VERSION’  OF STRUCTURE i_s_data TO <fs_version>.



      Make an If statement:

      if <fs_year> = '2017'.

      if <fs_version> = '001' or <fs_version> = '002'.

      e_noinput = rs_c_true.


      elseif. <fs_year> = '2018'

      if <fs_version> = '001'.

      e_noinput = rs_c_true.


      e_noinput = rs_c_false.




      Don't forget to mark both InfoObjects in the InfoProvider.


      Best regards