Skip to Content

Goal

This document describes how to activate/deactivate data slice in Integrated Planning using customers Z function module called within FOX formula.

 

Scenario

Let us consider a scenario where we have data slice based on any characteristic selection.

This data slice is activated, but in some cases you want key user to be able to deactivate data slice, repair some locked data and activate it again.

 

To achieve this functionality we will create function module that activates/deactivates data slice by updating RSPLS_DS table.

This function module will be called from simple FOX formula within IP.

Final product will be page (web or workbook based) for key user with 2 buttons (activate and deactivate data slice).

 

Implementation

Create function module for activation/deactivation:

1. Goto SE37 and create function module (Z_DATA_SLICE_CHANGE_STATUS)

2. Navigate to tab “Import” (parameters imported to your FM) and enter the following parameters:

image

This function module gets the next parameters:

  • 1. InfoProvider technical name.
  • 2. Data slice number.
  • 3. Indicator for activation or deactivation of data slice.

3. Navigate to tab “Source code” and enter the next code:

image

This code activate data slice if I_STATUS=1 and deactivate if 2 (1 or 2, technical name of InfoProvider and data slice number passed from FOX Formula).

4. Activate this function module.

I assume you already created data slice in IP Modeler in InfoProvider tab.

Create planning function for data slice deactivation in Integrated Planning

  1. Run TC RSPLS.
  2. Goto “Planning Functions” tab and create new function type of Formula.
  3. Add next FOX code:

image

In FOX formula use statement CALL FUNCTION with function module Z_DATA_SLICE_CHANGE_STATUS and pass to the function InfoProvider name, data slice number and deactivation flag (I_STATUS = 2).

Create planning function for data slice activation in Integrated Planning

Process the same steps as above, but pass to the function module another value of activation flag (I_STATUS = 1).

Important

To use this function module in FOX formula it is necessary to add the technical name of the function module in transaction SM30 to RSPLF_FDIR table.

Now, according to your user interface type (WAD or workbooks), create 2 buttons (one for activation and other for deactivation) and attach planning functions (or planning sequences if needed) to these buttons accordingly.

The next blog will describe how to activate/deactivate data slice at runtime of planning function/sequence execution.

To report this post you need to login first.

3 Comments

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

  1. Peter Snitker
    Hi,
    your solution works fine, however I have problems imbedding the planning functions in a workbook. When I change status on the dataslice via the flanning functions the buffer is not updated and therefore the status on my data is not updated.

    How do you get arund this problem?

    (0) 
  2. Mikael Karlsson
    Thanks for the blog!

    Initial, when a slice has no values (empty), the solution does not work. Do you have any suggestion to solve the problem?

    Best regards
    Mikael

    (0) 

Leave a Reply