Skip to end of metadata
Go to start of metadata

Compounded Characteristics and Filters

The following simple examples should help you to better understand the content of the SAP note 1970714

note 1970417 deals with the issue:

Characteristic 0REGION is compounded to 0COUNTRY. The query should be restriced to the value USA/R1. In the Cube the values USA/R1, USA/R2, CAN/R1 and CAN/R2 are booked. In the QueryDesigner you choose 0RGION = USA/R1 and expect to get only this value displayed. But the Query result contains CAN/R1 as well.

The sample quereis are defined on a basis cube with the following content (LISTCUBE output)

The charcteristic 0D_FC_COSTC is compounded to the infoobject 0D_FC_CAREA

Query I

In this example we would like to set the filter 1000/COST1 for the infoobject  0D_FC_COSTC in the QueryDesigner:

Please note that in the right frame 'Chosen Selections' only the value 'COST1' is displayed which already points out the fact that the higher-level characteristic 0D_FC_CAREA isn't restricted. The query result in RSRT:

Please note that 1000/COST1 and 2000/COST1 are displayed ! In other words, all booked cost centers  COST1 are displayed independent of the controling area! 

If you chose the function 'Select filter values...' for the characteristic Cost Center you can select one of these two values

leading to the result

Hence, in this case the concatenated value is used.

Please note that the query behaves the same way when you use a variable instead of a fix restrictions in the QueryDesigner, see Query IV below.

Query II

If you need to define filters (in the QueryDesigner) which should contain the concatenated values (combination of the characteristic values of the 'father' and 'child'), you can use a hierarchy and select the corresponding leaves. The hierarchy can be very simple, e.g.

In the QueryDesigner you then have to select the corresponding leaves, for this sample query we have chosen:

The query result is:

Hence, as desired, we get 'exactly' the two cost centers we have seleted in the QueryDesigner. This is a general property of hierarchies, it always uses the fully concatenated values of compounded InfoObjects!

Query III

In simple cases it is also possible to restrict the higher-level charcteristic (father) instead of using hierarchies. E.g. in order to get the required result of Query I you could also just set a corresponding filter for the Controling Area: 0D_FC_COSTC = 1000. In case you need to select more than one value you need to pay attention to get the desired query result. The sample Query III shows the point you need to take into account:

It looks similar to what we have done in Query II, but the result is different:

The query displays all combinations of the values 1000&2000 and COST1&COST3 !

Query IV

This test query contains a variable regarding CostCenter: 

When we run the query e.g. in RSRT (ABAP BICS mode), the F4 help of the query displayes all values without compounded key. This already points out the fact that the higher-level characteristic 0D_FC_CAREA isn't restricted:

We select COST1:

Query Result:

As in example Query I, please note that 1000/COST1 and 2000/COST1 are displayed ! In other words, all booked cost centers  COST1 are displayed independent of the controling area! 

Summary

Summary

If you need filters refering to the concatenated value of a compounded characteristic please

  • Create a hierarchy and select the corresponding leaves
  • In simple cases you can simply restrict the higher-level characteristic ('father') as well 
  • When you define restrictions dynamically(function 'Select filter values...' ), concatenated values are used as filters

 

 

  • No labels