Tag Archives: locks

In our planning application we give the central controller the possibility of deleting all locks to the Planning Infocube to prepare for some central functions (as central settlement of all WBSs, or central version copy).

Here is how we proceed.

1) Create a Custom Planning Function type. This planning function type does nothing to the data it receives, but instead removes all locks on the desired Infoprovider. See below the code for the EXECUTE Method and the Settings for the PF Type. Note that the Planning Function has 1 parameter which is the name of the Infoprovider to be unlocked.

2) Create a Planning Function on any Aggregation Level not related to the Planning Cube that you wish to unlock. (Otherwise, the unlock Function might fail due to locking conflicts with the locks it aims to clear!!). Assign a BEx Variable of type Char, Single Value, Mandatory initial not allowed, on 0INFOPROV to the input parameter.

3) Create a filter in such a way that it will always return at least 1 record (otherwise the Planning Functions EXECUTE method will not be called).

4) Create a Planning Sequence on the Aggregation Level above, using the filter and the planning function.

5) Call the Planning Sequence from a BEx Command Button in the BEx Workbook. The button should contain the following command sequence.
CMD 1 EXECUTE_PLANNING_SEQUENCE
PLANNING_SEQUENCE_NAME 1 <name of the Planning Sequence>
VAR_1_NAME 1 <name of variable on 0INFOPROV>
VAR_1_VALUE 1 <name of Infoprovider to unlock>