Compounded Characteristics and Filters
The following simple examples should help you to better understand the content of the SAP note 1970714
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