Quantcast
Channel: SCN : Document List - SAP Planning and Consolidation, version for SAP NetWeaver
Viewing all articles
Browse latest Browse all 192

Performing Selective Data Deletion on BPC Models

$
0
0
Introduction

This document will explain how to delete data selectively in a BPC model.

 

Software Components

- SAP BPC 10.0 on SAP NW BW(7.31)

- EPM Addin - Version 10 SP21 .NET4

 

Requirement

SAP BPC provides provision to clear data through data manager package or script logic. However, what each of these approaches do is that they zero out the existing records. Moreover, zero record elimination (compression/Light Optimization) cannot be performed selectively to get rid of those records. You can remove zero records from your template or report through Sheet Options but it could have an impact on other users if the same template is being used.

 

Approach

SAP BW provides a standard program to generate a program for selective deletion - RSDRD_DELETE_FACTS. We will leverage the same program to make it more easy to use for BPC Models.

 

BPC Models in essence are real-time InfoCubes and hence this program will treat them in a similar fashion as other regular InfoCubes. Here is how the initial screen of the program looks like:

BW Program Selection Screen.jpg

When program is executed after the data target has been entered and option to generate selection program has been selected, the field "Name of report" is populated by an ID - which is generated program that can be used to perform selective deletion. It can also be transported as well.

BW Program Executed.jpg

Execute this generated program, it will direct you to the selection screen where all the fields are available for selection. You can make selections based on single values, ranges, exclusions and other operators. You can put selections and save as variant to be called in process chain.

 

 

We will be creating a custom program - ZBPC_DELETE_FACTS where you can make a selection for Environment and its corresponding model for which selective deletion program is required to be generated. We will create a selection screen for selecting BPC Environment and corresponding models in that Environment.

 

BPC Program Selection Screen.jpg

Once you enter the Environment, you will be required to select Model. The program restricts the list of models based on Environment.

Selections.jpg

When the program is executed successfully, it will display the name of the generated program.

Output.jpg

Use this program to create your selection variant. Execute this generated program using SE38 and you will be presented with the selection screen:

Make Selections.jpg

 

After having selected your appropriate selections, you can save it as variant by clicking on "Save" icon.

Variant.jpg

There is an option to simulate your deletion process as well. It will not delete any records but will let you know how many records will be deleted. This could act as a preliminary check when setting up this process.

 

Now you have the program name and the variant and that is all that is needed to execute it via process chain.

 

Remember to turn the BPC Model to Load Mode before calling the program and turn it back to planning mode after selective deletion program has been executed. Now there are standard process types available in the process chain to do that but there you need to provide technical name.

Plan_Load Switch.jpg

It would be better to provide Environment and Model ID for selection as we did above for switching between load mode and planning mode. We can create two small programs whereby we can save variant and call that using process chain.

 

Your process chain will have three programs called in sequence:

- Program with variant to switch BPC Model to Load Mode

- Selective Deletion Program with variant to perform selective deletion of data in BPC Model

- Program with variant to switch BPC Model to Plan Mode

 

You can configure to trigger this process chain using data manager package too.

 

Note

Since the program involves deletion of data, please be careful and liaise with your security and compliance team for any concerns. Use your judgement in using it. I cannot be held liable for any issues that it may cause.


Viewing all articles
Browse latest Browse all 192

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>