OBIEE Reporting on SAP BW – BEx Report Key Date

OBIEE Reporting on SAP BW runs via MDX. SAP states that ‘The term time dependency does not exist in Microsoft’s MDX specification”.  This statement comes from the “Mapping Metadata” page of the “Open Analysis Interfaces”  pages for SAP BW.

Time Dependency in MDX

The term time dependency does not exist in Microsoft’s MDX specification. According to this specification, the same hierarchy, and therefore the same key date, has to be used in both MDX and in function BAPI_MDPROVIDER_GET_MEMBERS. Because the current date is always used when you call BAPI_MDPROVIDER_GET_MEMBERS, BW hierarchies with time-dependent names or time-dependent structures are also evaluated with the current key date. Key date variables are also ignored in MDX.

However, you can set a date other than the current date for the current session using function BAPI_MDPROVIDER_SET_KEY_DATE. For consistency reasons, the query key date of all subsequent MDX executions are also replaced by this date.

You use BAPI_MDPROVIDER_GET_KEY_DATE  to get the value that you set using BAPI_MDPROVIDER_SET_KEY_DATE. If no value has been set, this function returns the current date.

You can use these two functions like you use other BAPIs delivered by SAP. Enter the date in the SAP-internal format YYYYMMDD.

Here are some simple situations:
Case 1. Static Key Date value in Query Definition.
InfoObject 0EMPLOYEE with Time Dependent Master Data 0COSTCENTER.
Employee A with Costcenter A in 2013 and Costcenter B in 2014
BEx Query 1
Rows = Employee, Display Attribute Costcenter of Employee, Cot Center
Columns = Number of Records
Filter on Employee A
Key Date = 1/12/2013
BEx Query 2
Same as BEx Query 1 but Key Date set to 1/2/2014

In OBIEE Create 2 Subject Areas for the 2 BEx Queries
Analysis on the subject areas will return the correct Costcenter relative to the Key Date.

Case 2. BEx Ready for Input Single Value Mandatory Variable for Key Date.
BEx Query 3
Same as BEX Query 1 above, but Key Date set to the BEx Variable.
In RPD (OBI Administration the Key Date Variable is visible as Cube Variable)
However when running an OBIEE Analysis an error is returned <>, as stated in the SAP Help.

Leave a Reply