Rebuild Multiple Cubes through Custom Program
Introduction: Whenever the system refreshed, and then need to delete and rebuild all the cubes for that system. During that time it’s very difficult to rebuild index individually by manual steps. To avoid these kind issues, need to create a Custom program to rebuild all the cubes based on parallel cubes run.
Step by step procedure to create a custom program:
1) Create a custom program like ZRSDDV through tcode SE38. Create a ABAP Editor program to rebuild index for all Cubes.
2) Define a Selection Screen: PARAMETERS: P_QUAN means How many cubes run parallel; we can define in this input parameter.
SELECT-OPTIONS: SO_CUBES means select the multiple cubes which require rebuilding index.
3) Collect the entire cubes name from the selection screen into internal table like gt_list.
LOOP AT so_cubes.
gt_list–infocube = so_cubes–low.
4) Process all infocubes based on p_QUAN (user inputs):
Inside the condition, calling PERFORM BIA_ACTIVATE_FILL. Inside this form, need to check all the cubes which entered in selection screen,
Need to create and Fill BIA index for infocubes through background and SUBMIT standard program RSDDTREX_BIA_ACTIVATE_FILL.
Then check the Job status from table tbtco. Fill the duration of each job finished.
All Jobs are successfully finished then write successful message like:
MESSAGE s216(dbman) WITH ‘BW_TR_RSDDTREX_AGGREGATES_FILL’.
*****How To Execute this program******
1) Go to SE38 Tcode, Put the program name ZRSDDV and pressed execute button.
Always put 3 in Number of info cubes to process and select all the cubes which are going to be rebuilt into infocube in selection field.
How to execute: Go to program and clicked on Execute in Background
Finally go to tcode SM37 and put user id from where executed that program: and pressed continue.
Hence, we can perform multiple cubes at a time to create fill & Rebuild index through that program to execute in background jobs.
This process is useful when after releases system is refreshed so we can use that program to rebuild multiple Cubes for better performance of Queries.