Open Analysis Interfaces and BI Java SDK

28
Open Analysis Interfaces and BI Java SDK Guido Schroeder BI Advanced Technologies, SAP Labs LLC., Palo Alto

Transcript of Open Analysis Interfaces and BI Java SDK

Open Analysis Interfaces and BI Java SDK

Guido SchroederBI Advanced Technologies, SAP Labs LLC., Palo Alto

© SAP AG 2002, Title of Presentation, Speaker Name 2

Agenda

Open Analysis Interfaces OverviewObjectivesArchitecture, Things in Common – DifferencesMetadata mappings, Executing queries and MDX

XML for AnalysisArchitectureDiscover method detailsTools

BI Java SDKOverviewAPI Architecture

Summary

Q&A

References

© SAP AG 2002, Title of Presentation, Speaker Name 3

Overview: Open Analysis Interfaces Motivation

Provide Plug-and-Play Interoperability for 3rd party front-end tools (arcplan, Brio, Business Objects, Cognos,)

Customer wants to leverage tools in addition to SAP Business Explorer based on

Installed/trained user baseSpecial requirements e.g. for highly formatted reports

Provide APIs for custom applicationsHighly customized integration of BW reporting data into existingASPs, JSPsDownload of data into Excel (realized with VBA)

Provide BI services for “SAP internal users” (SEM, CRM)Required only certain services provided by BW without building a BI only application (service oriented BI)

Not an extraction API for mass data. Focus on reporting applications that fully leverage the analytical business features built into BW

© SAP AG 2002, Title of Presentation, Speaker Name 4

Overview: BW Open Analysis Interfaces and BI Java SDK Architecture

OLE DB for OLAPBased Component

Object Model (COM)Driver (DLLs)

installation on clientsWindows platform onlyMDX query language Available since BW

1.2BADO MD API in C++,

VB/VBA

OLAP BAPIsBusiness Application

Programming InterfaceBased on Remote

Function Call (RFC)RFC library available

on any SAP platformMDX query languageAvailable since BW

2.0A

XML for AnalysisBased on XML as

exchange formatBased on HTTP/SOAP

protocolAny platformMDX query languageAvailable since BW

3.0A

BI Java SDKObject Oriented Java

API for consuming XMLA services

Encapsulates communication protocol (HTTP,SOAP), MDX generation and parsing

Plugs into SAP J2EE environment

© SAP AG 2002, Title of Presentation, Speaker Name 5

Overview: Open Analysis Interfaces - things in common

OLAP meta model defined by OLE DB for OLAP

MDX query language and MDX processing

Featuresauthority checking multi-language support (SAP BW master data supports multiple language within a single query / single infocube) hierarchy handling: SAP BW's OLAP engine interprets the various types of hierarchies (unique/non-unique, interval-based, time-dep./indep. etc.) and uses type-specific evaluation algorithms time-dependent master data, calculated key figures, query structures, multi-currency handling... non-cumulative key figures: the values stored on the DB need to be interpreted by using SAP BW specific meta data; the pure values persisted in a fact table do not provide any reasonable information for an end-user rounding, precision: SAP BW's OLAP engine can guarantee precise calculations which is particularly important in financial data; special handling is necessary as aggregated data is typically further aggregated etc. SAP-specific formats: currency values are always stored with 2 decimals; thus 100 Yen are stored as 1.00; the necessary shift back to 100 Yen is done in SAP BW's OLAP engine consistent SAP BW meta data handling: synchronization with any possible change within the SAP BW meta data (re-modeling, realignment and other issues)

© SAP AG 2002, Title of Presentation, Speaker Name 6

Overview: Open Analysis Interfaces - Differences

Communication/Access technologyOLAP BAPIs: SAP RFC libraries, SAP JCOOLE DB for OLAP: COM interfaces, ADO MDXMLA: SOAP, HTTP

Granularity of APIXMLA: only 2 methods (Web Service like, driven by methodologicalrather than technical aspects)OLAP BAPIs: 2 Objects (MDDataProviderBW, MDDataSetBW) with 18 methodsOLE DB for OLAP: IDBSchemaRowset, ICommand, IMDDataset

© SAP AG 2002, Title of Presentation, Speaker Name 7

Overview: metadata mapping

Characteristics(Keyfgs)

Hierarchies (external)

Numbered Levels or Dummy level names

Characteristic Values

Display Attributes

InfoCubes

Not supported

Queries

SAP BW

Properties

Catalogs

Schema

Cubes

Dimensions (Measures)

Hierarchies

Levels

Members

1

2

Open Analysis Interfaces

© SAP AG 2002, Title of Presentation, Speaker Name 8

Overview: MultiDimensional EXpressions (MDX)

XMLA is a linguistic interface that uses MultiDimensional Expressions (MDX) for querying multidimensional Datasets

Parts of MDX statements:FROM clause -> selects a cube

SELECT clause -> defines the axes

ON COLUMNS -> defines the columns axis

ON ROWS -> defines the rows axis

WHERE clause -> filter conditions

© SAP AG 2002, Title of Presentation, Speaker Name 9

Overview: MDX Example

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_ODBO]

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

JAN 2001,USA

Profit Number of documents Open orders

$ 702.571,00 33,000 $ 266.658,00

Frankfurt $ 236.088,00 9,000 $ 26.664,00

Manchester $ 95.286,00 6,000 $ 26.664,00

Calgary $ 226.487,00 9,000 $ 46.665,00

Chicago $ 144.710,00 9,000 $ 166.665,00

© SAP AG 2002, Title of Presentation, Speaker Name 10

XML for Analysis - Introduction

Focus in the following on XMLA to introduce basic OLAP API features (query execution, metadata model)

Good starting point for any programmer due to well understood technologies (XML, HTTP, SOAP) and no platform constraintSimplified, very coarsely grained APIMajor successful concepts of OLE DB for OLAP advanced to a cross-platform Web service API.

XML for Analysis is an open application programming interface (API) that standardizes the interaction between a client application and an analytical data provider over the Web.

The XMLA API defines two methods:

Discover: Used to obtain metadata and information about a Web serviceExecute: Used to execute MDX or provider-specific commands

© SAP AG 2002, Title of Presentation, Speaker Name 11

XMLA - Architecture

Client

UI

Clientfunctions

Discover,executecalls

Provider

InternetOr LAN

InternetOr LAN Discover,

executecall server

SOAP

Discover,execute

Data

SOAP

HTTP

HTTP

Any server (Solaris, Linux, Windows) at any location

Any client (Windows, Linux, Macintosh) at any location

© SAP AG 2002, Title of Presentation, Speaker Name 12

XMLA: Discover - Method Signature

Discover ([in] RequestType As EnumString,[in] Restrictions As Restrictions,[in] Properties As Properties,[out] Result As Rowset)

RequestType Specifies the structure and content of the Rowset returned in the Result parameter (DISCOVER_DATASOURCES, MDSCHEMA_CUBES, MDSCHEMA_DIMENSIONS…)

Restrictions Sets restrictions for columns of the Result, in order to filter the rows returned. Mandatory, but can be empty.

Properties Specifies a collection of XML for Analysis properties(return format of the Result set, timeout, locale in which the data should be formatted)

© SAP AG 2002, Title of Presentation, Speaker Name 13

XMLA: Discover - SOAP Example Discover Request

<SOAP-ENV:Envelopexmlns:SOAP-ENV=

‘http://schemas.xmlsoap.org/soap/envelope/'SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>

<SOAP-ENV:Body><Discover><RequestType>MDSCHEMA_CUBES</RequestType><Restrictions>

<RestrictionList/></Restrictions><Properties>

<PropertyList><DataSourceInfo>DataSource=local</DataSourceInfo><Format>Tabular</Format>

</PropertyList></Properties>

</Discover></SOAP-ENV:Body>

</SOAP-ENV:Envelope>

© SAP AG 2002, Title of Presentation, Speaker Name 14

XMLA: Sample on SDN

© SAP AG 2002, Title of Presentation, Speaker Name 15

XMLA: Identifying the Service URL

SE37 RSBB_URL_PREFIX_GET, Service URL :

© SAP AG 2002, Title of Presentation, Speaker Name 16

XMLA: SICF transaction – Service Maintenance

SICF Service Maintenance (sap/bw/xml/soap/xmla) :

© SAP AG 2002, Title of Presentation, Speaker Name 17

XMLA: MDXTEST transaction – MDX Editor

© SAP AG 2002, Title of Presentation, Speaker Name 18

BI Java SDK: Overview

MotivationSimplify and accelerate development of custom BI applications for SAP NetWeaver’s J2EE server

Encapsulation of MDX generation and SOAP protocolAccess to diverse sources (SAP or non-SAP) supported by the BI Java Connectors (JDBC, XMLA, OLE DB for OLAP, SAP Query)By-product of Universal Data Integration concept (BEx as a consumerof non-BW sources)

FeaturesEasy to use and learn

Object oriented APILeverages resources, skills, and infrastructure customers already have Provides complete documentation on an API level (Javadocs), tutorials, and examples

Integrated with SAP NetWeaver Developer StudioBased on open and accepted standards for interoperability

Common access APIs (JMI)Common meta models (CWM)Connection management (JCA)

© SAP AG 2002, Title of Presentation, Speaker Name 19

BI Java SDK - Architecture

SAPBW

nonSAP

SAPQuery

XMLA

JDBC

ODBO

BI JavaSDK

OLA

P

Custom-builtApplications

SAP

Enterprise Portal

UDConnect

BI Java SDKJava API, Examples, Documentation

BEx

BW

Staging

Extension of existing Open Analysis Interfaces (XMLA, OLAP BAPI,ODBO)JCA compliant XMLA connector that runs on SAP J2EE engine

© SAP AG 2002, Title of Presentation, Speaker Name 20

BI Java SDK: API Architecture

BI Java SDK’s API components diagram

BI Java SDKBI Java SDK

OLAP APIs

OLAP Metadata API OLAP Query API

Relational APIs

Relational Metadata API Relational Query API

ResultSet A

PI

Connection M

anagement

Documentation (including Javadocs, Developer’s Guide); Examples

BI XMLA ConnectorBI XMLA Connector

OLAP

BI JDBC ConnectorBI JDBC Connector BI ODBO ConnectorBI ODBO Connector BI SAPQ ConnectorBI SAPQ Connector

Relational OLAP Relational

© SAP AG 2002, Title of Presentation, Speaker Name 21

BI Java SDK: Developer’s Documentation Set

Features:

Complete set of Javadocs

Developer’s Guide

Code Examples

Integrated CWM Documentation

Navigable UML Diagrams

Features:

Complete set of Javadocs

Developer’s Guide

Code Examples

Integrated CWM Documentation

Navigable UML Diagrams

© SAP AG 2002, Title of Presentation, Speaker Name 22

Summary: Key Points

BWs Open Analysis Interfacesplug-and-play connectivity for 3rd party reporting toolsAPIs for custom applications3 Interfaces: XMLA, ODBO, OLAP BAPIsCommon: MDX, Meta model, FeaturesDifferent: Access Protocol, Platform support, API granularity

BI Java SDK rapid application development of custom client applications thatconsume BW OLAP services through the XMLA interface.Encapsulation of the complexity of low-level communication protocols and query languagesComprehensive documentation set and examplesIntegration with industry standards: Java Metadata Interface (JMI), Common Warehouse Metamodel (CWM)

© SAP AG 2002, Title of Presentation, Speaker Name 23

On the SAP Help Portal:Open Analysis Interfaces, including XMLA: http://help.sap.com/ :

SAP NetWeaver SAP Business Information Warehouse SAP BW 3.1/BI Content 3.2 Add-On [Select Language] Open Analysis Interfaces

Resources

On the Internet:XMLA council: http://www.xmla.org/

World Wide Web Consortium (W3C) specification for SOAP:http://www.w3.org/TR/SOAP/

SAP Developer Network:http://sdn.sap.com

Books:Fast Track to MDX – Mark Whitehorn, et al.

MDX Solutions: With Microsoft SQL Server Analysis Services – George Spofford

© SAP AG 2002, Title of Presentation, Speaker Name 24

Questions?

Q&A

© SAP AG 2002, Title of Presentation, Speaker Name 25

BI Java SDK: Business Scenario

Your Business ProblemYou need to calculate order quantity and reorder point:

How many units should I order in one single batch (order quantity)? When is the right time to order (reorder point)? What is my cost structure, and how does this vary with changes in input costs?

Why you use the BI Java SDKThe information stored in SAP's Business Information Warehouse (BW) is available only in disparate objects.You need to integrate data from both relational and multidimensional (OLAP) data sources into one application. BW does not offer inherent simulation capabilities. Formula variables and the Business Planning and Simulation (BPS) capabilities seem to be overkill for a rather simple business problem. You'd like to integrate your solution into SAP's NetWeaver landscape, deploying a Java application seamlessly onto the Web Application Server, for ease of viewing from any Web browser for all authorized Enterprise Portal users. You don’t have the time or budget to quickly develop an additional InfoProvider in this particular case.

© SAP AG 2002, Title of Presentation, Speaker Name 26

BI Java SDK: Business Scenario -- Result

You deploy your application onto NetWeaver’s Enterprise Portal

© SAP AG 2002, Title of Presentation, Speaker Name 27

BI Java SDK: Business Scenario -- Development

You use the NetWeaver Developer Studio (Eclipse) to create your custom BI application with the BI Java SDK

© SAP AG 2002, Title of Presentation, Speaker Name 28

Copyright 2002 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.