Using a Variable to Access a Hierarchy Node Directly - SAP BW

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.
Work Instructions

Step 2. Change the display mode to the create/change mode by clickingclicking.
Display View Maintain variables overview

Step 3. Click new-entriesto create a new variable.
Change view maintain variables overview

Step 4. Name the variable as V_SREG. After entering the other basic information requested,click clickto provide more information.
New entries details of added entries

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 saveto save the variable.
New entries details of added entries

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

Step 6. Return to the query created. Selectpenand then select Change query (global definition)….
Change query

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

Step 8. Select Variable: sales reg. from the left window and move it to the right window by clickingbox-arrow. Next,click okto continue.
Selection for sales

Step 9. ClickClick to save and execute the query.
save and execute the query.

Step 10. Click Yesto save the query.
save the query

Step 11. Click Clickto display the hierarchy nodes.
display the hierarchy nodes

Step 12. Select East,and then clickcontinue.
Select hierarchy nodes

Step 13. Click Clickto continue.


The query result contains only the East region data.
query result

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd Protection Status

SAP BW Topics