Skip to Content
In one of my blogs (Integrated Planning – how to activate/deactivate data slice) I described how to activate/deactivate data slice in Integrated Planning using customers Z function module called within FOX formula. This technique usefull only for key user and requres restart of planning application, which not always possible or suitable for planning process.
This blog describes how to activate/deactivate data slice at RUNTIME of planning function/sequence.
Let us consider a scenario where we have records marked as LOCKED or UNLOCKED (with any infoobject) and data slice activated on locked records. At the beginning of planning process user updates data (this data marked as unlocked) and at the end he should lock this data by copying records to locked. The challenge is to make possible copying to locked, because data sclice activated on locked data and planning application will give an error. In this blog I’ll describe a solution that makes possible to deactivate data slice for specific steps in planning sequence.
General schema of implementation
1. Creating class which reads LOCK/UNLOCK command and according to this command our code will activate or deactivate data slice.
2. Creating custom function type in IP based on class.
3. Creating planning function based on our custom type. This function type will send command LOCK/UNLOCK to data slice.
4. Creating planning sequence with the next structure: Execute planning function for manipulation of locked records. -> Activate data slice.
5. Creating data slice based on class in IP Modeler. 
Detailed implementation  
Use TCode  SE24 to define a custom exit class. Set superclass to CL_RSPLS_DS_EXIT_BASE class.
Create your own method for implementing locking logic.
Define parameters to the MY_DATASLICE method.
1. I_S_DATA : input data
2. E_T_MESG: messages
3. E_NOINPUT: A Boolean flag. If you want to protect the cell, the set this parameter to X, otherwise leave the parameter blank. image  
Example of custom logic: You want to lock all lines that have marked “Locked” by MD of InfoObject Z_LOCK_IND.
In method MY_DATASLICE apply following code:  
DATA: l_msg TYPE if_rspls_cr_types=>tn_s_mesg .  
IF i_s_data = ‘00001’.    
l_msg-msgid = ‘RSPLS_CR’.     l
_msg-msgty = ‘E’.    
l_msg-msgno = ‘019’.    
l_msg-msgv2 = ‘0001’.   
APPEND l_msg TO e_t_mesg.  
e_noinput = rs_c_true.  
i_s_data contains line value of IO Z_LOCK_IND. If line locked (value = 1) message appears and no input allowed (e_noinput = true). Redefine the standard method IF_RSPLS_DS_METHODS~IS_PROTECTED to include buffering and the data slice switch. image
Add to this redefined method code in appendix A.Save the class and activate it.   For writing command LOCL/UNLOCK define class ZCL_MAINTAIN_DATASLICE for the switching function. Add the interface IF_RSPLFA_SRVTYPE_IMP_EXEC_REF to this class. image
Redefine next methods without adding any code (just redefine and save): IF_RSPLFA_SRVTYPE_IMP_EXEC_REF~INIT_EXECUTION IF_RSPLFA_SRVTYPE_IMP_EXEC_REF~EXECUTE Redefine method IF_RSPLFA_SRVTYPE_IMP_EXEC_REF~GET_REF_DATA_SEL and add code in appendix B. In this method you get the command from planning function (LOCK or UNLOCK) and store ti to SAP memory. This command will be read by IS_PROTECTED method as described above. Save the class and activate it.   Create InfoObject with master data LOCK and UNLOCK values: image
Create function type for switching data slice. Use transaction RSPLF.Set the next properties in function type: image
Go to the Parameter tab. Right-click the Parameter field to add an elementary parameter called COMMAND passed by InfoObject early created (with LOCK/UNLOCK master data).
Save and activate the function type.   Create planning function of type early created type for unlocking data slice. image
In parameter COMMAND select UNLOCK.
This function will deactivate data slice. Planning sequence should have next structure:
1. Deactivate the data slice.
2. Execute your function for manipulating locked records.
3. Activate the data slice (build this function similarly to deactivation function but with LOCK parameter).
Create data slice based on you own class.  Open modeler and navigate to InfoProvider – > Data Slice. Press Cerate and choose in “Data Slice Based On” “for an exit class” parameter.
At “Exit Class” choose your early created custom class.
In “Characteristics that are restricted by the exit class” choose your characteristic(s). image
Data slice should be active by default.

Save your data slice.

To report this post you need to login first.


You must be Logged on to comment or reply to a post.

  1. Former Member
    your solution works fine, my requirement is to pass Data slice Characteristics values dynamically. Can I define Variables (for data slice Chars..) if so how..?


  2. Former Member
    We have around 10 reports built into a web template. The selections for the web template is Region and Fiscal Period
    Each report is restricted to a particular Business Division ( lets say 1 to 10 )

    Each report in the web template has a button “POST”. The requirement is when the user clicks this button, the data in the current report should be locked. Say for example Business Divison = 5, fiscal Period ( selected by User ) = 10/2011, and Region ( selected by User ) = Texas.

    We wouldn’t know what region the user will use as a selection. We have around 40 to 50 regions and its not a good idea to create n number of dataslices considering Region, Fiscal Period, Business Division combinations.

    Hence we want a dynamic solution.
    The dynamic solution should have custom data slice ( as per your web log in link 2 ) and it should operate based on what the user has selected.

    I have created 10 Filters in the modeler with single hardcoded values for Business Divison and two variable for Region and Fiscal Period.

    Intention is to use these filters and a planning function ( lock/unlock ) and use buttons to lock the data.

    Is it possible to achieve above using the custom dataslice?


  3. Former Member


    Very Informative blog. Thanks for sharing.

    Currently we are facing Authorization issues while activating and deactivating data slice for users.

    The data slice gets needs to get activated and deactivated for certain planning sequences which are called in SAP Analysis Office 1.4 SP9 version.

    The planning sequence is called by the particular user. The issue faced is that users do not have 0BI_ALL authorizations.

    Is there any particular authorization to activate and deactivate data slice? We have tried with S_RS_ICUBE auth. But yet the issue remains.




Leave a Reply