Professional Documents
Culture Documents
Release 30B
ADDON.NDBWODBO
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.
30B
20.02.2003
Icons
Icon Meaning Caution Example Note Recommendation Syntax
Typographic Conventions
Type Style Example text Description 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 EXAMPLE TEXT Emphasized words or phrases in body text, titles of graphics and tables. 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. 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. Keys on the keyboard, for example, function keys (such as F2) or the ENTER key. Exact user entry. These are words or characters that you enter in the system exactly as they appear in the documentation. Variable user entry. Pointed brackets indicate that you replace these words and characters with appropriate entries.
Example text
30B
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
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
30B
20.02.2003
The following interfaces are available to connect third-party frontend tools to BW:
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:
30B
20.02.2003
Data Objects
Virtual Objects
MultiProvider InfoSet
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).
MDX Processor
Features
The following table gives an overview of the available interfaces: OLE DB for OLAP (ODBO) 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 OLAP BAPI XML for Analysis (XML/A)
Prerequisites driver installed on client system Platform Independence Only MS Windows platforms Unicode Capability Unicode not enabled The caller specifies the required Codepage [Extern] when establishing the RFC connection. As of SAP BW 2.0A Fully unicode-enabled, by default UTF-8 (Unicode Transformation Format, 8-bit display). As of SAP BW 3.0A All SAP platforms All platforms Access library available from all SAP platforms
Availability As of SAP BW 1.2B 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
20.02.2003
BW Server
HTTP SOAP
RFC OLAP-BAPIs
InfoCube
ODS
Master Data
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.
30B
20.02.2003
Structure
The following table gives an overview of the most important components of MDX statements: MDX Component FROM SELECT ON COLUMNS ON ROWS WHERE Significance Cube selection Axes definition Definition of column axes Definition of rows axes 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] )
30B
20.02.2003
The following graphic shows this example and the 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].[200201],[0D_COUNTRY].[US] )
JAN 2002, USA Profit $ 702.571,00 Frankfurt Manchester Calgary Chicago $ 236.088,00 $ 95.286,00 $ 226.487,00 $ 144.710,00 Document No. 33,000 9,000 6,000 9,000 9,000 Open Orders $ 266.658,00 $ 26.664,00 $ 26.664,00 $ 46.665,00 $ 166.665,00
result:
30B
10
20.02.2003
Features
The following graphic displays the model of Business Information Warehouse metadata objects in the OLE DB for OLAP
OLE DB for OLAP Catalog Schema Cube Dimension (Measure) Hierarchy Level SAP BW InfoCube Not Supported Query
InfoObject(Characteristic)
(BW) Hierarchy Numbered Level or Name of Dummy Level Characteristic Value Display Attribute
Member Property
schemas: 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. 30B 11
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
30B
12
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
Presentation Server; OLE DB Client
data:
30B
13
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
BW Query Characteristic 1: Region Char. 2: Fiscal Year Char. 3: Customer Structure for Key Figures Member1: Costs Member2: Sold Quantity Member3: Revenue Structure of QUERY_CUBE Dimension1: Region Dimension2: Fiscal Year Dimension3: Customer Measures-Dimension
this: Calculated and restricted key figures are modeled as Measures by default. They give OLE DB for OLAP interface consumers access to complex key figure definitions. Defining calculated and restricted key figures on the provider-end of the interface has the following advantages: Performance is not compromised There are fewer complexities for the customer Consistent interpretation and use of derived key figures is guaranteed for various application areas.
30B
14
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]
30B
15
20.02.2003
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.
30B
16
20.02.2003
Profit JAN 2001 FEB 2001 MAR 2001 APR 2001 MAY 2001 JUN 2001 JUL 2001 AUG 2001 SEP 2001 OCT 2001 NOV 2001 DEC 2001 11.324.466,00 * 7.767.949,00 * 9.598.544,00 * 7.225.499,00 * 9.216.444,00 * 12.050.631,00 * 14.757.033,00 * 558.144,00 MIX 14.834.377,00 * 13.158.103,00 * 17.673.019,00 * 13.833.383,00 *
Profit Change 11.324.466,00 * -3.556.517,00 * 1.830.595,00 * -2.373.045,00 * 1.990.945,00 * 2.834.187,00 * 2.706.402,00 * -14198889,00 14276233,00 -1.676.274,00 * 4.514.916,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.
30B
17
20.02.2003
Aggregate Profit JAN 2001 FEB 2001 MAR 2001 APR 2001 MAY 2001 JUN 2001 JUL 2001 AUG 2001 SEP 2001 OCT 2001 NOV 2001 DEC 2001 7.285.219,00 * 1.739.881,00 * 4.780.278,00 * 2.424.971,00 * 3.396.595,00 * 7.353.737,00 * 9.072.158,00 * 558.144,00 MIX 8.229.915,00 * 5.652.256,00 * 10.243.235,00 * 7.868.259,00 * Number of documents 117,000 75,000 105,000 90,000 108,000 114,000 142,000 359,000 135,000 99,000 114,000 117,000 Open orders 1.457.574,00 * 764.598,00 * 1.832.472,00 * 607.362,00 * 899.562,00 * 1.810.962,00 * 2.409.090,00 * 316.800,00 MIX 3.163.524,00 * 931.890,00 * 3.999.390,00 * 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:
30B
18
20.02.2003
Profit JAN 2001 FEB 2001 MAR 2001 APR 2001 MAY 2001 JUN 2001 JUL 2001 AUG 2001 SEP 2001 OCT 2001 NOV 2001 DEC 2001 11.324.466,00 * 7.767.949,00 * 9.598.544,00 * 7.225.499,00 * 9.216.444,00 * 12.050.631,00 * 14.757.033,00 * 558.144,00 MIX 14.834.377,00 * 13.158.103,00 * 17.673.019,00 * 13.833.383,00 *
Predict 7991404,68 8538385,53 9085366,37 9632347,22 10179328,06 10726308,91 11273289,76 11820270,60 12367251,45 12914232,29 13461213,14 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:
20.000.000,00 18.000.000,00 16.000.000,00 14.000.000,00 12.000.000,00 10.000.000,00 8.000.000,00 6.000.000,00 4.000.000,00 2.000.000,00 0,00
1 1 1 1 01 01 00 01 00 001 001 001 001 00 001 00 2 l2 g2 p2 T2 v2 C2 20 20 R 2 r 20 Y 2 b n n Ja Fe MA Ap MA Ju Ju Au Se OC No DE
30B
19
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 Type of DataSource The DataSource type is always multi-dimensional. Flattening Flattening is fully supported. Named Level Levels with names are supported. Join Cubes Join Cubes are not supported. 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_AGGREGATECELL_UPDATE Value: MDPROPVAL_AU_UNSUPPORTED ID: MDPROP_RANGEROWSET Value: MDPROPVAL_RR_READONLY ID: MDPROP_MDX_SLICER Value: MDPROPVAL_MS_MULTIPLETUPLES Property ID and Values ID: DBPROP_DATASOURCE_TYPE Value: DBPROPVAL_DST_MDP ID: MDPROP_FLATTENING_SUPPORT Value: MDPROPVAL_FS_FULL_SUPPORT ID: MDPROP_NAMED_LEVEL Value: MDPROPVAL_NL_NAMEDLEVELS ID: MDPROP_MDX_JOINCUBE Value: MDPROPVAL_MJC_SINGLECUBE ID: MDPROP_AXES
Refreshing Cell Data Refreshing cell data is not supported. RangeRowsets RangeRowsets are only read. 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
30B
20
SAP Online Help enable multiple filters (see Examples for CALCULATED MEMBER [Seite 16]). Outer Reference Outer reference is not supported. Using Attributes (MDX: Properties) SAP BW supports queries using dimension properties in a MDX statement. Case commands Case commands are not supported. String Comparison SAP BW only supports the equal and unequal comparison operators for strings. Descendants Flags SELF, BEFORE and AFTER are supported in all combinations. 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.
20.02.2003
ID: MDPROP_MDX_CASESUPPORT Value: Zero ID: MDPROP_MDX_STRING_COMPOP Value: Zero ID: MDPROP_MDX_DESCFLAGS Value: MDPROPVAL_MD_SELF MDPROPVAL_MD_BEFORE MDPROPVAL_MD_AFTER 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_DRILLDOWNMEMBERT OP MDPROPVAL_MSF_DRILLDOWNMEMBERB OTTOM MDPROPVAL_MSF_DRILLDOWNLEVELTO P MDPROPVAL_MSF_DRILLDOWNLEVELBO TTOM MDPROPVAL_MSF_DRILLUPMEMBER MDPROPVAL_MSF_DRILLUPLEVEL MDPROPVAL_MSF_YTD MDPROPVAL_MSF_QTD MDPROPVAL_MSF_MTD MDPROPVAL_MSF_WTD ID: MDPROP_MDX_MEMBER_FUNCTIONS Value: MDPROPVAL_MMF_COUSIN MDPROPVAL_MMF_PARALLELPERIOD MDPROPVAL_MMF_OPENINGPERIOD MDPROP_MMF_CLOSINGPERIOD ID: MDPROP_MDX_NUMERIC_FUNCTIONS Value: MDPROPVAL_MNF_MEDIAN MDPROPVAL_MNF_VAR MDPROPVAL_MNF_STDDEV MDPROPVAL_MNF_RANK MDPROPVAL_MNF_AGGREGATE
Member Functions As well as the standard functions, the following functions are also supported: COUSIN, PARALLELPERIOD, OPENINGPERIOD, CLOSINGPERIOD. Numerical Functions As well as the standard functions, the following functions are also supported: MEDIAN, VAR, STDDEV, RANK; AGGREGATE, COVARIANCE, CORRELATION, LINREGSLOPE,
30B
21
20.02.2003 MDPROPVAL_MNF_COVARIANCE MDPROPVAL_MNF_CORRELATION MDPROPVAL_MNF_LINREGSLOPE MDPROPVAL_MNF_LINREGVARIANCE MDPROPVAL_MNF_LIGREGR2 MDPROPVAL_MNF_LINREGPOINT 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 ID: MDPROP_MDX_NONMEASURE_EXPRESSONS Value: MDPROPVAL_NME_ALLDIMENSIONS
Formulas WITH SET/MEMBER and CREATE SET/MEMBER are supported in the local and in the SESSION context.
30B
22
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 Characteristic values, hierarchy nodes, precalculated value sets Hierarchies Formula Variables Text Variables Name in OLE DB for OLAP Specification MEMBER_UNIQUE_NAME HIERARCHY_UNIQUE_NAME Number Value 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 hierarchys 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 BWSpecific Enhancement: MDX Syntax [Seite 29])
30B
23
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]
30B
24
20.02.2003
Use
DEFINE_GUID(MDSCHEMA_SAP_VARIABLES, 0xcaff2c30, 0x30d, 0x11d3, 0x87, 0x1, 0x0, 0x10, 0x5a, 0x18, 0x50, 0x2e);
Structure
Column Name CATALOG_NAME SCHEMA_NAME CUBE_NAME VARIABLE_NAME Type Indicator DBTYPE_WSTR DBTYPE_WSTR DBTYPE_WSTR DBTYPE_WSTR Description Name of Catalog to which the Cube belongs Not Supported Name of QUERY_CUBE, to which the variable belongs Name of variable. A variable name can have leading zeros. For this reason, the provider always returns the name with separators. A description (label or caption) associated with the variables that is mainly used for the display. Variable GUID An ordinal number assigned to a variable in the group of variables for a Cube. 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 Programmers Reference. Maximum length of variable values having data type Character.
CHARACTER_MAXIMUM_ LENGTH
DBTYPE_UI4
30B
25
20.02.2003
VARIABLE_PROCESSING_TYP E
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.
30B
26
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 DEFAULT_HIGH DBTYPE_WSTR Variant A description (label or caption) associated with the Default Member. 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. A description (label or caption) associated with the Default Member. A readable description of the variable.
DEFAULT_HIGH_CAP DESCRIPTION
DBTYPE_WSTR DBTYPE_WSTR
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
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]
30B
28
20.02.2003
<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]
30B
29
20.02.2003
30B
30
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 MDDataProviderBW [Seite 34] MDDataSetBW [Seite 44] Features Methods used to browse BW metadata and master data Methods used to execute multi-dimensional result sets and fetch data
The following graphic provides an overview of the methods for OLAP BAPI MDDataProviderBW:
30B
31
20.02.2003
MDDataProviderBW
The following graphic provides an overview of the methods for OLAP BAPI MDDataSetBW:
MDDataSetBW
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.
30B
32
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.
30B
33
20.02.2003
MDDataProvider BW
Definition
The Business Object MDDataProviderBW delivers a multi-dimensional provider for BW metaand master-data. The following table contains details about the BAPI definition: Object type Package Component BUS6110 RSR_MDX 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.
30B
34
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]
30B
35
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].
30B
36
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].
30B
37
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].
30B
38
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].
30B
39
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].
30B
40
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).
30B
41
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].
30B
42
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]
30B
43
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 Package Component BUS6111 RSR_MDX 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.
30B
44
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]
30B
45
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]
30B
46
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]
30B
47
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].
30B
48
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].
30B
49
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].
30B
50
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]
30B
51
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].
30B
52
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]
30B
53
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 AllProperties [Seite 56] CatNam (Restriction: CAT_NAM) CubeNam (Restriction: CUBE_NAM) CubeType (CUBE type) DimNam (Restriction: DIM_NAM) DimUnam (Restriction: DIM_UNAM) HryNam (Restriction: HRY_NAM) HryUnam (Restriction: HRY_UNAM) LvlNam (Restriction: LVL_NAM) LvlNumber [Seite 57] LvlUnam (Restriction: LVL_UNAM) MemCap (Restriction: MEM_CAP) 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 Axis (0-based number of axes in the dataset) Cmd [Seite 75] CmdParams [Seite 76] CommandText [Seite 77] Export Parameters AxisDimensions [Seite 80] AxisInfo [Seite 81] AxisLevels [Seite 82] Cell (ordinal number of cell in dataset) Export Parameters AggrExceptional [Seite 62] Catalogs [Seite 63] Cubes [Seite 64] Dimensions [Seite 65] Hierarchies [Seite 66] Levels [Seite 67] Measures [Seite 68] Members [Seite 69] OptionalProperties [Seite 70] Properties [Seite 71] Return [Seite 90] Variables [Seite 72]
30B
54
20.02.2003
EndCell (ordinal number of cell in dataset) EndRow (end row in dataset) Members [Seite 78]
CellData [Seite 83] Data [Seite 84] DataSetID (MD_COMMAND-Objekthandle: ID of a runtime object that was generated using the method MDDataSetBW.CreateObject [Seite 46].) DimPrptys [Seite 85] Fltcolinfo [Seite 86] MndtryPrptys [Seite 87] OptionPrptysKeys [Seite 88] OptionPrptysVals [Seite 89] Return [Seite 90] Tuple (0-based ordinal number of an axis tuple)
StartCell (ordinal number of cell in dataset) StartOrdinal (0-based ordinal number of an axis tuple) StartRow (Start row in dataset) Trace [Seite 79]
30B
55
20.02.2003
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].
30B
56
20.02.2003
Significance
Note the following special features of the LvlNumber, MemType and Treeop import parameters: These parameters relate to the BAPI6111GENCHAR2RESTR 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]
30B
57
20.02.2003
Significance
Note the following special features of the LvlNumber, MemType and Treeop import parameters: These parameters relate to the BAPI6111GENCHAR2RESTR 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]
30B
58
20.02.2003
Significance
The Restrictions parameter consists of a table with the following fields: Name PRPTY_NAM SIGN Description Property name 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 LOW HIGH Operator in SELECT OPTIONS and other expressions. Member name Member name
You can find additional information about the individual parameter fields in the corresponding data element documentation in the ABAP Dictionary.
30B
59
20.02.2003
Significance
The SelectedProperties parameter consists of a table with the following field: Name PRPTY_NAM Description 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]
30B
60
20.02.2003
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
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 BAPI6111GENCHAR2RESTR 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]
30B
61
20.02.2003
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 CAT_NAM CUBE_NAM MES_UNAM MES_AGGREGATOR MES_AGGR_EXCEPTIONAL MES_AGGR_REF_DIM Beschreibung CATALOG name, to which the CUBE belongs CUBE name Member unique name Key figure aggregation behavior Key figure aggregation behavior with exception aggregation Dimension unique name, the reference characteristic for exception aggregation
30B
62
20.02.2003
Significance
The Catalogs export parameter returns CATALOGS as a result. The parameter consists of a table with the following fields: Name CAT_NAM Description CATALOG name, to which the CUBE belongs
30B
63
20.02.2003
Significance
The Cubes export parameter returns CUBES as a result. The parameter consists of a table with the following fields: Name CAT_NAM CUBE_NAM CUBE_TYPE CUBE_UID CREATED_ON LST_SCHEMA_UPD SCHEMA_UPD_BY LST_DATA_UPD DATA_UPD_BY DSCRPTN Description CATALOG name, to which the CUBE belongs CUBE name Type of CUBE CUBE unique ID (UUID) in compressed form Time the (BW query) CUBE was created; time stamp in UTC format YYYYMMDDhhmmss. Time the (BW query) CUBE was last changed; time stamp in UTC format YYYYMMDDhhmmss. Last changed by: Name of person who last changed the CUBE- (BW query-) definition. Time of last data load; time stamp in UTC format YYYYMMDDhhmmss. Last changed by: Name of user who last loaded data Description
30B
64
20.02.2003
Significance
The Dimensions export parameter returns DIMENSIONS as a result. The parameter consists of a table with the following fields: Name CAT_NAM CUBE_NAM DIM_NAM Description CATALOG name, to which the CUBE belongs CUBE name 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 DIM_UID DIM_CAP DIM_ORDINAL DIM_TYPE DIM_CARDINALITY DIMENSION unique name Unique ID (UUID) in compressed form Description (caption) DIMENSION ordinal number within the CUBE DIMENSION type (TIME,MEASURE) 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 DSCRPTN Default hierarchy unique name Description
You can find additional information about the individual parameter fields in the corresponding data element documentation in the ABAP Dictionary.
30B
65
20.02.2003
Significance
The Hierarchies export parameter returns HIERARCHIES as a result. The parameter consists of a table with the following fields: Name CAT_NAM CUBE_NAM DIM_UNAM HRY_NAM Description CATALOG name, to which the CUBE belongs CUBE name Dimension unique name Hierarchy name (uniquely identified with name, version, key day)
hienm30, version3, dateto8 HRY_UNAM HRY_UID HRY_CAP DIM_TYPE HRY_CARDINALITY DFLT_MEM ALL_MEM DSCRPTN Hierarchy unique name Unique ID (UUID) in compressed form Caption Dimension type (TIME, MEASURE) Dimension cardinality (estimated number of members) Member unique name Member unique name Description
30B
66
20.02.2003
Significance
The Levels export parameter returns DIMENSIONS as a result. The parameter consists of a table with the following fields: Name CAT_NAM CUBE_NAM DIM_UNAM HRY_UNAM LVL_NAM LVL_UNAM LVL_UID LVL_CAP LVL_NUMBER LVL_CARDINALITY LVL_TYPE DSCRPTN Description CATALOG name, to which the CUBE belongs CUBE name Dimension unique name Hierarchy unique name Hierarchy level unique name Hierarchy level unique name Unique ID (UUID) in compressed form Caption Distance of member from root node (root = 0) Level cardinality (estimated number of members) Level type (year,month,day..) Description
30B
67
20.02.2003
Significance
The Measures export parameter returns MEASURES as a result. The parameter consists of a table with the following fields: Name CAT_NAM CUBE_NAM MES_NAM Description CATALOG name, to which the CUBE belongs CUBE name 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 MES_CAP MES_UID MES_AGGREGATOR DATA_TYPE NUM_PREC Member unique name Description (caption) Unique ID (UUID) in compressed form MEASURE aggregation behavior (BW InfoObject with type key figure) Data type in ABAP dictionary Maximum precision Maximum precision is only specified for numerical data types NUM_SCALE MES_UNITS Scaling factor (where applicable) Unit (where applicable)
You can find additional information about the individual parameter fields in the corresponding data element documentation in the ABAP Dictionary.
30B
68
20.02.2003
Significance
The Members export parameter returns MEMBERS as a result. The parameter consists of a table with the following fields: Name LVL_NUMBER MEM_NAM MEM_UNAM MEM_TYPE Description Distance of member from root node (root = 0) Member name Member unique name Member type
REGULAR, ALL, MEASURE MEM_UID MEM_CAP MEM_ORDINAL CHILDREN PARENT_LVL PARENT_UNAM DSCRPTN Unique ID (UUID) in compressed form Caption General reference field for numerations Number of children for member Distance of member from root node (root = 0) Member unique name Description
30B
69
20.02.2003
Significance
The OptionalProperties export parameter returns PROPERTIES as a result. The parameter consists of a table with the following fields: Name MEM_ORDINAL PRPTY_NAM PRPTY_VAL Description General reference field for numerations Master data attribute Attribute value
30B
70
20.02.2003
Significance
The Properties export parameter returns PROPERTIES as a result. The parameter consists of a table with the following fields: Name CAT_NAM CUBE_NAM DIM_UNAM HRY_UNAM LVL_UNAM MEM_UNAM PRPTY_TYPE Description CATALOG name, to which the CUBE belongs CUBE name Dimension unique name Hierarchy unique name Hierarchy level unique name Member unique name Property type
MEMBER, CELL PRPTY_NAM PRPTY_CAP DATA_TYPE CHR_MAX_LEN CHR_OCT_LEN NUM_PREC Property name Caption Data type in ABAP dictionary Maximum length of a value in characters or bytes Maximum length of an attribute value in bytes, where a char is involved Maximum precision Maximum precision is only specified for numerical data types NUM_SCALE DSCRPTN Scaling factor (where applicable) Description
You can find additional information about the individual parameter fields in the corresponding data element documentation in the ABAP Dictionary.
30B
71
20.02.2003
Significance
The Variables export parameter returns VARIABLES as a result. The parameter consists of a table with the following fields: Name CAT_NAM CUBE_NAM VAR_NAM VAR_CAP VAR_UID VAR_ORDINAL Description CATALOG name, to which the CUBE belongs Name of CUBE, to which the variable belongs Variable technical name (including the separator [) Caption Unique ID (UUID) in compressed form, variable GUID General reference field for numerations; An ordinal number assigned to a variable in the group of variables for a CUBE. 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
VAR_TYPE
You can find additional information from BW Specific Enhancement: SAP VARIABLES schema-rowset [Seite 25] . DATA_TYPE Data type in ABAP dictionary CHR_MAX_LEN VAR_PROC_TYPE char for SAP_VAR_TYPE_MEMBER and SAP_VAR_TYPE_HIERARCHY types fltp for SAP_VAR_TYPE_NUMERIC type
Maximum length of a variable value in characters or bytes 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.
30B
72
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_NO T_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 DFLT_HIGH DFLT_LOW_CAP DFLT_HIGH_CAP DSCRPTN Member unique name, default value for variable (if available) Member unique name, default value for variable (if available) Description for default value for variable (if available) Description for default value for variable (if available) Variable description
30B
73
20.02.2003
You can find additional information about the individual parameter fields in the corresponding data element documentation in the ABAP Dictionary.
30B
74
20.02.2003
Significance
The parameter consists of a table with the following fields: Name CMD_ID Description MDX processor command internal ID
30B
75
20.02.2003
Significance
The parameter consists of a table with the following fields: Name CMD_PARAM1 Description MDX processor command parameter
30B
76
20.02.2003
30B
77
20.02.2003
Significance
The parameter consists of a table with the following fields: Name MEM_UNAM Description Member: Unique name
30B
78
20.02.2003
Significance
The parameter consists of a table with the following fields: Name MSG_TYPE MSGNR TXT Description Type of a debug- (trace-) message of the parser Message number Text for a debug- (trace-) message
30B
79
20.02.2003
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 AXIS DIM_UNAM DIM_KEY DIM_PRPTY_COUNT Description 0-based number of axes in the dataset DIMENSION unique name 0-based ordinal number of a DIMENSION on an axis Number of optionally specified PROPERTIES in the dataset
30B
80
20.02.2003
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 AXIS DIMS COORDINATES Description 0-based number of axes in the dataset Counter for the number of dimensions on an axis 0-based counter for the number of tuples on an axis
30B
81
20.02.2003
30B
82
20.02.2003
The unit for a unit key is required with the dimension key figures amount and price. QVKF NUM_SCALE NUM_PREC CELL_STATUS Grouping key figures Number scaling factor Number of decimal places for the output Status of a cell BACK_COLOR E (empty) N (null)
Background color
30B
83
20.02.2003
Significance
The Data export parameter returns data for flattening support as a result. The parameter consists of a table with the following fields: Name COLUMN ROW DATA VALUE_DATA_TYPE CELL_STATUS Beschreibung Ordinal number of a cell in the dataset, column Ordinal number of a cell in the dataset, row Member unique name Data type in ABAP dictionary 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.
30B
84
20.02.2003
You can find additional information about the individual parameter fields in the corresponding data element documentation in the ABAP Dictionary.
30B
85
20.02.2003
You can find additional information about the individual parameter fields in the corresponding data element documentation in the ABAP Dictionary.
30B
86
20.02.2003
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 TUPLE_ORDINAL DIM_KEY MEM_UNAM MEM_CAP LVL_UNAM LVL_NUMBER CHILDREN DRILLED_DOWN PARENT_SAME_AS_PREV Description 0-based ordinal number of an axis tupel 0-based ordinal number of a DIMENSION on an axis Member unique name Caption Hierarchy level unique name Distance of member from root node (root = 0) Number of children for member Indicator determining whether member is in drilldown state in hierarchy Indicator determining whether parent node of this node is identical to parent node of previous member
30B
87
20.02.2003
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 DIM_KEY PRPTY_NAM PRPTY_KEY Description 0-based ordinal number of a DIMENSION on an axis PROPERTY name Numerical key having three digits
30B
88
20.02.2003
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 TUPLE_ORDINAL PRPTY_KEY PRPTY_VAL Description 0-based ordinal number of an axis tuple Numerical key having three digits Member unique name
30B
89
20.02.2003
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 TYPE Description Message type: ID NUMBER MESSAGE LOG_NO LOG_MSG_NO MESSAGE_V1 MESSAGE_V2 MESSAGE_V3 MESSAGE_V4 PARAMETER ROW FIELD SYSTEM Name of parameter in which the error message occurred Row in parameter in which the error message occurred Field in parameter in which the error message occurred System (logical system) from which the message originates S (Success) for success messages E (Error) for erroneous situations W (Warning) for warnings I (Info) for information messages A (Abort) for abort messages
Message, message class Message, message number Message text Application log: Log number Application log: Message number running internally within log 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
You can find additional information about the individual parameter fields in the corresponding data element documentation in the ABAP Dictionary.
30B
90
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].
30B
91
20.02.2003
ADO MD
OLE DB
OLE DB
OLE DB
OLE DB
Table Calculation
RDBMS
HTML
Multidimensional Data
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
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 highperformance 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 Microsofts 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.
30B
93
20.02.2003
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
Desktop with OLE DB for OLAPdriver for SAP Business Information Warehouse
RFC OLAP BAPIs OLAP-Processor OLAP-Processor Metadata Repository Staging Engine Staging Engine Database SAP Business Information Warehouse - Server -
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 Microsofts Redistribution Setups for Microsoft Data Access Components (MDAC) including the OLE DB- and ODBC drivers. If
30B
94
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 Mdrmsap.dll Mdrmdlg.dll Scerrlkp.dll Mdxpars.dll Librfc32.dll Wdtlog.ocx Saplogon.ini Description SAP BW OLE DB doe OLAP provider DLL Service DLL used to create a connection to the SAP server. Error handling DLL MDX parser DLL SAP RFC library SAP RFC logon dialog 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 Provider DataSource UserID Password SFC_CLIENT SFC_LANGUAGE Description Technical name, under which the SAP components are installed: MDrmSAP. System name This name must concur with the name in SAP logon. User name in system User password in system Number of productive client in BW server system Logon language
30B
95
20.02.2003
30B
96
20.02.2003
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 Microsofts 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].
30B
97
20.02.2003
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 InfoCubeName/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.
30B
98
20.02.2003
This optimizes the data sources 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 Discover Description 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
30B
99
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:
Client Functions
S O A P
H T T P
H T T P
S O A P
Data
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.
30B
100