open analysis interfaces - ref guide

100
Open Analysis Interfaces ADDON.NDBWODBO Release 30B

Upload: nai-minh-quach

Post on 04-Mar-2015

313 views

Category:

Documents


6 download

TRANSCRIPT

Page 1: Open Analysis Interfaces - Ref Guide

Open Analysis Interfaces

AD

DO

N.N

DB

WO

DB

O

Re lease 30B

Page 2: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Copyright © Copyright 2003 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. Microsoft®, WINDOWS®, NT®, EXCEL®, Word®, PowerPoint® and SQL Server® are registered trademarks of Microsoft Corporation. IBM®, DB2®, DB2 Universal Database, OS/2®, Parallel Sysplex®, MVS/ESA, AIX®, S/390®, AS/400®, OS/390®, OS/400®, iSeries, pSeries, xSeries, zSeries, z/OS, AFP, Intelligent Miner, WebSphere®, Netfinity®, Tivoli®, Informix and Informix® Dynamic ServerTM are trademarks of IBM Corporation in USA and/or other countries. ORACLE® is a registered trademark of ORACLE Corporation. UNIX®, X/Open®, OSF/1®, and Motif® are registered trademarks of the Open Group. Citrix®, the Citrix logo, ICA®, Program Neighborhood®, MetaFrame®, WinFrame®, VideoFrame®, MultiWin® and other Citrix product names referenced herein are trademarks of Citrix Systems, Inc. HTML, DHTML, XML, XHTML are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology. JAVA® is a registered trademark of Sun Microsystems, Inc. JAVASCRIPT® is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MarketSet and Enterprise Buyer are jointly owned trademarks of SAP AG and Commerce One. SAP, SAP Logo, R/2, R/3, mySAP, mySAP.com and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are trademarks of their respective companies.

Open Analysis Interfaces 30B 2

Page 3: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Icons

Icon Meaning

Caution

Example

Note

Recommendation

Syntax

Typographic Conventions

Type Style Description

Example text Words or characters that appear on the screen. These include field names, screen titles, pushbuttons as well as menu names, paths and options.

Cross-references to other documentation. Example text Emphasized words or phrases in body text, titles of graphics and tables.

EXAMPLE TEXT Names of elements in the system. These include report names, program names, transaction codes, table names, and individual key words of a programming language, when surrounded by body text, for example, SELECT and INCLUDE.

Example text Screen output. This includes file and directory names and their paths, messages, source code, names of variables and parameters as well as names of installation, upgrade and database tools.

EXAMPLE TEXT Keys on the keyboard, for example, function keys (such as F2) or the ENTER key.

Example text Exact user entry. These are words or characters that you enter in the system exactly as they appear in the documentation.

<Example text> Variable user entry. Pointed brackets indicate that you replace these words and characters with appropriate entries.

Open Analysis Interfaces 30B 3

Page 4: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Open Analysis Interfaces........................................................................................................... 6 MDX as Basis for the Interfaces ............................................................................................ 9 Mapping the Metadata ......................................................................................................... 11

Examples for CALCULATED MEMBER........................................................................... 16

MDX Leveling....................................................................................................................... 20 SAP Variables...................................................................................................................... 23

BW Specific Enhancement: Schema Rowset SAP VARIABLES..................................... 25

BW-Specific Enhancement: MDX Syntax ........................................................................ 29

OLAP BAPI .......................................................................................................................... 31 MDDataProvider BW ........................................................................................................ 34

MDDataProviderBW.GetCatalogs ................................................................................ 35

MDDataProviderBW.GetCubes .................................................................................... 36

MDDataProviderBW.GetDimensions............................................................................ 37

MDDataProviderBW.GetHierarchies ............................................................................ 38

MDDataProviderBW.GetLevels .................................................................................... 39

MDDataProviderBW.GetMeasures............................................................................... 40

MDDataProviderBW.GetMembers ............................................................................... 41

MDDataProviderBW.GetProperties .............................................................................. 42

MDDataProviderBW.GetVariables ............................................................................... 43

MDDataSetBW ................................................................................................................. 44

MDDataSetBW.CheckSyntax ....................................................................................... 45

MDDataSetBW.CreateObject ....................................................................................... 46

MDDataSetBW.DeleteObject........................................................................................ 47

MDDataSetBW.FindCell ............................................................................................... 48

MDDataSetBW.FindTuple ............................................................................................ 49

MDDataSetBW.GetAxisData ........................................................................................ 50

MDDataSetBW.GetAxisInfo.......................................................................................... 51

MDDataSetBW.GetCellData......................................................................................... 52

MDDataSetBW.SelectData........................................................................................... 53

Parameters ....................................................................................................................... 54

Import Parameter: AllProperties ................................................................................... 56

Import Parameter: LvLNumber ..................................................................................... 57

Import Character: MemType......................................................................................... 58

Import Parameter: Restrictions..................................................................................... 59

Import Parameter: SelectedProperties ......................................................................... 60

Import Parameter: Treeop ............................................................................................ 61

Export Parameter: AggrExceptional ............................................................................. 62

Export Parameter: Catalogs ......................................................................................... 63

Export Parameters: Cubes ........................................................................................... 64

Open Analysis Interfaces 30B 4

Page 5: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Export Parameter: Dimensions..................................................................................... 65

Export Parameter: Hierarchies ..................................................................................... 66

Export Parameter: Levels ............................................................................................. 67

Export Parameter: Measures........................................................................................ 68

Export Parameter: Members......................................................................................... 69

Export Parameter: OptionalProperties.......................................................................... 70

Export Parameter: Properties ....................................................................................... 71

Export Parameter: Variables......................................................................................... 72

Import Parameter: Cmd ................................................................................................ 75

Import Parameter: CmdParams.................................................................................... 76

Import Parameter CommandText ................................................................................. 77

Import Parameter: Members......................................................................................... 78

Import Parameter: Trace............................................................................................... 79

Export Parameter: AxisDimensions.............................................................................. 80

Export Parameter: AxisInfo........................................................................................... 81

Export Parameter: AxisLevels ...................................................................................... 82

Export Parameter: CellData.......................................................................................... 83

Export Parameter: Data ................................................................................................ 84

Export Parameter: DimPrptys....................................................................................... 85

Export Parameter: Fltcolinfo ......................................................................................... 86

Export Parameter: MndtryPrptys .................................................................................. 87

Export Parameter: OptionPrptysKeys........................................................................... 88

Export Parameter: OptionPrptysVals............................................................................ 89

Export Parameter: Return............................................................................................. 90

Error Handling .................................................................................................................. 91

OLE DB for OLAP ................................................................................................................ 92 Installing SAP BW OLE DB for OLAP .............................................................................. 94

Installing Frontend Components................................................................................... 97

Using OLE DB for OLAP Providers.................................................................................. 98

XML for Analysis Purpose.................................................................................................... 99

Open Analysis Interfaces 30B 5

Page 6: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Open Analysis Interfaces Purpose The SAP Business Information Warehouse provides an open architecture in many areas: You can extract data from different systems into a BW system and you can evaluate this data in your reporting using various frontend tools.

The Business Explorer, the frontend component in the SAP Business Information Warehouse provides flexible reporting- and analysis tools for strategic analysis and decision-making support in your organization.

For more information, see:

• Query Design: BEx Query Designer [Extern]

• Web Application Design: BEx Web Application Designer [Extern]

• Analysis & Reporting: BEx Web Applications [Extern]

• BEx Mobile Intelligence [Extern]

• Analysis & Reporting: BEx Analyzer [Extern]

• Formatted Reporting: Crystal Reports Integration [Extern]

• Organization: BEx Browser [Extern]

• Collaboration & Distribution: Integration into the Enterprise Portal [Extern]

The following interfaces are available to connect third-party frontend tools to BW:

• OLE DB for OLAP (ODBO)

• OLAP BAPI (Business Application Programming interface)

• XML for Analysis (XML/A)

All these interfaces are based on MDX (Multi-Dimensional Expressions). You can find additional information from MDX as Basis for the Interfaces [Seite 9].

Integration The following graphic illustrates how the interfaces are integrated in the SAP Business Information Warehouse:

Open Analysis Interfaces 30B 6

Page 7: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

InfoProvider XML/A

OLEDB forOLAP

BAPI

Business Explorer

ThirdParty

Enterprise Portal

MD

X Processor

OLA

P Processor

Data Objects

Virtual ObjectsMulti-Provider

Info-Set

Third-party frontend tools can send query requests to the MDX processor in the BW system via the available interfaces. This processor sends on the request to the OLAP processor. The OLAP processor accesses InfoProviders. These InfoProviders either contain the data objects themselves (InfoProvider with type data target, such as InfoCube, ODS object and InfoObject), or reporting-relevant views of data objects (MultiProvider, RemoteCube, InfoSet).

Features The following table gives an overview of the available interfaces:

OLE DB for OLAP (ODBO) OLAP BAPI XML for Analysis (XML/A)

Technical Basis

• COM (Component Object Model) protocol

• MDX is query request language

• RFC (Remote Function Call) protocol

• MDX is query request language

• XML is exchange format

• HTTP-/SOAP protocol

• MDX is query request language

Prerequisites

driver installed on client system Access library available from all SAP platforms

Platform Independence

Only MS Windows platforms All SAP platforms All platforms

Unicode Capability

Unicode not enabled The caller specifies the required Codepage [Extern] when establishing the RFC connection.

Fully unicode-enabled, by default UTF-8 (Unicode Transformation Format, 8-bit display).

Availability

As of SAP BW 1.2B As of SAP BW 2.0A As of SAP BW 3.0A

The following overview illustrates the options discussed above that are available to access SAP BW data via a particular interface.

Open Analysis Interfaces 30B 7

Page 8: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Client

OLE DB for OLAP

Web Service

Web Browser Rich client

BW Server

BEx

InfoCube ODS Master Data

OLAP ProcessorMetadata

MDX Processor

XML for Analysis OLAP-BAPIs

RFCHTTPSOAP

COM

Constraints Platform Independence

The platform determines which interface is used: OLE DB for OLAP requires MS Windows, OLAP BAPI requires an SAP platform. XML for Analysis is platform-independent.

Unicode Capability

Note that the OLE DB for OLAP interface does not support unicode. The OLAP BAPI interface does support unicode, XML for Analysis supports unicode UTF-8.

Open Analysis Interfaces 30B 8

Page 9: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

MDX as Basis for the Interfaces Definition MDX (multi-dimensional expressions) is a language developed by Microsoft for queries using multi-dimensional data. An MDX expression returns a multi-dimensional result set (dataset) that consists of axis data and cell data.

The syntax of multi-dimensional expressions is defined in the Microsoft specification OLE DB for OLAP.

Structure The following table gives an overview of the most important components of MDX statements:

MDX Component Significance FROM Cube selection

SELECT

ON COLUMNS ON ROWS

Axes definition

Definition of column axes Definition of rows axes

WHERE Filter conditions definition

Example The following example of a MDX request contains the above elements: SELECT { [Measures].[CKF_SI_PROFIT], [Measures].[0D_DOCUMENT], [Measures].[0D_OORVALSC] } ON COLUMNS, NON EMPTY [0D_PLANT].MEMBERS ON ROWS FROM [0D_SD_C03/SAP_DEMO_OLEDB] WHERE ( [0CALMONTH].[200101], [0D_COUNTRY].[US] )

Open Analysis Interfaces 30B 9

Page 10: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

The following graphic shows this example and the

result:

SELECT{ [Measures].[CKF_SI_PROFIT],[Measures].[0D_DOCUMENT], [Measures].[0D_OORVALSC]} ON COLUMNS,NON EMPTY [0D_PLANT].MEMBERSON ROWS

FROM [0D_SD_C03/SAP_DEMO_OLEDB]

WHERE( [0CALMONTH].[200201],[0D_COUNTRY].[US] )

$ 166.665,009,000$ 144.710,00Chicago

$ 46.665,009,000$ 226.487,00Calgary

$ 26.664,006,000$ 95.286,00Manchester

$ 26.664,009,000$ 236.088,00Frankfurt

$ 266.658,0033,000$ 702.571,00

OpenOrders

DocumentNo.

Profit

JAN 2002, USA

Open Analysis Interfaces 30B 10

Page 11: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Mapping the Metadata Use The OLE DB for OLAP specification defines a multi-dimensional schema. The Business Information Warehouse OLE DB for OLAP providers supports a sub-set 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 has the form of multi-dimensional schema rowsets. The MDDataProvider BW object provides these functions in OLAP BAPI.

You can find additional information about special methods to browse in the Business Information Warehouse metadata and master data from OLAP BAPI [Seite 31] and MDDataProvidersBW [Seite 34].

Features The following graphic displays the model of Business Information Warehouse metadata objects in the OLE DB for OLAP

schemas:

Catalog

Schema

Cube

Dimension (Measure)

Hierarchy

Level

Member

Property

InfoCube

Not Supported

Query

InfoObject(Characteristic)

(BW) Hierarchy

Numbered Level or Nameof Dummy Level

Characteristic Value

Display Attribute

OLE DB for OLAP SAP BW

The OLE DB for OLAP specification schema concept is not supported by the Business Information Warehouse.

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

1. CATALOGS and CUBES

BW terminology: InfoCube [Extern] and Query [Extern]

The Catalog concept of the OLE DB for OLAP specification is not supported by the Business Information Warehouse.

− The schema rowset CATALOG is supported.

− The CATALOG column, that is filled in all other schema rowsets, specifies the name of the InfoProvider whose data is accessed.

Open Analysis Interfaces 30B 11

Page 12: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

The current version of SAPs OLE DB for OLAP implementation allows for various options to access 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).

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

Variant1: Direct access to the data of an InfoProvider

With certain restrictions, you can directly access data belonging to a Business Information Warehouse InfoProvider, using the MDX command $InfoProvider. This option is available for the following objects:

− for all InfoCubes having type BasisCube 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 fragment shows an appropriate 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 graphic shows the results table: The number of documents and the open orders are displayed in total and for individual US cities for January 2001.

JAN 2001, USA

Number of documents Open orders

224,000 $ 1.439.134,33

Frankfurt 38,000 $ 93.539,90

Manchester 54,000 $ 187.235,32

Calgary 39,000 $ 187.772,97

Chicago 93,000 $ 970.586,14

Variant2: Access to Data of an InfoProvider using a Query

Open Analysis Interfaces 30B 12

Page 13: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

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 run time, the QUERY_CUBE is filled with the data required to generate the requested data set.

Dataset

The OLE DB for OLAP interface Dataset is a multi-dimensional result quantity defined with a MDX command. You can find additional information from MDX as Basis for the Interfaces [Seite 9].

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 indicator for Allow External Access to This Query. You can find additional information from Query Properties [Extern] (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 desired result with constant selection. You can find additional information under Selecting Constants [Extern].

Do not use variables with replacements from the result of a query which contains entry-ready variables. This is because these variables cannot be entered via MDX. You can use variables with type pre-calculated value set instead of a variable with the processing type replacement path. You can find additional information under Replacement Path: Replacement with Query [Extern] and Details [Extern].

You can also use variables in BEx queries using BW-specific OLE DB for OLAP Providers enhancements. You can find additional information from SAP Variables [Seite 23].

The following graphic illustrates the flow of

data:InfoCube (Basis), MultiProvider

Database Server

OLAP Processor processes QUERY_CUBE (BEx: Query)

Datasets

Response

OLE DB for OLAP

InfoCubes -stored in star schema

SAP BW Application Server

Presentation Server; OLE DB Client

MDX Request

Open Analysis Interfaces 30B 13

Page 14: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

2. DIMENSIONS

BW terminology: Characteristics [Extern]

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. You can find additional information from Structure Properties [Extern] and from Selection/Formula Properties [Extern].

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

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

3. MEASURES

BW terminology: Key Figures [Extern]

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

The following graphic illustrates

this:

Measures

BW Query Structure of QUERY_CUBE

Characteristic 1: Region Dimension1: Region

Char. 2: Fiscal Year Dimension2: Fiscal Year

Char. 3: Customer Dimension3: Customer

Structure for Key Figures

Member1: Costs

Member2: Sold Quantity

Member3: Revenue

Measures-Dimension

Costs

Sold Quantity

Revenue

Variable1: Cost Center SAP Variables Cost Center

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

− There are fewer complexities for the customer

− Consistent interpretation and use of derived key figures is guaranteed for various application areas.

Open Analysis Interfaces 30B 14

Page 15: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

At run time, you can also request other calculations in addition to CALCULATED MEMBER using MDX syntax. You can find additional information under Examples for CALCULATED MEMBER [Seite 16].

4. HIERARCHIES and LEVELS

Every characteristic in a BW 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.

BW hierarchies [Extern] can be established as additional Hierarchies. You can find additional information about maintaining hierarchies in the Administrator Workbench under Hierarchies [Extern].

The field Default Hierarchy for Dimension Rowset is filled with the presentation hierarchy of a BW query definition. You can find additional information about selecting a hierarchy as a presentation hierarchy in the documentation for the BEx Query Designer from Selecting Hierarchies [Extern] and, especially, from Characteristic Properties [Extern].

5. MEMBERS

BW terminology: Characteristic values (instances of characteristics)

6. PROPERTIES

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

BW terminology: Attributes [Extern]

Open Analysis Interfaces 30B 15

Page 16: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Examples for CALCULATED MEMBER You can use the MDX Calculated Member construct to define new Members for special functions, depending on existing Members of Dimensions and Measures. The following examples show how the MDX function Calculated Member is used to:

• Calculate formulas (example 1)

• Filter using multiple values (example 2)

• Calculate the linear regression (example 3)

Example 1 Use Calculated Member to:

• Create formulas ad hoc,

• in which you can use expressions that are not key figures,

• as well as special MDX commands such as CURRENTMEMBER, PREVMEMBER, LEAD and LAG

The OLAP processor returns the figures; the MDX processor makes the calculation.

The following code fragment gives an example of this: At runtime, the Calculated Member profit change from previous month (Profit Change) is calculated by subtracting the Profit for the previous month from the profit for the current month: WITH MEMBER [Measures].[Profit Change] AS '( ([Measures].[CKF_SI_PROFIT]) - ([Measures].[CKF_SI_PROFIT], [0CALMONTH].PREVMEMBER) )' SELECT { [Measures].[CKF_SI_PROFIT], [Measures].[Profit Change] } ON COLUMNS, NON EMPTY [0CALMONTH].[LEVEL01].MEMBERS ON ROWS FROM [0D_SD_C03/SAP_DEMO_ODBO]

The following graphic displays the results table: Both the profit and the profit change against the previous month is shown for all months of the year 2001.

Open Analysis Interfaces 30B 16

Page 17: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Profit Profit Change

JAN 2001 11.324.466,00 * 11.324.466,00 *

FEB 2001 7.767.949,00 * -3.556.517,00 *

MAR 2001 9.598.544,00 * 1.830.595,00 *

APR 2001 7.225.499,00 * -2.373.045,00 *

MAY 2001 9.216.444,00 * 1.990.945,00 *

JUN 2001 12.050.631,00 * 2.834.187,00 *

JUL 2001 14.757.033,00 * 2.706.402,00 *

AUG 2001 558.144,00 MIX -14198889,00

SEP 2001 14.834.377,00 * 14276233,00

OCT 2001 13.158.103,00 * -1.676.274,00 *

NOV 2001 17.673.019,00 * 4.514.916,00 *

DEC 2001 13.833.383,00 * -3.839.636,00 *

Example 2 Using the MDX function AGGREGATE allows you to carry out multiple filtering at run time.

The following MDX fragment gives an example of this. At run time, the filter specified in the WHERE clause is constructed. The system aggregates along the three values in the Calculated Member AGGREGATE function.

WITH MEMBER [0D_PLANT].[Aggregate] AS 'AGGREGATE( { [0D_PLANT].[1111], [0D_PLANT].[2222], [0D_PLANT].[6666] } )' SELECT { [Measures].[CKF_SI_PROFIT], [Measures].[0D_DOCUMENT], [Measures].[0D_OORVALSC] } ON COLUMNS, NON EMPTY [0CALMONTH].[LEVEL01].MEMBERS ON ROWS FROM [0D_SD_C03/SAP_DEMO_ODBO] WHERE ([0D_PLANT].[Aggregate])

The following graphic shows the results table: The system returns the profit, the number of documents, and the open orders for the months in 2001 for the selected values OD_PLANT = 1111,2222,6666.

Open Analysis Interfaces 30B 17

Page 18: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Aggregate

Profit Number of documents Open orders

JAN 2001 7.285.219,00 * 117,000 1.457.574,00 *

FEB 2001 1.739.881,00 * 75,000 764.598,00 *

MAR 2001 4.780.278,00 * 105,000 1.832.472,00 *

APR 2001 2.424.971,00 * 90,000 607.362,00 *

MAY 2001 3.396.595,00 * 108,000 899.562,00 *

JUN 2001 7.353.737,00 * 114,000 1.810.962,00 *

JUL 2001 9.072.158,00 * 142,000 2.409.090,00 *

AUG 2001 558.144,00 MIX 359,000 316.800,00 MIX

SEP 2001 8.229.915,00 * 135,000 3.163.524,00 *

OCT 2001 5.652.256,00 * 99,000 931.890,00 *

NOV 2001 10.243.235,00 * 114,000 3.999.390,00 *

DEC 2001 7.868.259,00 * 117,000 3.779.490,00 *

Example 3 Using Calculated Member also allows you to apply linear regression, a special form of time series analysis. In linear regression, the line of best-fit is calculated from a series of dots. This function can be used to predict future values.

The following code fragment shows an appropriate example: WITH SET [Month] AS YTD( [0CALMONTH].[200112] ) MEMBER [Measures].[Predict] AS LinRegPoint( Rank( [0CALMONTH].CURRENTMEMBER, [Month] ), [Month], [Measures].[CKF_SI_PROFIT], Rank( [0CALMONTH].CURRENTMEMBER, [Month] ) ) SELECT { [Measures].[CKF_SI_PROFIT], [Measures].[Predict] } ON COLUMNS, [Month] ON ROWS FROM [0D_SD_C03/SAP_DEMO_ODBO]

The following graphic displays the results table: The profit is displayed as is the predicted value taken from the linear regression calculation:

Open Analysis Interfaces 30B 18

Page 19: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Profit Predict

JAN 2001 11.324.466,00 * 7991404,68

FEB 2001 7.767.949,00 * 8538385,53

MAR 2001 9.598.544,00 * 9085366,37

APR 2001 7.225.499,00 * 9632347,22

MAY 2001 9.216.444,00 * 10179328,06

JUN 2001 12.050.631,00 * 10726308,91

JUL 2001 14.757.033,00 * 11273289,76

AUG 2001 558.144,00 MIX 11820270,60

SEP 2001 14.834.377,00 * 12367251,45

OCT 2001 13.158.103,00 * 12914232,29

NOV 2001 17.673.019,00 * 13461213,14

DEC 2001 13.833.383,00 * 14008193,99

The following chart depicts the actual profit values per month (blue dots) against the predicted values (red dots) on the line of best-fit:

0,00

2.000.000,00

4.000.000,00

6.000.000,00

8.000.000,00

10.000.000,00

12.000.000,00

14.000.000,00

16.000.000,00

18.000.000,00

20.000.000,00

Jan 2

001

Feb 20

01

MAR 2001

Apr 20

01

MAY 2001

Jun 2

001

Jul 2

001

Aug 20

01

Sep 20

01

OCT 2001

Nov 20

01

DEC 2001

Open Analysis Interfaces 30B 19

Page 20: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

MDX Leveling Definition OLE DB defines interfaces for access to data types that can be stored in different data stores.

In accordance with OLE DB for OLAP criteria, SAP BW has implemented a large part of the specified leveling rules. To get the latest information about SAP BW-specific special features, third-party client applications can check the settings specified in the property set DBPROPSET_DATASOURCEINFO for BW-OLE DB for OLAP providers.

Use SAP BW supports the following leveling rules:

Leveling Rule Property ID and Values

Type of DataSource

The DataSource type is always ‘multi-dimensional’.

ID: DBPROP_DATASOURCE_TYPE

Value: DBPROPVAL_DST_MDP

Flattening

Flattening is fully supported.

ID: MDPROP_FLATTENING_SUPPORT

Value: MDPROPVAL_FS_FULL_SUPPORT

Named Level

Levels with names are supported.

ID: MDPROP_NAMED_LEVEL

Value: MDPROPVAL_NL_NAMEDLEVELS

Join Cubes

Join Cubes are not supported.

ID: MDPROP_MDX_JOINCUBE

Value: MDPROPVAL_MJC_SINGLECUBE

Number of Axes

10 axes are currently supported.

Additional restrictions apply to the number of Dimensions and Hierarchies that are allowed to be used at the same time in a MDX command:

• A maximum of 48 Dimensions, in addition to the MEASURES Dimension

• A maximum of one Hierarchy for each Dimension.

ID: MDPROP_AXES

Refreshing Cell Data

Refreshing cell data is not supported.

ID: MDPROP_AGGREGATECELL_UPDATE

Value: MDPROPVAL_AU_UNSUPPORTED

RangeRowsets

RangeRowsets are only read.

ID: MDPROP_RANGEROWSET

Value: MDPROPVAL_RR_READONLY

Filters/Slicer Axis

SAP BW supports several tuples in a filter, providing that these tuples belong to precisely one and the same dimension or that they can be created as a CROSSJOIN(s) across sets to one and the same Dimension.

In addition, you can use the AGGREGATE function to

ID: MDPROP_MDX_SLICER

Value: MDPROPVAL_MS_MULTIPLETUPLES

Open Analysis Interfaces 30B 20

Page 21: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

enable multiple filters (see Examples for CALCULATED MEMBER [Seite 16]).

Outer Reference

Outer reference is not supported.

ID: MDPROP_MDX_OUTERREFERENCE

Value: Zero

Using Attributes (MDX: Properties)

SAP BW supports queries using dimension properties in a MDX statement.

ID: MDPROP_MDX_QUERYBYPROPERTY

Case commands

Case commands are not supported.

ID: MDPROP_MDX_CASESUPPORT

Value: Zero

String Comparison

SAP BW only supports the “equal” and “unequal” comparison operators for strings.

ID: MDPROP_MDX_STRING_COMPOP

Value: Zero

Descendants Flags

SELF, BEFORE and AFTER are supported in all combinations.

ID: MDPROP_MDX_DESCFLAGS

Value: MDPROPVAL_MD_SELF MDPROPVAL_MD_BEFORE MDPROPVAL_MD_AFTER

Set Functions

As well as the standard functions, the following functions are also supported:

TOPPERCENT, BOTTOMPERCENT, TOPSUM, BOTTOMSUM, DRILLDOWNMEMBER, DRILLDOWNLEVEL, DRILLDOWNMEMBERTOP, DRILLDOWNMEMBERBOTTOM, DRILLDOWNLEVELTOP, DRILLDOWNLEVELBOTTOM, DRILLUPMEMBER, DRILLUPLEVEL, PERIODSTODATE, LASTPERIODS, YTD, QTD, MTD, WTD.

ID: MDPROP_MDX_SET_FUNCTIONS

Value: MDPROPVAL_MSF_TOPPERCENT MDPROPVAL_MSF_BOTTOMPERCENT MDPROPVAL_MSF_TOPSUM MDPROPVAL_MSF_BOTTOMSUM MDPROPVAL_MSF_DRILLDOWNMEMBER MDPROPVAL_MSF_DRILLDOWNLEVEL MDPROPVAL_MSF_DRILLDOWNMEMBERTOP MDPROPVAL_MSF_DRILLDOWNMEMBERBOTTOM MDPROPVAL_MSF_DRILLDOWNLEVELTOP MDPROPVAL_MSF_DRILLDOWNLEVELBOTTOM MDPROPVAL_MSF_DRILLUPMEMBER MDPROPVAL_MSF_DRILLUPLEVEL MDPROPVAL_MSF_YTD MDPROPVAL_MSF_QTD MDPROPVAL_MSF_MTD MDPROPVAL_MSF_WTD

Member Functions

As well as the standard functions, the following functions are also supported:

COUSIN, PARALLELPERIOD, OPENINGPERIOD, CLOSINGPERIOD.

ID: MDPROP_MDX_MEMBER_FUNCTIONS

Value: MDPROPVAL_MMF_COUSIN MDPROPVAL_MMF_PARALLELPERIOD MDPROPVAL_MMF_OPENINGPERIOD MDPROP_MMF_CLOSINGPERIOD

Numerical Functions

As well as the standard functions, the following functions are also supported:

MEDIAN, VAR, STDDEV, RANK; AGGREGATE, COVARIANCE, CORRELATION, LINREGSLOPE,

ID: MDPROP_MDX_NUMERIC_FUNCTIONS

Value: MDPROPVAL_MNF_MEDIAN MDPROPVAL_MNF_VAR MDPROPVAL_MNF_STDDEV MDPROPVAL_MNF_RANK MDPROPVAL_MNF_AGGREGATE

Open Analysis Interfaces 30B 21

Page 22: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

LINREGVARIANCE, LIGREGR2, LINREGPOINT MDPROPVAL_MNF_COVARIANCE MDPROPVAL_MNF_CORRELATION MDPROPVAL_MNF_LINREGSLOPE MDPROPVAL_MNF_LINREGVARIANCE MDPROPVAL_MNF_LIGREGR2 MDPROPVAL_MNF_LINREGPOINT

Formulas

WITH SET/MEMBER and CREATE SET/MEMBER are supported in the local and in the SESSION context.

ID: MDPROP_MDX_FORMULAS

Value: MDPROPVAL_MF_WITH_NAMEDSETS MDPROPVAL_MF_CREATE_NAMEDSETS MDPROPVAL_MF_WITH_CALCMEMBERS MDPROPVAL_MF_CREATE_ CALCMEMBERS MDPROPVAL_MF_SCOPE_SESSION

Numerical Functions in SET Commands

SAP BW supports commands with Dimensions.

ID: MDPROP_MDX_NONMEASURE_EXPRESSONS

Value: MDPROPVAL_NME_ALLDIMENSIONS

Open Analysis Interfaces 30B 22

Page 23: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

SAP Variables Definition In the Business Information Warehouse, Variables [Extern] are a means of parameterizing queries.

Variables can also be used in Open Analysis Interfaces using various BW-specific enhancements to the MDX syntax. In this context, variables are called SAP variables.

You can find additional information about BW-specific enhancements by clicking on the following links:

BW Specific Enhancement: Schema Rowset SAP VARIABLES [Seite 25]

BW-Specific Enhancement: MDX Syntax [Seite 29]

Use Variables function as placeholders for the following objects:

Business Information Warehouse Name Name in OLE DB for OLAP Specification

Characteristic values, hierarchy nodes, pre-calculated value sets

MEMBER_UNIQUE_NAME

Hierarchies HIERARCHY_UNIQUE_NAME

Formula Variables Number Value

Text Variables Strings

Variables for characteristic values, hierarchy nodes and pre-calculated value sets differ from each other in the following ways for the SAP VARIABLES schema rowset REFERENCE_HIERARCHY:

With characteristic variables, REFERENCE_HIERARCHY = REFERENCE_DIMENSION.

With hierarchy node variables, REFERENCE_HIERARCHY is either filled with the hierarchy’s technical name or, with a variable hierarchy, it remains empty. Note: The hierarchy name must also be specified in member HryUnam for method GetMembers for the MDDataProviderBW Business object (see MDDataProviderBW.GetMembers [Seite 41]).

With pre-defined value sets, REFERENCE_HIERARCHY is filled with the corresponding technical name and is never empty.

You can find additional information from BW-Specific Enhancement: SAP VARIABLES Schema Rowset [Seite 25] .

Variables can be displayed as follows:

• a single value such as a MEMBER_UNIQUE_NAME

• an interval as value area

• or complex selection of values (such as a list of single values or intervals connected to one another with OR).

• Selection options (special selection options can be entered via <option>, see BW-Specific Enhancement: MDX Syntax [Seite 29])

Open Analysis Interfaces 30B 23

Page 24: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

You can find additional information about variables in the Business Information Warehouse in the Business Explorer documentation, via the following links:

Variable Types [Extern]

Overview of Variable Types and Processing Types [Extern]

Details [Extern]

Open Analysis Interfaces 30B 24

Page 25: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

BW Specific Enhancement: Schema Rowset SAP VARIABLES Definition The schema rowset SAP VARIABLES contains the list of SAP variables in the rows and, in the columns, information about the properties of SAP variables for a specific QUERY_CUBE.

GUID Number of restrictions Restriction Columns

MDSCHEMA_SAP_VARIABLES 1 CUBE_NAME

Use DEFINE_GUID(MDSCHEMA_SAP_VARIABLES, 0xcaff2c30, 0x30d, 0x11d3, 0x87, 0x1, 0x0, 0x10, 0x5a, 0x18, 0x50, 0x2e);

Structure Column Name Type Indicator Description

CATALOG_NAME DBTYPE_WSTR Name of Catalog to which the Cube belongs

SCHEMA_NAME DBTYPE_WSTR Not Supported

CUBE_NAME DBTYPE_WSTR Name of QUERY_CUBE, to which the variable belongs

VARIABLE_NAME DBTYPE_WSTR Name of variable. A variable name can have leading zeros. For this reason, the provider always returns the name with separators.

VARIABLE_CAPTION DBTYPE_WSTR A description (label or caption) associated with the variables that is mainly used for the display.

VARIABLE_UID DBTYPE_GUID Variable GUID

VARIABLE_ORDINAL DBTYPE_I2 An ordinal number assigned to a variable in the group of variables for a Cube.

VARIABLE_TYPE DBTYPE_I2 Variable type. The following values are possible:

• SAP_VAR_TYPE_MEMBER. The variable is a placeholder for a selection for MEMBER_UNIQUE_NAMES.

• SAP_VAR_TYPE_HIERARCHY. The variable is a placeholder for a HIERARCHY_UNIQUE_NAME.

• SAP_VAR_TYPE_NUMERIC. The variable is a placeholder for a numerical value in formulas

You can find additional information in the Constants section.

DATA_TYPE DBTYPE_UI2 Data type of variable values. Possible entries here are the types appearing in Appendix A of the OLE DB Programmer’s Reference.

CHARACTER_MAXIMUM_ LENGTH

DBTYPE_UI4 Maximum length of variable values having data type Character.

Open Analysis Interfaces 30B 25

Page 26: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

VARIABLE_PROCESSING_TYPE

DBTYPE_UI2 Processing type for variable The following value is possible:

SAP_VAR_PROC_TYPE_USER_INPUT. You can manually enter values for the variable before executing the query.

Only the variables with this processing type are returned to the OLE DB for OLAP interface.

You can find additional information under Overview of Variable Types and Processing Types [Extern].

VARIABLE_SELECTION_TYPE DBTYPE_UI2 Variable selection type. Variables with type SAP_VAR_TYPE_MEMBER allow the selection of single values, intervals and complex selection options with a single variable.

The following values are possible for the selection types:

• SAP_VAR_SEL_TYPE_VALUE. The variable is replaced by a single value. This is the only possible selection type for variables with type NUMERIC.

• SAP_VAR_SEL_TYPE_INTERVAL. The variable is a placeholder for an interval.

• SAP_VAR_SEL_TYPE_COMPLEX. The variable is a placeholder for a complex selection.

You can find additional information about the display areas of variables in BW from Details [Extern].

VARIABLE_ENTRY_TYPE DBTYPE_UI2 Type that displays whether replacing variables is optional or required:

The following values are possible for the entry type:

• SAP_VAR_INPUT_TYPE_OPTIONAL. Specifying a value is optional for this variable.

• SAP_VAR_INPUT_TYPE_MANDATORY. You must specify this variable. When no value is specified for the variable, executing the Statement results in a termination with an error message.

• SAP_VAR_INPUT_TYPE_MANDATORY_NOT_INITIAL. These variables must be specified. When no value is specified for the variable, executing the Statement results in a termination with an error message. An initial field is not a valid entry.

Open Analysis Interfaces 30B 26

Page 27: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

You can find additional information about the creation type of variables in BW from Details [Extern].

REFERENCE_DIMENSION DBTYPE_WSTR This column contains a DIMENSION_UNIQUE_NAME for the parameter type SAP_VAR_TYPE_HIERARCHY.

Note that the Dimension must not appear in the QUERY_CUBE. A value for the hierarchy must be selected from this dimension.

REFERENCE_HIERARCHY DBTYPE_WSTR This column contains a HIERARCHY_UNIQUE_NAME for the variable type SAP_VAR_TYPE_MEMBER.

Note that the hierarchy must not be contained in the QUERY_CUBE.

DEFAULT_LOW Variant Contains either a default value for the variable or is zero.

The current type of this column is the same as the data type displayed in the column DATA_TYPE.

DEFAULT_LOW_CAP DBTYPE_WSTR A description (label or caption) associated with the Default Member.

DEFAULT_HIGH Variant Contains either a default value for the variable or is ZERO. This is only important for variables with the selection type SAP_VAR_SEL_TYPE_INTERVAL and SAP_VAR_SEL_TYPE_SELECTION.

DEFAULT_HIGH_CAP DBTYPE_WSTR A description (label or caption) associated with the Default Member.

DESCRIPTION DBTYPE_WSTR A readable description of the variable.

Integration MDX Statement

To execute an MDX statement that selects data from a parameterized Cube, you need to specify variable values for all obligatory variables in the MDX statement. You can find additional information from BW Specific Enhancement: MDX Syntax [Seite 29].

Constants

In the C coding, use the following define commands for the constants defined in the schema rowset SAP VARIABLES (see column VARIABLE_TYPE).

#define SAP_VAR_TYPE_MEMBER 1 #define SAP_VAR_TYPE_NUMERIC 2 #define SAP_VAR_TYPE_HIERARCHY 3 #define SAP_VAR_PROC_TYPE_USER_INPUT 1

Open Analysis Interfaces 30B 27

Page 28: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

#define SAP_VAR_SEL_TYPE_VALUE 1 #define SAP_VAR_SEL_TYPE_INTERVAL 2 #define SAP_VAR_SEL_TYPE_COMPLEX 3 #define SAP_VAR_INPUT_TYPE_OPTIONAL 0 #define SAP_VAR_INPUT_TYPE_MANDATORY 1 #define SAP_VAR_INPUT_TYPE_MANDATORY_NOT_INITIAL 2

See also:

Documentation for OLAP BAPI MDDataProviderBW:

• MDDataProviderBW.GetVariables [Seite 43]

• Export Parameter: Variables [Seite 72]

Open Analysis Interfaces 30B 28

Page 29: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

BW-Specific Enhancement: MDX Syntax The BW-specific line sap_variables is used as an enhancement to MDX syntax to specify variable values for all obligatory variables in an MDX statement. This line contains a list of name value pairs of SAP variables.

The following production rules are the enhancements that were defined to support a variable value specification in a MDX SELECT statement. Variable support comprises a new clause containing the SAP variables and their values.

<select_statement> : [WITH <formula_specification>] SELECT [<axis_specification> [, <axis_specification>…]] FROM <cube_specification> [WHERE <slicer_specification>] [<cell_props>] [<sap_variable> [[,] <sap_variable>…]]

<sap_variable> : <variable_name> <sign> [<option>] <variable_value>

<sign> : INCLUDING | EXCLUDING

<option> : EQ | GT | GE | LT | LE | NE

<variable_value> : <unique_member_name> | <unsigned_numeric_literal> | <dimension> | <string_value_expression> | <member> : <member> | <character_string_literal> : <character_string_literal> | <unsigned_numeric_literal> : <unsigned_numeric_literal>

Example

Specifying a Single Value for a Variable

SELECT [Measures].members ON COLUMS, NON EMPTY [ODB_CUST].members ON ROWS FROM [ODBOSCEN1/MKTBRANCH] SAP VARIABLES [ODBBRANC] INCLUDING [ODB_BRANC].[CHEM]

Excluding a Single Value for a Variable

SELECT [Measures].members ON COLUMS, NON EMPTY [ODB_CUST].members ON ROWS FROM [ODBOSCEN1/MKTBRANCH] SAP VARIABLES [ODBBRANC] EXCLUDING [ODB_BRANC].[CHEM]

Specifying an Interval as a Value Area for a Variable

SELECT [Measures].members ON COLUMS, NON EMPTY [0CALYEAR].members ON ROWS FROM [ODBOSCEN1/MKTCUST] SAP VARIABLES [ODBCUST] INCLUDING [ODB_CUST].[B01]:[ODB_CUST].[C05]

Specifying a List of Values and Intervals for a Selection Variable

SELECT [Measures].members ON COLUMS, NON EMPTY [ODB_BRANC].members ON ROWS FROM [ODBOSCEN1/MKTPROD] SAP VARIABLES [ODBPROD] INCLUDING [ODB_PROD].[CP01230111] [ODBPROD] INCLUDING [ODB_PROD].[LP10101190] [ODBPROD] INCLUDING [ODB_PROD].[PP98010102]:[ODB_PROD].[PR48666001]

Open Analysis Interfaces 30B 29

Page 30: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Open Analysis Interfaces 30B 30

Page 31: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

OLAP BAPI Purpose OLAP BAPIs (Business Application Programming Interfaces) offer third-parties and customers who program for themselves an industry standard for accessing BW business processes and data, via their own frontend tool.

OLAP BAPIs are defined in the BOR (Business Object Repository) as methods belonging to SAP Business object types. They are implemented as RFC-enabled function modules.

Applications, regardless of their OLAP architecture, can use the available methods to connect to the BW server.

Implementation Considerations You can find information about the technical requisites for using OLAP BAPIs under Open Analysis Interfaces [Seite 1].

Integration SAP BW provides direct access via the BAPI library so as to enable a platform-independent access to the OLAP BAPIs.

Communication takes place via an RFC (Remote Function Call).

Features The following OLAP BAPIs can be selected:

OLAP BAPI Features

MDDataProviderBW [Seite 34] Methods used to browse BW metadata and master data

MDDataSetBW [Seite 44] Methods used to execute multi-dimensional result sets and fetch data

The following graphic provides an overview of the methods for OLAP BAPI MDDataProviderBW:

Open Analysis Interfaces 30B 31

Page 32: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

MDDataProviderBW

GetCatalogs

GetCubes

GetDimensions

GetHierarchies

GetLevels

GetMeasures

GetMembers

GetProperties

GetVariables

The following graphic provides an overview of the methods for OLAP BAPI MDDataSetBW:

MDDataSetBW

CheckSyntax

CreateObject

DeleteObject

FindCell

FindTuple

GetAxisData

GetAxisInfo

GetCellData

SelectData

The BAPI Explorer provides an overview of the dataset of BAPIs to be found in the BOR. You can call it up by going to the SAP Easy Access menu, and choosing Tools → ABAP Workbench → Overview → BAPI Explorer (Transaction BAPI).

Here you can find all SAP Business object/ interface types for which BAPIs were defined in a hierarchical or alphabetical order.

Open Analysis Interfaces 30B 32

Page 33: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

You can find the Business Explorer (with the OLAP BAPIs) and Warehouse Management areas in the hierarchical tree structure under the SAP Business Information Warehouse component.

Open Analysis Interfaces 30B 33

Page 34: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

MDDataProvider BW Definition The Business Object MDDataProviderBW delivers a multi-dimensional provider for BW meta- and master-data.

The following table contains details about the BAPI definition:

Object type BUS6110

Package RSR_MDX

Component BW-BEX

Use MDDataProviderBW is available as of release 46A.

Structure There are the following methods for this OLAP BAPI:

MDDataProviderBW.GetCatalogs [Seite 35]

MDDataProviderBW.GetCubes [Seite 36]

MDDataProviderBW.GetDimensions [Seite 37]

MDDataProviderBW.GetHierarchies [Seite 38]

MDDataProviderBW.GetLevels [Seite 39]

MDDataProviderBW.GetMeasures [Seite 40]

MDDataProviderBW.GetMembers [Seite 41]

MDDataProviderBW.GetProperties [Seite 42]

MDDataProviderBW.GetVariables [Seite 43]

Integration MDDataSetBW [Seite 44] is also available as an additional OLAP BAPI.

Open Analysis Interfaces 30B 34

Page 35: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

MDDataProviderBW.GetCatalogs Functions The GetCatalogs method for the MDDataProviderBW Business Object returns a list of CATALOGS in the BW system.

A CATALOG is an InfoProvider for which one or more BEx queries was released for use in the OLE DB for an OLAP provider. You can find additional information under Mapping Metadata [Seite 11] and Query Properties [Extern].

Notes This method is instance-independent.

Parameters

• Export Parameter: Catalogs [Seite 63]

• Export Parameter: Return [Seite 90] [Seite 90]

Open Analysis Interfaces 30B 35

Page 36: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

MDDataProviderBW.GetCubes Functions The GetCubes method for the MDDataProviderBW Business Object returns a list of BEx Queries released for OLE DB for OLAP. You can restrict the list to a particular CATALOG (a BW InfoProvider).

You can find additional information from Mapping Metadata [Seite 11].

Notes This method is instance-independent.

Parameters

• Import parameter: CatNam

• Import parameter: CubeNam

• Import parameter: CubeType

• Export Parameter: Cubes [Seite 64]

• Export Parameter: Return [Seite 90]

You can find additional information about the importance of individual parameters under Parameters [Seite 54].

Open Analysis Interfaces 30B 36

Page 37: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

MDDataProviderBW.GetDimensions Functions The GetDimensions method for the MDDataProviderBW Business object returns a list of DIMENSIONS (BW InfoObjects with type Characteristic [Extern]) for a particular CUBE (BW query).

There is also a DIMENSION [measures] with type MD_DIMTYPE_MEASURES, which contains all key figures of the query. For queries with tow structures, these are also treated as DIMENSIONS. If a structure contains key figure selections, the structure is interpreted as a DIMENSION with type MD_DIMTYPE_OTHER_NO_AGGREGATION ; any other structure is interpreted as a DIMENSION with type MD_DIMTYPE_UNKNOWN.

You can find additional information from Mapping the Metadata [Seite 11].

Notes This method is instance-independent.

Parameters

• Import parameter: CatNam

• Import parameter: CubeNam

• Import parameter: DimNam

• Import parameter: DimUnam

• Export Parameter: Dimensions [Seite 65]

• Export Parameter: Return [Seite 90]

You can find additional information about the importance of individual parameters under Parameters [Seite 54].

Open Analysis Interfaces 30B 37

Page 38: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

MDDataProviderBW.GetHierarchies Functions The GetHierarchies method for Business object MDDataProviderBW returns a list of hierarchies for a DIMENSION (BW InfoObject with type characteristic) of a CUBE (BEx Query).

All active external hierarchies are returned as a simple (trivial-) hierarchy relating to the master data table for the characteristic.

You can find additional information from Mapping the Metadata [Seite 11].

Notes This method is instance-independent.

Parameters

• Import parameter: HryUnam

• Import parameter: HryNam

• Import parameter: DimUnam

• Import parameter: CubeNam

• Import parameter: CatNam

• Export Parameter: Hierarchies [Seite 66]

• Export Parameter: Return [Seite 90]

You can find additional information about the importance of individual parameters under Parameters [Seite 54].

Open Analysis Interfaces 30B 38

Page 39: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

MDDataProviderBW.GetLevels Functions The GetCatalogs method for the MDDataProviderBW Business Object returns a list of hierarchy LEVELS for a DIMENSION of a CUBE.

You can find additional information from Mapping the Metadata [Seite 11].

Notes This method is instance-independent.

Parameters

• Import parameter: Cat_Nam

• Import parameter: Cube_Nam

• Import parameter: Dim_Unam

• Import parameter: Hry_Unam

• Import parameter: Lvl_Nam

• Import parameter: Lvl_Unam

• Export Parameter: Levels [Seite 67]

• Export Parameter: Return [Seite 90]

You can find additional information about the importance of individual parameters under Parameters [Seite 54].

Open Analysis Interfaces 30B 39

Page 40: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

MDDataProviderBW.GetMeasures Functions The GetMeasures method for the MDDataProviderBW Business object returns a list of MEASURES (BW key figures) for a particular CUBE (BW query).

You can find additional information from Mapping the Metadata [Seite 11].

Notes This method is instance-independent.

Parameters

• Import parameter: CatNam

• Import parameter: CubeNam

• Import parameter MesNam

• Import parameter: MesUnam

• Export Parameter: AggrExceptional [Seite 62]

• Export Parameter: Measures [Seite 68]

• Export Parameter: Return [Seite 90]

You can find additional information about the importance of individual parameters under Parameters [Seite 54].

Open Analysis Interfaces 30B 40

Page 41: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

MDDataProviderBW.GetMembers Functions The GetMembers method for the MDDataProviderBW Business object returns members in accordance with the specified restrictions.

The restrictions must apply a restriction to at least one DIMENSION. The system interprets more than one restriction as being linked with AND.

Notes Parameters

• Import parameter: AllProperties

• Import parameter: CatNam

• Import parameter: CubeNam

• Import parameter: DimUnam

• Import parameter: HryUnam

• Import parameter: LvLNumber

• Import parameter: LvlUnam

• Import parameter: MemCap

• Import parameter: MemType

• Import parameter: MemNam

• Import parameter: MemUnam

• Import Parameter: Restrictions [Seite 59]

• Import Parameter: SelectedProperties [Seite 60]

• Import parameter: Treeop

• Export Parameter: Members [Seite 69]

• Export Parameter: OptionalProperties [Seite 70]

• Export Parameter: Return [Seite 90]

LvlNumber, MemType and Treeop

Note the following special features for the LvlNumber, MemType and Treeop import parameters: These parameters relate to the BAPI6111GEN-CHAR2RESTR field and have the type CHAR with a length of 2 bytes. This can be used to determine whether no restrictions were set to LEVEL or whether a restriction with LEVEL 0 is required. (This distinction could not be made if the corresponding NUMC types were used).

You can find additional information from Parameters [Seite 54].

Open Analysis Interfaces 30B 41

Page 42: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

MDDataProviderBW.GetProperties Functions The GetProperties method for the MDDataProviderBW Business Object returns a list of PROPERTIES of a DIMENSION.

You can find additional information from Mapping the Metadata [Seite 11].

Notes Parameters

• Import parameter: CatNam

• Import parameter: CubeNam

• Import parameter: DimUnam

• Import parameter: HryUnam

• Import parameter: LvlUnam

• Import parameter: MemUnam

• Import parameter: PrptyNam

• Import parameter: PrptyType

• Export Parameter: Properties [Seite 71]

• Export Parameter: Return [Seite 90]

You can find additional information about the importance of individual parameters under Parameters [Seite 54].

Open Analysis Interfaces 30B 42

Page 43: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

MDDataProviderBW.GetVariables Functions The GetVariables method for the MDDataProviderBW Business object returns a list of variables with processing type “Manual Entry/Default Value” for a QUERY_CUBE.

You can find additional information under Variable Processing Types [Extern] and Manual Entry/Default Value [Extern].

Notes Parameters

• Import parameter: CatNam

• Import parameter: CubeNam

• Export Parameter: Variables [Seite 72]

• Export Parameter: Return [Seite 90]

You can find additional information about the importance of individual parameters under Parameters [Seite 54].

Further Information SAP Variables [Seite 23]

BW Specific Enhancement: Schema Rowset SAP VARIABLES [Seite 25]

BW-Specific Enhancement: MDX Syntax [Seite 29]

Open Analysis Interfaces 30B 43

Page 44: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

MDDataSetBW Definition The MDDataSetBW Business object returns a multi-dimensional results set.

The following table contains details about the BAPI definition:

Object type BUS6111

Package RSR_MDX

Component BW-BEX

Use MDDataProviderBW is available as of release 46A.

Structure There are the following methods for this OLAP BAPI:

MDDataSetBW.CheckSyntax [Seite 45]

MDDataSetBW.CreateObject [Seite 46]

MDDataSetBW.DeleteObject [Seite 47]

MDDataSetBW.FindCell [Seite 48]

MDDataSetBW.FindTuple [Seite 49]

MDDataSetBW.GetAxisData [Seite 50]

MDDataSetBW.GetAxisInfo [Seite 51]

MDDataSetBW.GetCellData [Seite 52]

MDDataSetBW.SelectData [Seite 53]

Integration MDDataProviderBW [Seite 34] is also available as an additional OLAP BAPI.

Open Analysis Interfaces 30B 44

Page 45: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

MDDataSetBW.CheckSyntax Functions The CheckSyntax method for the MDDataSetBW Business object checks the syntax of the MDX command for the runtime object with the object handle DataSetID.

Notes Parameters

Export Parameter: Return [Seite 90]

Open Analysis Interfaces 30B 45

Page 46: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

MDDataSetBW.CreateObject Functions The CreateObject method for the MDDataSetBW Business object generates a runtime object for an MDX command in the CommandText.

It returns an object handle DataSetID as an export parameter. This handle must be specified as a parameter in subsequent calls relating to the generated object.

Notes The syntax of the MDX command in the CommandText can then be checked using the CheckSyntax method.

Parameters

• Import Parameter: CommandText [Seite 77]

• Export parameter: DataSetID

• Export Parameter: Return [Seite 90]

You can find additional information about the importance of individual parameters under Parameters [Seite 54].

See also:

• MDDataSetBW.CheckSyntax [Seite 45]

• MDDataSetBW.SelectData [Seite 53]

Open Analysis Interfaces 30B 46

Page 47: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

MDDataSetBW.DeleteObject Functions The DeleteObject method for the MDDataSetBW Business Object removes the COMMAND object handle DataSetID from the stack. As a result, the data set runtime object is deleted.

Notes Parameters

Export Parameter: Return [Seite 90]

Open Analysis Interfaces 30B 47

Page 48: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

MDDataSetBW.FindCell Functions The FindCell method for the MDDataSetBW Business object carries out a search from the start cell of the datset up to the first cell for which the restrictions in members apply. It returns the ordinal number of this cell.

Notes Parameters

• Import Parameter: Members [Seite 78]

• Import Parameter: StartCell

• Export Parameter: Cell

• Export Parameter: Return [Seite 90]

You can find additional information about the importance of individual parameters under Parameters [Seite 54].

Open Analysis Interfaces 30B 48

Page 49: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

MDDataSetBW.FindTuple Functions The FindTupel method for the MDDataSetBW Business object returns the ordinal number of a tuple on the specified axis.

Notes Parameters

• Import parameter: Axis

• Import Parameter: Members [Seite 78]

• Import parameter: StartOrdinal

• Export Parameter: Return [Seite 90]

• Export parameter: Tuple

You can find additional information about the importance of individual parameters under Parameters [Seite 54].

Open Analysis Interfaces 30B 49

Page 50: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

MDDataSetBW.GetAxisData Functions The GetAxisData method for the MDDataSetBW Business object returns data for a tuple on an axis.

The mandatory dimension properties (PROPERTIES) are returned in the MndtryPrptys table. The optional dimension properties are returned in two tables: OptionPrptysKeys and OptionPrptysVals.

• The OptionPrptysKeys table corresponds to the column header of the AxisData rowset in OLE DB for OLAP.

• The OptionPrptysVals table corresponds to the content of these columns.

Notes Parameters

• Import parameter: Axis

• Export Parameter: MndtryPrptys [Seite 87]

• Export Parameter: OptionPrptysKeys [Seite 88]

• Export Parameter: OptionPrptysVals [Seite 89]

• Export Parameter: Return [Seite 90]

You can find additional information about the importance of individual parameters under Parameters [Seite 54].

Open Analysis Interfaces 30B 50

Page 51: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

MDDataSetBW.GetAxisInfo Functions The GetAxisInfo method for the MDDataSetBW Business object returns information for all axes of the dataset.

Notes Parameters

• Export Parameter: AxisDimensions [Seite 80]

• Export Parameter: AxisInfo [Seite 81]

• Export Parameter: AxisLevels [Seite 82]

• Export Parameter: DimPrptys [Seite 85]

• Export Parameter: Fltcolinfo [Seite 86]

• Export Parameter: Return [Seite 90]

Open Analysis Interfaces 30B 51

Page 52: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

MDDataSetBW.GetCellData Functions The GetCellData method for the MDDataSetBW Business object returns data for an area of cells of the dataset.

Notes Parameters

• Import parameter: EndCell

• Import parameter: StartCell

• Export Parameter: CellData [Seite 83]

• Export Parameter: Return [Seite 90]

You can find additional information about the importance of individual parameters under Parameters [Seite 54].

Open Analysis Interfaces 30B 52

Page 53: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

MDDataSetBW.SelectData Functions The SelectData method for the MDDataSetBW Business object executes an MDX command and creates a dataset corresponding to the MDX command.

The entry parameter DataSetID must be set since several MD_COMMAND objects can be processed within a session in parallel. A client application can use the MDDataSetBW.CreateObject method to retrieve such an object handle.

You can find additional information under MDDataSetBW.CreateObject [Seite 46].

The client application can use the following methods to get data as a result set:

• MDDataSetBW.GetAxisData [Seite 50]

• MDDataSetBW.GetAxisInfo [Seite 51]

• MDDataSetBW.GetCellData [Seite 52]

Notes Parameters

• Import Parameter: Cmd [Seite 75]

• Import Parameter: CmdParams [Seite 76]

• Import Parameter: Trace [Seite 79]

• Export Parameter: Return [Seite 90]

Open Analysis Interfaces 30B 53

Page 54: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Parameters Definition Data which is required when executing an object method (import parameter), or which is returned by an object method after a successful call up (export parameter).

The parameters belonging to a method are set within the query definition. The interface for the method call up is set within the parameter definition.

Use The following parameters are used in the MDDataProviderBW OLAP-BAPI:

Import Parameters Export Parameters

AllProperties [Seite 56] AggrExceptional [Seite 62]

CatNam (Restriction: CAT_NAM) Catalogs [Seite 63]

CubeNam (Restriction: CUBE_NAM) Cubes [Seite 64]

CubeType (CUBE type) Dimensions [Seite 65]

DimNam (Restriction: DIM_NAM) Hierarchies [Seite 66]

DimUnam (Restriction: DIM_UNAM) Levels [Seite 67]

HryNam (Restriction: HRY_NAM) Measures [Seite 68]

HryUnam (Restriction: HRY_UNAM) Members [Seite 69]

LvlNam (Restriction: LVL_NAM) OptionalProperties [Seite 70]

LvlNumber [Seite 57] Properties [Seite 71]

LvlUnam (Restriction: LVL_UNAM) Return [Seite 90]

MemCap (Restriction: MEM_CAP) Variables [Seite 72]

MemNam (Restriction: MEM_NAM)

MemType [Seite 58]

MemUnam (Restriction: MEM_UNAM)

MesNam (Restriction: MES_NAM)

MesUnam (Restriction: MES_UNAM)

PrptyNam (Restriction: PRPTY_NAM)

PrptyType (Restriction: PRPTY_TYPE)

Restrictions [Seite 59]

SelectedProperties [Seite 60]

Treeop [Seite 61]

The following parameters are used in the MDDataSetBW OLAP-BAPI:

Import Parameters Export Parameters

Axis (0-based number of axes in the dataset) AxisDimensions [Seite 80]

Cmd [Seite 75] AxisInfo [Seite 81]

CmdParams [Seite 76] AxisLevels [Seite 82]

CommandText [Seite 77] Cell (ordinal number of cell in dataset)

Open Analysis Interfaces 30B 54

Page 55: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

EndCell (ordinal number of cell in dataset) CellData [Seite 83]

EndRow (end row in dataset) Data [Seite 84]

Members [Seite 78] DataSetID (MD_COMMAND-Objekthandle: ID of a runtime object that was generated using the method MDDataSetBW.CreateObject [Seite 46].)

StartCell (ordinal number of cell in dataset) DimPrptys [Seite 85]

StartOrdinal (0-based ordinal number of an axis tuple)

Fltcolinfo [Seite 86]

StartRow (Start row in dataset) MndtryPrptys [Seite 87]

Trace [Seite 79] OptionPrptysKeys [Seite 88]

OptionPrptysVals [Seite 89]

Return [Seite 90]

Tuple (0-based ordinal number of an axis tuple)

Open Analysis Interfaces 30B 55

Page 56: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Import Parameter: AllProperties Short text All properties are required

Significance The client can use AllProperties to determine that all PROPERTIES are required. If this indicator is not set, the SelectedProperties table is interpreted. If this is empty, no PROPERTIES are returned.

You can find additional information under Import Parameter: SelectedProperties [Seite 60].

Open Analysis Interfaces 30B 56

Page 57: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Import Parameter: LvLNumber Short text Restriction: LVL_NUMBER

Significance

Note the following special features of the LvlNumber, MemType and Treeop import parameters: These parameters relate to the BAPI6111GEN-CHAR2RESTR field and have the type CHAR with a length of 2 bytes.

This can be used to determine whether no restrictions were set to LEVEL or whether a restriction with LEVEL 0 is required. (This distinction could not be made if the corresponding NUMC types were used).

See also:

• Import Parameter: MemType [Seite 58]

• Import Parameter: Treeop [Seite 61]

Open Analysis Interfaces 30B 57

Page 58: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Import Character: MemType Short text Restriction: MEM_TYPE Significance

Note the following special features of the LvlNumber, MemType and Treeop import parameters: These parameters relate to the BAPI6111GEN-CHAR2RESTR field and have the type CHAR with a length of 2 bytes.

This can be used to determine whether no restrictions were set to LEVEL or whether a restriction with LEVEL 0 is required. (This distinction could not be made if the corresponding NUMC types were used).

See also:

• Import Parameter: LvlNumber [Seite 57]

• Import Parameter: Treeop [Seite 61]

Open Analysis Interfaces 30B 58

Page 59: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Import Parameter: Restrictions Short text Constraints

Significance The Restrictions parameter consists of a table with the following fields:

Name Description

PRPTY_NAM Property name

SIGN Field SIGN in structure of the SELECT-OPTIONS tables

• I (inclusive) – default setting: The specified single value of area is selected

• E (exclusive): The specified single value of area is excluded from the selection

When combining inclusive and exclusive selections, the system firstly combines all inclusive selections before removing the exclusive ones from them.

OPTION Operator in SELECT OPTIONS and other expressions.

LOW Member name

HIGH Member name

You can find additional information about the individual parameter fields in the corresponding data element documentation in the ABAP Dictionary.

Open Analysis Interfaces 30B 59

Page 60: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Import Parameter: SelectedProperties Short text Selection of the required PROPERTIES

Significance The SelectedProperties parameter consists of a table with the following field:

Name Description

PRPTY_NAM Property name

The provider can use the SelectedProperties table to pre-define a specific number of PROPERTIES (dimension properties), which are required for the selected member in the results set.

The client can use AllProperties to determine that all PROPERTIES are required. If this indicator is not set, the SelectedProperties table is interpreted. If this is empty, no PROPERTIES are returned.

See also:

Import Parameter: AllProperties [Seite 56]

Open Analysis Interfaces 30B 60

Page 61: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Import Parameter: Treeop Short text Restriction: Tree operator

Significance The tree operator can have the following values:

• MDTREEOP_CHILDREN = 1

• MDTREEOP_SIBLINGS = 2

• MDTREEOP_PARENT = 4

• MDTREEOP_SELF = 8

• MDTREEOP_DESCENDANTS = 16

• MDTREEOP_ANCESTORS = 32

The values can be combined using addition.

MDTREEOP_CHILDREN + MDTREEOP_SELF = 1 + 8 = 9

In this case, the member specified with the MemUnam import parameter is returned with its children.

Note the following special features of the LvlNumber, MemType and Treeop import parameters: These parameters relate to the BAPI6111GEN-CHAR2RESTR field and have the type CHAR with a length of 2 bytes.

This can be used to determine whether no restrictions were set to LEVEL or whether a restriction with LEVEL 0 is required. (This distinction could not be made if the corresponding NUMC types were used).

See also:

• Import Parameter: LvlNumber [Seite 57]

• Import Parameter: MemType [Seite 58]

Open Analysis Interfaces 30B 61

Page 62: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Export Parameter: AggrExceptional Short text Key figures with exception aggregation

Significance The AggrExceptional export parameter returns the key figures with exception aggregation as the result.

You can find additional information about exception aggregation under Properties of a Calculated Key Figure [Extern].

The parameter consists of a table with the following fields:

Name Beschreibung

CAT_NAM CATALOG name, to which the CUBE belongs

CUBE_NAM CUBE name

MES_UNAM Member unique name

MES_AGGREGATOR Key figure aggregation behavior

MES_AGGR_EXCEPTIONAL Key figure aggregation behavior with exception aggregation

MES_AGGR_REF_DIM Dimension unique name, the reference characteristic for exception aggregation

Open Analysis Interfaces 30B 62

Page 63: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Export Parameter: Catalogs Short text Result: CATALOGS

Significance The Catalogs export parameter returns CATALOGS as a result.

The parameter consists of a table with the following fields:

Name Description

CAT_NAM CATALOG name, to which the CUBE belongs

Open Analysis Interfaces 30B 63

Page 64: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Export Parameters: Cubes Short text Result: CUBES

Significance The Cubes export parameter returns CUBES as a result.

The parameter consists of a table with the following fields:

Name Description

CAT_NAM CATALOG name, to which the CUBE belongs

CUBE_NAM CUBE name

CUBE_TYPE Type of CUBE

CUBE_UID CUBE unique ID (UUID) in compressed form

CREATED_ON Time the (BW query) CUBE was created; time stamp in UTC format YYYYMMDDhhmmss.

LST_SCHEMA_UPD Time the (BW query) CUBE was last changed; time stamp in UTC format YYYYMMDDhhmmss.

SCHEMA_UPD_BY Last changed by: Name of person who last changed the CUBE- (BW query-) definition.

LST_DATA_UPD Time of last data load; time stamp in UTC format YYYYMMDDhhmmss.

DATA_UPD_BY Last changed by: Name of user who last loaded data

DSCRPTN Description

Open Analysis Interfaces 30B 64

Page 65: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Export Parameter: Dimensions Short text Result: DIMENSIONS

Significance The Dimensions export parameter returns DIMENSIONS as a result.

The parameter consists of a table with the following fields:

Name Description

CAT_NAM CATALOG name, to which the CUBE belongs

CUBE_NAM CUBE name

DIM_NAM DIMENSION name (BW InfoObject with type characteristic)

BW uses a global InfoObject catalog, in which all InfoObjects are stored with their properties for all data structures. For this reason, an InfoObject name can only be allocated once.

DIM_UNAM DIMENSION unique name

DIM_UID Unique ID (UUID) in compressed form

DIM_CAP Description (caption)

DIM_ORDINAL DIMENSION ordinal number within the CUBE

DIM_TYPE DIMENSION type (TIME,MEASURE)

DIM_CARDINALITY DIMENSION cardinality (estimated number of members)

This entry is the highest estimate, but not an exact specification of the number of entities that can be related to one another.

DFLT_HRY Default hierarchy unique name

DSCRPTN Description

You can find additional information about the individual parameter fields in the corresponding data element documentation in the ABAP Dictionary.

Open Analysis Interfaces 30B 65

Page 66: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Export Parameter: Hierarchies Short text Result: HIERARCHIES

Significance The Hierarchies export parameter returns HIERARCHIES as a result.

The parameter consists of a table with the following fields:

Name Description

CAT_NAM CATALOG name, to which the CUBE belongs

CUBE_NAM CUBE name

DIM_UNAM Dimension unique name

HRY_NAM Hierarchy name (uniquely identified with name, version, key day)

hienm30, version3, dateto8

HRY_UNAM Hierarchy unique name

HRY_UID Unique ID (UUID) in compressed form

HRY_CAP Caption

DIM_TYPE Dimension type (TIME, MEASURE)

HRY_CARDINALITY Dimension cardinality (estimated number of members)

DFLT_MEM Member unique name

ALL_MEM Member unique name

DSCRPTN Description

Open Analysis Interfaces 30B 66

Page 67: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Export Parameter: Levels Short text Result: LEVELS

Significance The Levels export parameter returns DIMENSIONS as a result.

The parameter consists of a table with the following fields:

Name Description

CAT_NAM CATALOG name, to which the CUBE belongs

CUBE_NAM CUBE name

DIM_UNAM Dimension unique name

HRY_UNAM Hierarchy unique name

LVL_NAM Hierarchy level unique name

LVL_UNAM Hierarchy level unique name

LVL_UID Unique ID (UUID) in compressed form

LVL_CAP Caption

LVL_NUMBER Distance of member from root node (root = 0)

LVL_CARDINALITY Level cardinality (estimated number of members)

LVL_TYPE Level type (year,month,day..)

DSCRPTN Description

Open Analysis Interfaces 30B 67

Page 68: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Export Parameter: Measures Short text Result: MEASURES

Significance The Measures export parameter returns MEASURES as a result.

The parameter consists of a table with the following fields:

Name Description

CAT_NAM CATALOG name, to which the CUBE belongs

CUBE_NAM CUBE name

MES_NAM Name of key figure

BW uses a global InfoObject catalog, in which all InfoObjects are stored with their properties for all data structures. For this reason, an InfoObject name can only be allocated once.

MES_UNAM Member unique name

MES_CAP Description (caption)

MES_UID Unique ID (UUID) in compressed form

MES_AGGREGATOR MEASURE aggregation behavior (BW InfoObject with type key figure)

DATA_TYPE Data type in ABAP dictionary

NUM_PREC Maximum precision

Maximum precision is only specified for numerical data types

NUM_SCALE Scaling factor (where applicable)

MES_UNITS Unit (where applicable)

Dollars or Unit

DSCRPTN Description

You can find additional information about the individual parameter fields in the corresponding data element documentation in the ABAP Dictionary.

Open Analysis Interfaces 30B 68

Page 69: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Export Parameter: Members Short text Result: MEMBERS

Significance The Members export parameter returns MEMBERS as a result.

The parameter consists of a table with the following fields:

Name Description

LVL_NUMBER Distance of member from root node (root = 0)

MEM_NAM Member name

MEM_UNAM Member unique name

MEM_TYPE Member type

REGULAR, ALL, MEASURE

MEM_UID Unique ID (UUID) in compressed form

MEM_CAP Caption

MEM_ORDINAL General reference field for numerations

CHILDREN Number of children for member

PARENT_LVL Distance of member from root node (root = 0)

PARENT_UNAM Member unique name

DSCRPTN Description

Open Analysis Interfaces 30B 69

Page 70: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Export Parameter: OptionalProperties Short text Result: PROPERTIES

Significance The OptionalProperties export parameter returns PROPERTIES as a result.

The parameter consists of a table with the following fields:

Name Description

MEM_ORDINAL General reference field for numerations

PRPTY_NAM Master data attribute

PRPTY_VAL Attribute value

Open Analysis Interfaces 30B 70

Page 71: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Export Parameter: Properties Short text Result: PROPERTIES

Significance The Properties export parameter returns PROPERTIES as a result.

The parameter consists of a table with the following fields:

Name Description

CAT_NAM CATALOG name, to which the CUBE belongs

CUBE_NAM CUBE name

DIM_UNAM Dimension unique name

HRY_UNAM Hierarchy unique name

LVL_UNAM Hierarchy level unique name

MEM_UNAM Member unique name

PRPTY_TYPE Property type

MEMBER, CELL

PRPTY_NAM Property name

PRPTY_CAP Caption

DATA_TYPE Data type in ABAP dictionary

CHR_MAX_LEN Maximum length of a value in characters or bytes

CHR_OCT_LEN Maximum length of an attribute value in bytes, where a char is involved

NUM_PREC Maximum precision

Maximum precision is only specified for numerical data types

NUM_SCALE Scaling factor (where applicable)

DSCRPTN Description

You can find additional information about the individual parameter fields in the corresponding data element documentation in the ABAP Dictionary.

Open Analysis Interfaces 30B 71

Page 72: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Export Parameter: Variables Short text Result: VARIABLES

Significance The Variables export parameter returns VARIABLES as a result.

The parameter consists of a table with the following fields:

Name Description

CAT_NAM CATALOG name, to which the CUBE belongs

CUBE_NAM Name of CUBE, to which the variable belongs

VAR_NAM Variable technical name (including the separator ‘[‘)

VAR_CAP Caption

VAR_UID Unique ID (UUID) in compressed form, variable GUID

VAR_ORDINAL General reference field for numerations; An ordinal number assigned to a variable in the group of variables for a CUBE.

VAR_TYPE Variable type; this field corresponds to the VARIABLE_TYPE column of the SAP VARIABLES Schema-rowset The following values are possible:

• SAP_VAR_TYPE_MEMBER

• SAP_VAR_TYPE_HIERARCHY

• SAP_VAR_TYPE_NUMERIC

You can find additional information from BW Specific Enhancement: SAP VARIABLES schema-rowset [Seite 25] .

DATA_TYPE Data type in ABAP dictionary

• char for SAP_VAR_TYPE_MEMBER and SAP_VAR_TYPE_HIERARCHY types

• fltp for SAP_VAR_TYPE_NUMERIC type

CHR_MAX_LEN Maximum length of a variable value in characters or bytes

VAR_PROC_TYPE Variable processing type; this field corresponds to the VARIABLE_PROCESSING_TYPE column of the SAP VARIABLES Schema-rowset

The value is always SAP_VAR_PROC_TYPE_USER_INPUT. Only variables with the “manual entry/default value” processing type are returned to the OLAP BAPI MDDataProvider BW.

Open Analysis Interfaces 30B 72

Page 73: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

You can find additional information from BW Specific Enhancement: SAP VARIABLES schema-rowset [Seite 25] .

VAR_SELC_TYPE Variable selection type; this field corresponds to the VARIABLE_SELECTION_TYPE column of the SAP VARIABLES Schema-rowset The following values are possible:

• SAP_ VAR _SEL_TYPE_VALUE

• SAP_ VAR _SEL_TYPE_INTERVAL

• SAP_ VAR _SEL_TYPE_COMPLEX

You can find additional information from BW Specific Enhancement: SAP VARIABLES schema-rowset [Seite 25] .

VAR_ENTRY_TYPE Variable entry type; this field corresponds to the VARIABLE_ENTRY_TYPE column of the SAP VARIABLES Schema-rowset The following values are possible:

• SAP_VAR_INPUT_TYPE_OPTIONAL

• SAP_VAR_INPUT_TYPE_MANDATORY

• SAP_VAR_INPUT_TYPE_MANDATORY_NOT_INITIAL

You can find additional information from BW Specific Enhancement: SAP VARIABLES schema-rowset [Seite 25] .

REF_DIM Dimension unique name; this field corresponds to the REFERENCE_DIMENSION column of the SAP VARIABLES Schema rowset.

For variables having type SAP_VAR_TYPE_MEMBER, this field determines from which DIMENSION values for the variable can be selected.

REF_HRY Hierarchy unique name; this field corresponds to the REFERENCE_HIERARCHY column of the SAP VARIABLES Schema rowset.

For variables having type SAP_VAR_TYPE_MEMBER, this field determines from which HIERARCHY values for the variable can be selected.

DFLT_LOW Member unique name, default value for variable (if available)

DFLT_HIGH Member unique name, default value for variable (if available)

DFLT_LOW_CAP Description for default value for variable (if available)

DFLT_HIGH_CAP Description for default value for variable (if available)

DSCRPTN Variable description

Open Analysis Interfaces 30B 73

Page 74: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

You can find additional information about the individual parameter fields in the corresponding data element documentation in the ABAP Dictionary.

Open Analysis Interfaces 30B 74

Page 75: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Import Parameter: Cmd Short text Parser byte code (for OLE DB for OLAP providers).

Significance The parameter consists of a table with the following fields:

Name Description

CMD_ID MDX processor command internal ID

Open Analysis Interfaces 30B 75

Page 76: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Import Parameter: CmdParams Short text Parser parameter (for OLE DB for OLAP providers).

Significance The parameter consists of a table with the following fields:

Name Description

CMD_PARAM1 MDX processor command parameter

Open Analysis Interfaces 30B 76

Page 77: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Import Parameter CommandText Significance The parameter consists of a table with the following fields:

Name Description

LINE MDX command text

Open Analysis Interfaces 30B 77

Page 78: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Import Parameter: Members Short text List of unique member names

Significance The parameter consists of a table with the following fields:

Name Description

MEM_UNAM Member: Unique name

Open Analysis Interfaces 30B 78

Page 79: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Import Parameter: Trace Short text Parser debug information (for OLE DB for OLAP providers).

Significance The parameter consists of a table with the following fields:

Name Description

MSG_TYPE Type of a debug- (trace-) message of the parser

MSGNR Message number

TXT Text for a debug- (trace-) message

Open Analysis Interfaces 30B 79

Page 80: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Export Parameter: AxisDimensions Short text Axis dimensions

Significance The AxisDimensions export parameter returns a list of axis dimensions as a result.

The parameter consists of a table with the following fields:

Name Description

AXIS 0-based number of axes in the dataset

DIM_UNAM DIMENSION unique name

DIM_KEY 0-based ordinal number of a DIMENSION on an axis

DIM_PRPTY_COUNT Number of optionally specified PROPERTIES in the dataset

Open Analysis Interfaces 30B 80

Page 81: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Export Parameter: AxisInfo Short text Axis information

Significance The AxisInfo export parameter returns information about the number of dimensions and tupels as a result.

The parameter consists of a table with the following fields:

Name Description

AXIS 0-based number of axes in the dataset

DIMS Counter for the number of dimensions on an axis

COORDINATES 0-based counter for the number of tuples on an axis

Open Analysis Interfaces 30B 81

Page 82: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Export Parameter: AxisLevels Significance The AxisLevels export parameter returns a list of hierarchy levels (LEVEL) as a result.

The parameter consists of a table with the following fields:

Name Beschreibung

I_AXIS 0-based number of axes in the dataset

DIM_KEY 0-based ordinal number of a DIMENSION on an axis

LVL_KEY 0-based ordinal number of a hierarchy level (LEVEL) modeled onto an axis

LVL_UNAM Hierarchy level unique name

Open Analysis Interfaces 30B 82

Page 83: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Export Parameter: CellData Significance The CellData export parameter returns information about the cells of a dataset as a result.

The parameter consists of a table with the following fields:

Name Beschreibung

CELL_ORDINAL Ordinal number of a dataset cell

VALUE String-representation of a Float-figure

FORMATTED_VALUE Formatted value of a cell

VALUE_TYPE

CURRENCY Currency key, dependent on QVKF (Quantity Value Key Figure)

UNIT Unit key, dependent on QVKF (Quantity Value Key Figure)

The unit for a unit key is required with the dimension key figures amount and price.

QVKF Grouping key figures

NUM_SCALE Number scaling factor

NUM_PREC Number of decimal places for the output

CELL_STATUS Status of a cell

• E (empty)

• N (null)

BACK_COLOR Background color

Open Analysis Interfaces 30B 83

Page 84: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Export Parameter: Data Short text Data for flattening support

Significance The Data export parameter returns data for flattening support as a result.

The parameter consists of a table with the following fields:

Name Beschreibung

COLUMN Ordinal number of a cell in the dataset, column

ROW Ordinal number of a cell in the dataset, row

DATA Member unique name

VALUE_DATA_TYPE Data type in ABAP dictionary

CELL_STATUS Status of a cell

• E (empty)

• N (null)

You can find additional information about the individual parameter fields in the corresponding data element documentation in the ABAP Dictionary.

Open Analysis Interfaces 30B 84

Page 85: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Export Parameter: DimPrptys Significance The DimPrptys export parameter returns a list of display attributes (PROPERTIES) as a result.

The parameter consists of a table with the following fields:

Name Description

LVL_KEY 0-based ordinal number of a hierarchy level projected onto an axis

PRPTY_NAM Master data attribute

DATA_TYPE Data type in ABAP dictionary

CHR_MAX_LEN Maximum length of a value in characters or bytes

You can find additional information about the individual parameter fields in the corresponding data element documentation in the ABAP Dictionary.

Open Analysis Interfaces 30B 85

Page 86: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Export Parameter: Fltcolinfo Significance The Fltcolinfo export parameter returns information about data columns in flattening as a result.

The parameter consists of a table with the following fields:

Name Description

COL_ORDINAL General reference field for numerations

DATA_TYPE Data type in ABAP dictionary

CHR_MAX_LEN Maximum length of a value in characters or bytes

You can find additional information about the individual parameter fields in the corresponding data element documentation in the ABAP Dictionary.

Open Analysis Interfaces 30B 86

Page 87: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Export Parameter: MndtryPrptys Short text Member default properties

Significance The MndtryPrptys returns information about the default properties of a member as a result.

The parameter consists of a table with the following fields:

Name Description

TUPLE_ORDINAL 0-based ordinal number of an axis tupel

DIM_KEY 0-based ordinal number of a DIMENSION on an axis

MEM_UNAM Member unique name

MEM_CAP Caption

LVL_UNAM Hierarchy level unique name

LVL_NUMBER Distance of member from root node (root = 0)

CHILDREN Number of children for member

DRILLED_DOWN Indicator determining whether member is in drilldown state in hierarchy

PARENT_SAME_AS_PREV Indicator determining whether parent node of this node is identical to parent node of previous member

Open Analysis Interfaces 30B 87

Page 88: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Export Parameter: OptionPrptysKeys Short text Keys for optional properties

Significance The OptionPrptysKeys export parameter returns keys for the optional dimension PROPERTIES as a result.

The parameter consists of a table with the following fields:

Name Description

DIM_KEY 0-based ordinal number of a DIMENSION on an axis

PRPTY_NAM PROPERTY name

PRPTY_KEY Numerical key having three digits

Open Analysis Interfaces 30B 88

Page 89: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Export Parameter: OptionPrptysVals Short text Values for optional properties

Significance The OptionPrptysVals export parameter returns values for the optional PROPERTIES as a result.

The parameter consists of a table with the following fields:

Name Description

TUPLE_ORDINAL 0-based ordinal number of an axis tuple

PRPTY_KEY Numerical key having three digits

PRPTY_VAL Member unique name

Open Analysis Interfaces 30B 89

Page 90: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Export Parameter: Return Short text BAPI return parameter

Significance An OLAP BAPI Return parameter returns messages to the application making the call up. The Return parameters of the MDDataProviderBW and MDDataSetBW OLAP-BAPIs are the same.

The parameter consists of a table with the following fields:

Name Description

TYPE Message type:

• S (Success) for success messages

• E (Error) for erroneous situations

• W (Warning) for warnings

• I (Info) for information messages

• A (Abort) for abort messages

ID Message, message class

NUMBER Message, message number

MESSAGE Message text

LOG_NO Application log: Log number

LOG_MSG_NO Application log: Message number running internally within log

MESSAGE_V1

MESSAGE_V2

MESSAGE_V3

MESSAGE_V4

Message, message variables

Up to four variable values can be used in a message Variables are used in the same order as the variables appear in the message text

PARAMETER Name of parameter in which the error message occurred

ROW Row in parameter in which the error message occurred

FIELD Field in parameter in which the error message occurred

SYSTEM System (logical system) from which the message originates

You can find additional information about the individual parameter fields in the corresponding data element documentation in the ABAP Dictionary.

Open Analysis Interfaces 30B 90

Page 91: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Error Handling Each method of the MDDataProviderBW and MDDataSetBW OLAP BAPIS contains the Return export parameter. This export table returns warnings, error- and success messages generated during execution of the methods to the application making the call up.

You can find additional information under Export Parameter: Return [Seite 90].

Open Analysis Interfaces 30B 91

Page 92: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

OLE DB for OLAP Purpose OLE DB (Object Linking and Embedding Database) defines a sequence of COM (Component Object Model) -based interfaces that bring together the services of data management systems. These interfaces allow applications to access data from various sources uniquely.

OLE DB for OLAP (OLE DB for Online Analytical Processing) is a respected interface specification that has since become the industry standard. It is used to access relational and multi-dimensional data regardless of database.

ADO MD (ActiveX Data Objects Multidimensional): ADO MD enables an especially straightforward access to multi-dimensional data using a multi-dimensional data provider (MDP), which meets the OLE DB for OLAP standard. ADO MD is an enhancement of ADO with its multi-dimensional objects.

OLE DB and ADO form the core of Universal Data Access. Conceived by Microsoft, with the aim of using a single technology to provide universal access to data having different formats.

The following graphic illustrates Microsoft’s concept of Universal Data Access:

ICommandIRowsetISession

OLE DB OLE DB OLE DB OLE DBOLE DB

for OLAP

Applications

ActiveX Data Objects (ADO) ADO MD

Multi-dimensional

DataHTMLRDBMSTable

CalculationEmail

OLE DB for OLAP functions differ from those of the following component types: ...

1. Consumer: Part of a system or application code, which requires access to data and uses one OLE DB interface. OLE DB-compatible data consumers can use the available ODBC drivers to access all relational databases.

2. Providers:

− Data provider: An OLE DB provider, which models the data from the data source as a rowset, in tabular form.

− Service component: An additional OLE DB component, which does not model any data, but which instead provides services that guarantee functions required by the consumer.

The implementation of OLE DB for OLAP (ODBO) in the Business Information Warehouse enables consumers to request data directly from the BW OLAP server. Client applications can

Open Analysis Interfaces 30B 92

Page 93: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

use the OLE DB for OLAP interface directly on a system level, which provides the greatest possible degree of control and flexibility. In addition, clients can also use the high-performance ADO MD interface. This interface enables you to use VB- (visual basic) and VB script applications to access the OLE DB for OLAP. You can find additional information from Open Analysis Interfaces [Seite 1] and MDX as Basis for the Interfaces [Seite 9].

OLE DB for OLAP is useful as a frontend interface for BW when the following is of importance:

• Producer-side support for OLAP providers and consumers

• Use of OLE DB architecture for reusable and parallel components

• Use of SAP BW OLAP BAPIs for generic OLAP tools.

• Simplification of requests to application development by means of ADO MD

• Execution of OLAP services for each provider without having to transform data

Implementation Considerations Implementation of the OLE DB for OLAP-interface in BW is based on Microsoft‘s OLE DB Programmer's Reference Version 2.7 (Part 3: OLE DB for OLAP).

You can find additional information under Installing SAP BW OLE DB for OLAP [Seite 94].

Constraints Be aware of the following restrictions when using OLE DB for OLAP for your frontend in the Business Information Warehouse:

• The results of development coordination between third party administrators and the Business Information Warehouse are checked in a test and are certified. Nevertheless, the integration of third party administrators does not reach the degree of integration that the frontend from the Business Information Warehouse offers.

• The Business Information Warehouse is delivered with pre-configured information models (InfoSources, InfoCubes, and queries). This model reflects the business experience of SAP and expedites the implementation of the Business Information Warehouse. For third party administrators, the use of this information model is restricted to InfoCubes. Standard queries are not offered. Accordingly, decision-makers have to take a longer implementation time into account.

Open Analysis Interfaces 30B 93

Page 94: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Installing SAP BW OLE DB for OLAP Use To be able to use OLD DB for OLAP with the SAP Business Information Warehouse, you need to install the required frontend components and prepare the connection to the BW server via OLE DB for OLAP.

Integration The implementation of SAP Business Information Warehouse OLE DB for OLAP providers is essentially made up of the following components:

• BW OLE DB for OLAP providers between the data provider and the third-party client as the data consumer. The OLE DB for OLAP Providers maintains and modifies data displayed by the data provider.

• OLAP-BAPIs

The following graphic shows the arrangement of components:

Desktop withOLE DB for OLAP-driver forSAP BusinessInformationWarehouse

SAP BusinessInformationWarehouse- Server -

OLE DB Objects

ADO

ConsumerOLE DB Objects

DatasetObject

Third PartyClient

OLAP-ProcessorOLAP-Processor

Staging EngineStaging Engine

OLAP BAPIs

DatabaseMetadataRepository

RFC

The SAP Business Information Warehouse OLE DB for OLAP setup installs a provider DLL (dynamically linked library) on the desktop on which the third-party client application is installed. This DLL is registered under the name MdrmSap in the system registry. The provider DLL uses RFC to construct a connection from the BW server to several function module APIs.

Prerequisites Note that all components that are integrated on the SAP BW OLE DB for OLAP providers and which are required by the client application must be installed by the third party application itself.

It is usually necessary to install Microsoft’s Redistribution Setups for Microsoft Data Access Components (MDAC) including the OLE DB- and ODBC drivers. If

Open Analysis Interfaces 30B 94

Page 95: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

not delivered with the client-specific software, you can the required components on the Internet, under www.microsoft.com/data/download2.htm.

When using Windows 95, you also need to install DCOM95 before installing the OLE DB driver. You can find the required program on the BW delivery CD for the frontend under \msredist\DCOM95.EXE.

Features To access a BW system via OLE DB for OLAP, you need to install a BW frontend. The SAP BW frontend setup contains components required by the SAP BW OLE DB for OLAP provider.

Activities Installing components of the SAP BW frontend setup.

Install the following components on your desktop PC:

Component Description Mdrmsap.dll SAP BW OLE DB doe OLAP provider DLL

Mdrmdlg.dll Service DLL used to create a connection to the SAP server.

Scerrlkp.dll Error handling DLL

Mdxpars.dll MDX parser DLL

Librfc32.dll SAP RFC library

Wdtlog.ocx SAP RFC logon dialog

Saplogon.ini SAP connection parameter file

The SAP BW OLE DB for OLAP provider is registered under the progID (program ID) MDrmSAP.

Note that to install these components, you need administrator rights on the desktop PC.

Establishing a connection to BW server via OLE DB for OLAP driver

Set the following parameters:

parameter Description Provider Technical name, under which the SAP components

are installed: MDrmSAP.

DataSource System name This name must concur with the name in SAP logon.

UserID User name in system

Password User password in system

SFC_CLIENT Number of productive client in BW server system

SFC_LANGUAGE Logon language

A typical example of a provider string is as follows:

Open Analysis Interfaces 30B 95

Page 96: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

DataSource=JXX;UserID=MyName;Password=MyPassword;Provider=MDrmSAP; SFC_CLIENT=005;SFC_LANGUAGE=DE

Open Analysis Interfaces 30B 96

Page 97: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Installing Frontend Components Use The procedure for installing the required frontend components depends on the client application you want to work with.

• Carry out steps 1-4,

− when you want to use SAP BW OLE DB for OLAP Providers with a customer application, which uses ADO MD, and

− when you have yet to install the required components.

• Begin with step 4 when you want to use SAP BW OLE DB for OLAP Providers with third-party applications, such as BusinessObjects, Arcplan inSight or Cognos Powerplay. The client applications are responsible for the installation of those OLE DB components which are integrated on the SAP Provider and which are required to execute the application. SAP installation guarantees that msdadc.dll exists.

Procedure ...

1. When installing on Windows 95, make sure that DCOM95 is installed on your computer.

Firstly install DCOM95 if this is not the case. You can find the file from Microsoft under \msredist\DCOM95.EXE.

2. If you want to use OLE DB for OLAP Providers with a customer application, which uses ADO MD or other OLE DB components, make sure the required components are installed on your computer.

Firstly install Microsoft’s Redistribution Setups including the OLE DB driver, if this is not the case. You can find the file from Microsoft under \msredist\mdac_olp.exe.

When not carrying out the full installation, you need the following components from the customer installation:

− ODBC components

− OLE DB components

− Microsoft ActiveX data objects

− Microsoft ADO Multidimensional

− Microsoft Remote Data Services

3. Reboot your computer.

4. Execute the file sapsetup.exe for SAP BW OLE DB for OLAP-Providers from the BW Delivery CD for the frontend.

Result You have installed the required frontend components and can now use SAP BW OLE DB for OLAP providers. You can find additional information under Using OLE DB for OLAP-Providers [Seite 98].

Open Analysis Interfaces 30B 97

Page 98: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Using OLE DB for OLAP Providers Use We recommend you use the following detailed procedure to enable third-party applications to execute queries via the BW OLE DB for OLAP providers.

Prerequisites You have installed the required SAP BW frontend components on your desktop PC. You can find additional information under Installing SAP BW OLE DB for OLAP [Seite 94].

Note that special instructions apply when installing depending on the client application you want to use. You can find additional information from Installing Frontend Components [Seite 97].

Procedure ...

1. Define a query in the BEx Query Designer. You can find additional information under Query Design: BEx Query Designer [Extern].

2. Select the characteristic dimension and drag it either into the rows- or the columns area This dimension is modeled to the QUERY_CUBE dimensions in the OLE DB for OLAP interface (see Mapping the Metadata [Seite 11]).

3. Define a structure with the required key figures. Transfer the key figures from the InfoProvider into this structure. The name of the structure and its content is modeled to the MEASURES dimension in the OLE DB for OLAP interface (see Mapping the Metadata [Seite 11]).

4. Release the BEx queries so that they can be used in OLE DB for OLAP Providers. In the Query Properties dialog box, set the indicator for Allow External Access to This Query. You can find additional information from Query Properties [Extern] (on the Specific tab page).

5. Save your query. Note: The name of the BEx Query appears in the form InfoCube-Name/Query-Name in the client application.

6. The client application asks you to logon to the BW server. Enter a system name, your user name, password and logon language. You can find additional information under Installing SAP BW OLE DB for OLAP [Seite 94]. (For test purposes, you can also execute the query in BEx).

Result The created QUERY_CUBE now appears in the list of Cubes offered by your client application. You can set up your frontend display here.

Open Analysis Interfaces 30B 98

Page 99: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Open Analysis Interfaces 30B 99

XML for Analysis Purpose XML for Analysis is a protocol specified by Microsoft which is used for the exchange of analytical data between client applications and servers via HTTP and SOAP (Simple Object Access Protocol). It is used as a Web service. Using XML for Analysis in the Business Information Warehouse enables the OLAP processor to communicate directly with a third-party Reporting tool connected to the BW.

In contrast to OLE DB, XML for Analysis provides universal data access to any data source over the Internet, without a special component having to be installed client-side.

XML for Analysis is optimized for the Internet in a number of ways:

• The consultation load on the server is kept as low as possible.

• By default, client requests are stateless. This means that once the client has received the data he/she wants, the connection to the Web server is closed.

This optimizes the data source’s resistance to errors as well as its scalability, that is, the maximum number of users it can permit.

Integration XML for Analysis is automatically available after installing an SAP BW system 3.0 as a Web service. The Web service URL must have the following schema:

<Protocol>://<Server>:<Port>/sap/bw/xml/soap/xmla

You can call up a description of the Web service via an URL whose syntax matches the following schema:

<Protocol>://<Server>:<Port>/sap/bw/xml/soap/xmla?wsdl

The installation type determines which placeholder values must be entered in the specified URL schema. Http and Https are possible selections for the <Protocol>. The <Server> is your message server.

The Web service is based on SAP Web Application Server (WAS) technology.

Functions The implementation of XML for Analysis in SAP BW 3.0 is based on the Microsoft XML for Analysis specification, version 1.0.

This specification sets out the following methods for a stateless data request or data manipulation:

Method Description

Discover This method is used when requesting metadata and master data. (It corresponds to the BAPI MDDataProviderBW).

Discover (

[in] RequestType As EnumString,

[in] Restrictions As Restrictions,

[in] Properties As Properties,

[out] Result As Rowset)

Execute This method is used to execute MDX commands and receive the corresponding

Page 100: Open Analysis Interfaces - Ref Guide

SAP Online Help 20.02.2003

Open Analysis Interfaces 30B 100

quantity of results. (It corresponds to the BAPI MDDataSetBW).

Execute (

[in] Command As Command,

[in] Properties As Properties,

[out] Result As Resultset)

Restrictions XML for Analysis is not restricted to any particular platform, application or development language.

Example Borrowing from the Microsoft XML/A specification, the following graphic illustrates a possible implementation scenario for an XML/A Web service:

XML forAnalysis:Provider

Implementation

Client

User Interface

ClientFunctions

Discover andExecute Requests

Internetor LAN

Internetor LAN

Discover andExecute Requests - Server-side -

SOAP

SOAP

HTTP

HTTP

DiscoverExecute

Data

Web Service ProviderWeb Service Client

After the client has received the URL of a server offering the Web service, it sends Discover and Execute requests to the server via the SOAP/HTTP protocol.

The server creates an instance of the XML/A provider that processes Discover and Execute requests. The XML/A provider loads the requested data, beds it down in XML and sends the data to the client as XML.