You are on page 1of 23

Automation of BW Accelerator

Housekeeping

Applies to:
SAP BW 3.x & SAP BI Net Weaver 2004s. For more information, visit the Business Intelligence homepage.

Summary
The objective of this article is to understand the advantages and steps behind automation of the
housekeeping of BW Accelerator.
Author: Vikram Srivastava
Company: Infosys Technologies Limited
Created on: 17 February 2010

Author Bio
Vikram Srivastava is working as Technology Analyst with Infosys Technologies Limited.
He has got rich experience on various BW Implementation/Support Projects in both SAP
BW 3.5 and SAP BW 7.0.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 1
Automation of BW Accelerator Housekeeping

Table of Contents
Introduction ......................................................................................................................................................... 3
SAP Suggested Usage Scenarios ...................................................................................................................... 3
Data Deletion .................................................................................................................................................. 3
Compression ................................................................................................................................................... 3
Steps to be Followed .......................................................................................................................................... 4
Step by Step Illustration ...................................................................................................................................... 4
Practical Usage Scenarios ................................................................................................................................ 14
Appendix 1: How to Automate Selective Deletion from a Cube ....................................................................... 16
Step by Step Guide ....................................................................................................................................... 16
Related Content ................................................................................................................................................ 22
Disclaimer and Liability Notice .......................................................................................................................... 23

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 2
Automation of BW Accelerator Housekeeping

Introduction
Quite often we want to delete and rebuild the indexes on the Cubes which have BWA index. This should
ideally be done as a part of regular maintenance activities.
Now the first question that comes to our mind is why???
Yes the answer to this is stated below:
If an InfoCube that forms the basis of a BI accelerator index is later compressed or data is deleted from it, we
recommend that you rebuild the BI accelerator index.

SAP Suggested Usage Scenarios


Data Deletion
If you delete data from the InfoCube selectively, the BI accelerator index has to be rebuilt. When you execute
selective deletion, the system automatically deletes the affected BI accelerator index.
When you delete a data package (that is not aggregated) from an InfoCube, the index for the package
dimension table is deleted and rebuilt. The facts in the fact index remain but are “hidden” because they are
no longer referenced by an entry in the package dimension table. Therefore, more entries exist in the index
than in the table of the InfoCube. If you regularly delete data packages, the number of unused records
increases, increasing memory consumption. This can have a negative affect on performance. In this case
you should consider rebuilding the BI accelerator index regularly.

Compression
With BI accelerator indexes you do not have to compress after rolling up data packages. The data on the BI
accelerator server already exists in a read-optimized format.
However, in the following cases it may be useful to rebuild the BI accelerator index, although this is not
strictly necessary.
A BI accelerator index is created for an InfoCube that is not aggregated, or a large number of data packages
are later loaded to this InfoCube. If you compress this InfoCube, more data is contained in the BI accelerator
index than in the InfoCube itself and the data in the BI accelerator index is more granular. If compression
results in a large aggregation factor (>1.5), it may be useful to rebuild the BI accelerator index. This ensures
that the dataset is reduced in the BI accelerator index too.
Non-cumulative Info Cubes, that is Info Cubes with at least one non-cumulative key figure, should still be
reconstructed in large intervals after compression. We recommend this especially if the time to calculate the
markers at query runtime is large.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 3
Automation of BW Accelerator Housekeeping

Steps to be Followed
Ideally the steps that need to be followed for rebuilding the indexes in case of deletion should be:
1. Delete Indexes
2. Delete Data Selectively
3. Rebuild Indexes

Now, it would be even greater if this process is automated to avoid any manual intervention.

Step by Step Illustration


Step 1: Go to TCode RSPC

Create

Step 2: Enter the Technical Name of the process chain and its description

Enter the Technical name of the


process chain and its description

Step 3: Create the Start Variant

Create

Enter the technical name and description

Enter the variant technical name and


its description

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 4
Automation of BW Accelerator Housekeeping

Step 4: Change Scheduling Options and Save

Change Scheduling
Option

Set the scheduling option as immediate.

Save

Start Variant is defined

OK

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 5
Automation of BW Accelerator Housekeeping

Step 5: Click on Process Types

Click on Process Types

Step 6: Drag the ABAP program Process Type

Drag ABAP Program

And create a variant for deletion of Indexes

Create

Enter the description

Enter the technical name


and description of the variant

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 6
Automation of BW Accelerator Housekeeping

Step 7: Enter the program name as „RSDDTREX_INDEX_DELETE‟

Enter the program name as


„RSDDTREX_INDEX_DELETE

Click on
Change

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 7
Automation of BW Accelerator Housekeeping

Step 8: Enter the name of the variant to create it

Enter the
name for the
variant

Click on
Create

Step 9: Click on attributes after checking the check box I_DELETE and entering the names of the cubes for
which index needs to be deleted.

Click on Attributes

Check the check box


I_DELETE and in CUBES
enter the cube name.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 8
Automation of BW Accelerator Housekeeping

And save

Variant is created.
Enter the
description

Click OK, Variant created

Step 10: Now we will create the variant for create index (Initial Activation and Filling of BWA Indexes).

Double click on this


process type

Enter the technical name of the variant and create.

Create

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 9
Automation of BW Accelerator Housekeeping

Click OK on this warning message.

OK

Variant is created.

Enter the description and technical


name of the variant

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 10
Automation of BW Accelerator Housekeeping

Step 11: Specify the details in the process type of create indexes.

Select the Info Cube


Option

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 11
Automation of BW Accelerator Housekeeping

Enter the name of the cube for which index needs to be created.

Enter the name of the


cube

Variant is created.

Click OK, Variant created

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 12
Automation of BW Accelerator Housekeeping

Step 12: Connect the steps and activate to activate the process chain as shown below.

Connect the
steps

Connect the
steps

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 13
Automation of BW Accelerator Housekeeping

Practical Usage Scenarios


The above can be used in all the scenarios mentioned above. Please find the details of the same below:
Scenario 1: Cubes where deletion and recreation of BWA Indexes is required as a part of the
weekly/Monthly Maintenance activity.

Scenario 2: Cubes where compression is a weekly/monthly maintenance activity.

Process Type for Compression can


be used

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 14
Automation of BW Accelerator Housekeeping

Scenario 3: Cubes where Selective Deletion is a part of weekly/monthly activity

Create Automated Selectively


Deletion Program – Check
APPENDIX 1

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 15
Automation of BW Accelerator Housekeeping

Appendix 1: How to Automate Selective Deletion from a Cube


Step by Step Guide
Step 1: Go to TCODE DELETE_FACTS

Enter the TCODE


here

Step 2: Enter the name of the cube and Select “Generate Selection Program” and execute

Enter the name of cube

Select “Generate Selection Program”

Report name is
generated

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 16
Automation of BW Accelerator Housekeeping

Step 3: Go to TCODE SE38 with the above generated program name and execute.

Enter the program name


here

The same Deletion Screen of the cube appears:

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 17
Automation of BW Accelerator Housekeeping

Step 4: Create a Copy of this program

Click
on
COPY

Enter the
program name

Note: This copy program is created as the Generated Program is not transportable.

Copy all the


objects

Copy all objects.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 18
Automation of BW Accelerator Housekeeping

Step 5: Change the referenced of the generated program in the Copy program to point to the main program
and activate.

Change this to
ZBW_SEL_DEL_XXXXXXXXX_GEN_PROG

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 19
Automation of BW Accelerator Housekeeping

Step 6: Execute the Program to check, everything is fine.

Step 7: Next step is to determine deletion is to be done based on which characteristic. For this display to get
the screen field name (e.g. Screen Field Name is C032 for CALWEEK)

Screen Field
Number

Step 8: Go to SE38 and create a new program

Create

Enter the program


name and click on
create

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 20
Automation of BW Accelerator Housekeeping

Step 9: Enter the attributes of the program and Save

Attributes

Save

Step 10: Write the code as shown below and activate.

Write the code


as shown
below

This program will now start deleting the data „Less Than Week 200932‟.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 21
Automation of BW Accelerator Housekeeping

Related Content
http://help.sap.com/saphelp_nw04/helpdata/EN/ca/5c7b3cbd556915e10000000a114084/content.htm
http://help.sap.com/saphelp_nw70/helpdata/en/45/05621f4c09048ae10000000a155369/frameset.htm
http://www.andyross.net/sappress_bia.pdf

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 22
Automation of BW Accelerator Housekeeping

Disclaimer and Liability Notice


This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not
supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.
SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document,
and anyone using these methods does so at his/her own risk.
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or
code sample, including any liability resulting from incompatibility between the content within this document and the materials and
services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this
document.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 23

You might also like