cancel
Showing results for 
Search instead for 
Did you mean: 

Data Slices - Deactivating them in an intelligent way

dheeraj_gupta
Employee
Employee
0 Kudos

Hi,

I have data slices on my real-time cubes to lock all past periods from changes. I do that my making use of an Exit Variable, which calculates a range from 001.2010 to current period -1.

I have a process in which I need to overwrite planned sales budgets in the real-time cube with actual sales budgets data from the non-real-time cube for all past period. I will do that my running a copy planning function at the end of every week. For the copy function to work I need the data slices to be inactivate.

My Questions:

1. Is there a way to create a data slice, say type exit, which is intelligent enough to allow execution of a planning function with a specific name ? This 

    solution would be perfect because then I won't have to activate or deactivate data slices !!!  If yes, I'd like to understand how..

2. If there is no solution here,  which function module do I need to use to activate / de-activate data slices. Is it possible to deactivate the data slice and then executing the planning function from within the same process chain? Must I add a wait for a few secs or something between de-activating the dataslice and executing the planning function.

Regards,

Dheeraj

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member210674
Participant
0 Kudos

Hi Dheeraj,

I think below link may give an idea for your requirement

http://scn.sap.com/people/andrey.uryukin/blog/2010/04/12/integrated-planning--how-to-activatedeactiv...

Regards,

Gopi R

0 Kudos

Hi Dheeraj,

in this forum you will find some 'solutions' that update the data slice DB table to activate/deactivate a data slice, but this in general cannot work since the system reads the DB table only once in a user session and buffers the data slice meta data.

You can proceed as follows:

- create an exit data slice; in the implementing class use a static attribute 'active' and implement a method to set/get this attribute. Default is active = true; in this case perform the check, else set e_noinput = false

Now you have to detect whether the special copy function is used or not, If yes you have to switch the 'active' attribute, afterwards you have to switch back. Unfortunately, there is no event 'before function' and 'after function', but you can simulate this with a planning sequence

- the sequence has three steps

-- dummy function F1; does nothing is only used to trigger the 'after_burn_selection' exit; in this exit you get the function name and you do nothing with the selection, you set the 'active' attribute to false and raise a classic function module exception; thus the function will not be executed

-- second step is your special copy function; because of the previous step your data slice is inactive

-- dummy function F2, as in step 1 but reset the 'active' attribute

One may merge step 1 and 2 but then one must not raise the function module exception.

So the after_burn_selection exit is used to simulate the 'before/after function execution events', cf. note 1101726.

This is not completly bullet proof since in case the copy functions fails, you cannot easily cleanup and reset the 'active' flag.

Regards,

Gregor