Using a Variable to Access a Hierarchy Node Directly

If the hierarchy is very large, users might want to jump directly to a particular hierarchy node when running a query. One way of achieving this goal is to use variables. Next, we describe a procedure to create a variable.

Work Instructions

Step 1. Log on to the BW system, and then click Maintain Variables or run transaction RSZV.

 

 

SCREEN 5.23

Step 2. Change the display mode to the create/change mode by clicking .

 

 

SCREEN 5.24

Step 3. Click to create a new variable.

 

 

SCREEN 5.25

Step 4. Name the variable as V_SREG. After entering the other basic information requested, click to provide more information.

 

 

SCREEN 5.26

Step 5. Enter IO_SREP in the field Characteristic, as it is associated with the hierarchy. Make other selections as shown in the screen, and then click to save the variable.

 

 

SCREEN 5.27

Next, we will use the new variable to enhance the query IC_DEMOBC_Q01 created in Section 5.1.

Step 6. Return to the query created in Screen 5.14. Select , and then select Change query (global definition)….

 

SCREEN 5.28

Step 7. Right-click Sales rep. ID, and then select Restrict.

 

 

SCREEN 5.29

Step 8. Select Variable: sales reg. from the left window and move it to the right window by clicking . Next, click to continue.

 

 

SCREEN 5.30

Step 9. Click to save and execute the query.

 

 

SCREEN 5.31

Step 10. Click to save the query.

 

 

SCREEN 5.32

Step 11. Click to display the hierarchy nodes.

 

 

SCREEN 5.33

Step 12. Select East, and then click .

 

 

SCREEN 5.34

Step 13. Click to continue.

 

 

SCREEN 5.35

Result

The query result (Screen 5.36) contains only the East region data.

SCREEN 5.36

Категории