Show TOC

Mapping MetadataLocate this document in the navigation structure

Use
The OLE DB for OLAP specification defines a multidimensional schema. The BW OLE DB for OLAP providers support a subset of metadata objects that appear in this schema. Client applications can request metadata available in a system via the
IDBSchemaRowset
interface implemented by the OLE DB for OLAP providers. This metadata is stored as multidimensional schema rowsets. The MDDataProviderBW object provides these functions in OLAP BAPI.

For more information about special methods for browsing in the BW metadata and master data, seeOLAP BAPI andMDDataProvidersBW.

Features

The following graphic displays the model of BW metadata objects in the OLE DB for OLAP schemas:

The OLE DB for OLAP specification schema concept is not supported by BW.

The following sections describe the relationship between BW metadata objects and the OLE DB for OLAP specification schema in greater detail:

  1. CATALOGS and CUBES

    SAP BW terminology:InfoCube andQuery

    The OLE DB for OLAP specification catalog concept is supported by BW.

    • The schema rowset CATALOG is supported.
    • The CATALOG column, which is filled in all other schema rowsets, specifies the name of the InfoProvider whose data is accessed.

    The current version of SAP's OLE DB for OLAP implementation provides various options of accessing the data stored in an InfoProvider:

    • direct access without queries using the MDX command
      $
      InfoProvider (see variant1: Direct access to the data of an InfoProvider)
    • with queries, created with the BEx Query Designer (see variant2: Access to InfoProvider data using a query)
      Note

      We recommend that you define BEx queries for the requested InfoProvider, and use them as sources (variant2).

    Variant1: Direct access to the data of an InfoProvider

    With certain restrictions, you can directly access data belonging to a BW InfoProvider, using the MDX command
    $
    InfoProvider. This option is available for the following objects:
    • for all InfoCubes having type standard InfoCube and for MultiProviders as Cubes
    • for all characteristics and key figures as Dimensions/Measures

    Exceptions are navigation attributes and key figures that are neither restricted nor calculated.

    The following code extract outlines an example:

SELECT               { [Measures].[0D_DOCUMENT], [Measures].[0D_OORVALSC]                } ON COLUMNS,                NON EMPTY [0D_PLANT].MEMBERS ON ROWS          FROM [$0D_SD_C03]           WHERE ( [0CALMONTH].[200101], [0D_COUNTRY].[US] )

The following figure shows the results table: The number of documents and the open orders are displayed in total and for individual US cities for January 2001.

Variant2: Access to InfoProvider data using a query

The modeling of BEx queries onto Cubes is based on significant common structural features. Characteristics, key figures, and calculated or restricted key figures are selected from underlying InfoProviders for BEx queries. The multi-dimensional dataset of a BEx query is named QUERY_CUBE. No data is replicated when constructing a QUERY_CUBE. Only the query definition is permanently stored in the database. At query runtime, the QUERY_CUBE is filled with the data required to generate the requested dataset.

Dataset

The OLE DB for OLAP interface Dataset is a multidimensional result quantity defined with a MDX command. More information:MDX as Basis of the Interfaces.

Caution

Note that you need to release queries for them to be used in OLE DB for OLAP Providers. In the Query Properties dialog box, set the Allow External AccesstoThis Query flag .  More information:Query Properties (on the Specific tab page).

In the query definition, do not use formulas with the operators %GT, %RT, %CT, SUMGT, SUMRT, SUMCT or LEAF, as these are dependent on the list display in the BEx Analyzer and could return other unexpected values via OLE DB for OLAP or MDX. It is possible to achieve the required result with constant selection. More information:Constant Selection

Do not use variables with replacements from the result of a query that contains input-ready variables. This is because these variables cannot be entered via MDX. You can use variables with type precalculated value set instead of a variable with the processing type replacement path. For more information, seeReplacement Path: Replacement from Query andDetails.

You can also use variables in BEx queries using SAP BW-specific OLE DB for OLAP providers enhancements. For more information, seeSAP Variables.

The following figure illustrates the data flow:

  1. DIMENSIONS

    BW terminology:Characteristics

    A dimension rowset for a cube is filled with all free characteristics and the special MEASURES dimension. BW structures are modeled to dimensions. In the BEx Query Designer, you can set a technical name in the properties of structures or structural components. Otherwise, the UNIQUE-ID (UID) is used. For more information, seeStructure Properties andProperties in the Selection/Formula.

    Dimensions are constructed hierarchically (see HIERARCHIES and LEVELS below).

Note that in BW, aDimension relates to a group of related characteristics, for example, the characteristics relating to time dimension groups such as calendar year or fiscal year.

  1. MEASURES

    BW terminology:Key Figures

    Measures are handled in the OLE DB for OLAP Specification as Members of a special Dimension, the dimension MEASURES.

    The following figure illustrates this:

Calculated and restricted key figures are modeled as Measures by default. They give OLE DB for OLAP interface consumers access to complex key figure definitions. Defining calculated and restricted key figures on the provider-end of the interface has the following advantages:

  • Performance is not compromised.
  • Reduced complexity for the customer.
  • Consistent interpretation and use of derived key figures is guaranteed for various application areas.

At runtime, you can also request other calculations in addition to CALCULATED MEMBER using MDX syntax. For more information, seeExamples for CALCULATED MEMBER.

  1. HIERARCHIES and LEVELS

    Every characteristic in a BEx query is modeled to a dimension with a flat hierarchy in the OLE DB for OLAP interface. The UNIQUE NAME of this Hierarchy is the same as the UNIQUE NAME of the Dimension. This Hierarchy has the following levels:

    • Level 0 with ALL Members (all members are displayed irrespective of their position in the hierarchy).
    • Level 1 with a subset of master data table values.

    BWhierarchies can be modeled as additional Hierarchies. For more information about maintaining BW hierarchies, seeHierarchies.

    Note

    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.

    The field Default Hierarchy for Dimension Rowset is filled with the presentation hierarchy of a BW query definition. For more information about selecting a hierarchy as a presentation hierarchy, seeSelecting Hierarchies and, in particular,Characteristic Properties.

  2. MEMBERS

    BW terminology: Characteristic values (instances of characteristics)

  3. PROPERTIES

    PROPERTIES are the dimension properties (properties for each dimension level).

    BW terminology:Attributes