opensap hana1 week 04 exposing and consuming data with odata presentation

35
Week 4 Unit 1: Exposing and Consuming Data – Architecture

Upload: satishkrishnar

Post on 29-Nov-2015

195 views

Category:

Documents


4 download

DESCRIPTION

sap hana

TRANSCRIPT

Page 1: OpenSAP HANA1 Week 04 Exposing and Consuming Data With OData Presentation

Week 4 Unit 1: Exposing andConsuming Data – Architecture

Page 2: OpenSAP HANA1 Week 04 Exposing and Consuming Data With OData Presentation

© 2013 SAP AG. All rights reserved. 2Public

Exposing and Consuming Data – ArchitectureClassic SAP Architecture

Classic NetWeaver ABAP Layers

Proprietary protocols

SAP GUI displays pre-rendered UI

UI rendering done in ABAP layer

SQL:High data retrieval loadsNo scripts

Page 3: OpenSAP HANA1 Week 04 Exposing and Consuming Data With OData Presentation

© 2013 SAP AG. All rights reserved. 3Public

Exposing and Consuming Data – ArchitectureSAP HANA XS Architecture

SAPUI5Complete UI renderingHTML5/JavaScript

SAP HANA XSProcedural application logicApplication serverWeb server

SAP HANA Index ServerData-oriented application logicSQLScript

Page 4: OpenSAP HANA1 Week 04 Exposing and Consuming Data With OData Presentation

© 2013 SAP AG. All rights reserved. 4Public

Exposing and Consuming Data – ArchitectureSAP HANA XS Architecture

Client access via HTTP(S)

ICM/Web server

XS Engine

Index server

Client Node

HANA Node

<process>Client

HTTP(S)

XS Web Protocol API

Distributed DB APIs

<process>Indexserver

<process>XS Engine

<process>ICM

<extends>

Page 5: OpenSAP HANA1 Week 04 Exposing and Consuming Data With OData Presentation

© 2013 SAP AG. All rights reserved. 5Public

Exposing and Consuming Data – ArchitectureSAP HANA XS Rationale

RationalEnable easy application development anddeploymentWorks with HTTP-based UI (browser,mobile apps)Runs directly on SAP HANALeverages the built-in performance of SAPHANA

ScopeLightweight environment for small web-based applicationsRobust environment for complex high-speed business applications

Page 6: OpenSAP HANA1 Week 04 Exposing and Consuming Data With OData Presentation

Week 4 Unit 2: SAPUI5

Page 7: OpenSAP HANA1 Week 04 Exposing and Consuming Data With OData Presentation

© 2013 SAP AG. All rights reserved. 2Public

SAPUI5Overview

Enterprise-ready HTML5rendering library

Completely client-side UI

Open and flexible

Web development skills(HTML, CSS3, JavaScript)

Extensibility and Theming

3rd party JavaScriptintegration

Targets multiple devicesSmartphone, Table, Desktop

Page 8: OpenSAP HANA1 Week 04 Exposing and Consuming Data With OData Presentation

© 2013 SAP AG. All rights reserved. 3Public

SAPUI5Background and Methodology

HTML5: New HTML

jQuery: Fast new JS library

CSS3: Style/Layout

Odata: Connectivity

Open Ajax: Interoperability

LESS: Themes

D3.js: Data-Driven Docs

ARIA: Accessibility

SAPUI5 SDK

Page 9: OpenSAP HANA1 Week 04 Exposing and Consuming Data With OData Presentation

© 2013 SAP AG. All rights reserved. 4Public

SAPUI5Components

Optional server component

Core JS frameworkincluding jQuery

Extension libraries:ControlsThemes

“Helper” assets such as:LessCode minimizer

Controls

jQuery.UI

SAPUI5Libraries

SAPUI5Core

jQuery

(Static) Web Server

SAP jQuery Plug-ins

Event Resources Device LoggerUtils

UI

DataBinding

ControlBase

RenderManager

Themes Mobile Desktop

Mobile Desktop

Resource Handler (optional)

jQuery Mobile

Page 10: OpenSAP HANA1 Week 04 Exposing and Consuming Data With OData Presentation

© 2013 SAP AG. All rights reserved. 5Public

SAPUI5Examples

Visualization

Interaction

New “lanes” concept

Page 11: OpenSAP HANA1 Week 04 Exposing and Consuming Data With OData Presentation

© 2013 SAP AG. All rights reserved. 6Public

SAPUI5Information Sources

SCN Community

UI Development Toolkit forHTML5

SAP Tutorial

SAP Note 1747308 - SAPUI5

Page 12: OpenSAP HANA1 Week 04 Exposing and Consuming Data With OData Presentation

© 2013 SAP AG. All rights reserved. 7Public

SAPUI5Positioning of SAPUI5 Technology

User TypesOccasional user, manager

ScenariosLimited transactional capabilitiesHighly interactiveCollaboration, feeds

RequirementsIntuitive, with low entry barrierMultiple devices

TaskS

implicity

Data

Com

plexity

Tran

sact

iona

l

ExpertUser

Supervisor

Manager

OccasionalUser

InformationSeeker

Casual Usage

Analytical/B

OB

J

Expert Usage

BusinessUser

Page 13: OpenSAP HANA1 Week 04 Exposing and Consuming Data With OData Presentation

© 2013 SAP AG. All rights reserved. 8Public

SAPUI5Key Features and Benefits

Eclipse-Based Design-Time

Enterprise Readiness

Well-Known and Easy to LearnTimeless SAP Data Consumption

Great Productivity

Unmatched Extensibility

Powerful Theming & Branding

Any Screen on Any Device

Cutting-Edge Controls

Based on STANDARDSFoster INNOVATIONDelight USERS

Openess & FlexibilityFast Release CyclesEfficiency & Performance

Page 14: OpenSAP HANA1 Week 04 Exposing and Consuming Data With OData Presentation

© 2013 SAP AG. All rights reserved. 9Public

SAPUI5Installation

UI Development Toolkit HTML5

Show only software applicableto target environment

Contact all update sites

Hide already installed items

Accept multiple licenses

Restart SAP HANA studio

Page 15: OpenSAP HANA1 Week 04 Exposing and Consuming Data With OData Presentation

© 2013 SAP AG. All rights reserved. 10Public

SAPUI5Development Environment

Homogeneous set of Eclipsetools and editorsSmall learning curve for webdeveloperUI screen & applicationdevelopmentHTML5 templates supportShipped via SAP release trainfor Eclipse (SRTE)NWDS supportOutlook:

WYSIWYG design of HTML5 appsWeb-based IDE

Page 16: OpenSAP HANA1 Week 04 Exposing and Consuming Data With OData Presentation

Week 4 Unit 3: Creating a UserInterface with SAPUI5

Page 17: OpenSAP HANA1 Week 04 Exposing and Consuming Data With OData Presentation

© 2013 SAP AG. All rights reserved. 2Public

Creating a User Interface with SAPUI5SAPUI5 Projects

SAPUI5-specific:ProjectsWizards

WebContent packagesDistinct from application code

Target deviceDesktopMobile

Controller/View:JavaScriptXMLJSON

Page 18: OpenSAP HANA1 Week 04 Exposing and Consuming Data With OData Presentation

© 2013 SAP AG. All rights reserved. 3Public

Creating a User Interface with SAPUI5SAPUI5 UI Components

Separate SAPUI5 packageWebContent/…

Bootstrap HTML pageIndex.html

SAPUI5 project controllerHelloWorld.controller.js

SAPUI5 project viewHelloWorld.view.js

Page 19: OpenSAP HANA1 Week 04 Exposing and Consuming Data With OData Presentation

© 2013 SAP AG. All rights reserved. 4Public

Creating a User Interface with SAPUI5SAPUI5 “Hello World” Code

Controller nameHelloWorld

Content creationUI buttonUI textUI operation

Test application

Page 20: OpenSAP HANA1 Week 04 Exposing and Consuming Data With OData Presentation

Week 4 Unit 4: OData Services

Page 21: OpenSAP HANA1 Week 04 Exposing and Consuming Data With OData Presentation

© 2013 SAP AG. All rights reserved. 2Public

OData ServicesOData Basics

OData Data ModelOrganize/describe data with Entity DataModel (EDM)

OData ProtocolREST-based create, read, update,and delete + OData-defined querylanguage

Client LibrariesPre-built libraries to request ODataand display results

OData ServicesExposes an end point that allowsaccess to data in the SAP HANAdatabase

OData ClientLibrary

Client

Data Source

ODataService

OData DataModel

ODataProtocol

Page 22: OpenSAP HANA1 Week 04 Exposing and Consuming Data With OData Presentation

© 2013 SAP AG. All rights reserved. 3Public

OData ServicesOData Capabilities in SAP HANA

AggregationUse functions to aggregate columns

AssociationsExpress relationships between entities

Key SpecificationEntityType denotes a set of propertiesforming a unique key

Parameter Entity SetsInput parameters for SAP HANAcalculation views and analytic views

Property ProjectionRestrict the number of selectedcolumns to expose

Entity ContainerEntity Set

Entity

Property NavigationProperty

Entity

Property NavigationProperty

Entity

Property NavigationProperty

Association

Entity SetEntity

Property Property

Entity

Property Property

Property

Property

Association

Page 23: OpenSAP HANA1 Week 04 Exposing and Consuming Data With OData Presentation

© 2013 SAP AG. All rights reserved. 4Public

OData ServicesOData Development Process

Data End PointDefine which data to expose(for example, table)

OData Service DefinitionDefine mechanism to exposeauthorized data

UI Call to OData ServiceLink UI table view to the ODataservice

OData Display/TestURL filters: $top, $format,$orderby, $filter, $select…

Page 24: OpenSAP HANA1 Week 04 Exposing and Consuming Data With OData Presentation

Week 4 Unit 5: Creating a SimpleOData Service

Page 25: OpenSAP HANA1 Week 04 Exposing and Consuming Data With OData Presentation

© 2013 SAP AG. All rights reserved. 2Public

Creating a Simple OData ServiceThe Service Definition File

.xsodata fileThe XS OData servicedefinition

NamespaceLocation of the XS ODataservice definition in the SAPHANA repository

Table SchemaSchema containing the tableswith the data to expose

Table NameName of table containingdata to expose with ODataservice

Page 26: OpenSAP HANA1 Week 04 Exposing and Consuming Data With OData Presentation

© 2013 SAP AG. All rights reserved. 3Public

Creating a Simple OData ServiceCreating a Service Definition

Create DB tableContains data to expose with the ODataservice

Grant privileges for OData table/viewEnable access to data exposed with ODataservice

.xsodata fileCreate the service definition flat file

Service definitionsDefine the OData service: what to expose,how, and to whom

Page 27: OpenSAP HANA1 Week 04 Exposing and Consuming Data With OData Presentation

© 2013 SAP AG. All rights reserved. 4Public

Creating a Simple OData ServiceTesting a Service Definition

ActivationCreate catalog object to view

Browser URIsCall .xsodata service

Browser ToolsJSONView/XML Tree

Basic options$metadata, $filter, $orderby,$select

SyntaxAtom or JSON-compliantformat

Page 28: OpenSAP HANA1 Week 04 Exposing and Consuming Data With OData Presentation

Week 4 Unit 6: Creating a ComplexOData Service

Page 29: OpenSAP HANA1 Week 04 Exposing and Consuming Data With OData Presentation

© 2013 SAP AG. All rights reserved. 2Public

Creating a Complex OData ServiceOData Service Definition Syntax

Multiple entitiesDefine multiple tables in theservice definition

Entity relationshipsDefine associations betweendifferent table entities

Association syntax1:1 association between tables– BusinessPartners– BPAddress

Page 30: OpenSAP HANA1 Week 04 Exposing and Consuming Data With OData Presentation

© 2013 SAP AG. All rights reserved. 3Public

Creating a Complex OData ServiceOData Query Syntax

Entity setsDisplay combined results from thedefined entities

MetadataDisplay attributes of the ODataservice

Table data

Page 31: OpenSAP HANA1 Week 04 Exposing and Consuming Data With OData Presentation

Week 4 Unit 7: Calling an ODataService from the User Interface

Page 32: OpenSAP HANA1 Week 04 Exposing and Consuming Data With OData Presentation

© 2013 SAP AG. All rights reserved. 2Public

Calling an OData Service from the User InterfaceThe SAPUI5 Shell

Core HTML file

SAPUI5 view

SAPUI5 bootstrap

SAPUI5 control libraries

Page 33: OpenSAP HANA1 Week 04 Exposing and Consuming Data With OData Presentation

© 2013 SAP AG. All rights reserved. 3Public

Calling an OData Service from the User InterfaceOData Requests

Built-in filteringBy string

Built-in sortingAscendingDescending

Page 34: OpenSAP HANA1 Week 04 Exposing and Consuming Data With OData Presentation

Thank you

Contact information:

[email protected]

Page 35: OpenSAP HANA1 Week 04 Exposing and Consuming Data With OData Presentation

© 2013 SAP AG. All rights reserved. Public

© 2013 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.

National product specifications may vary.

These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation orwarranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Groupproducts and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothingherein should be construed as constituting an additional warranty.

SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG inGermany and other countries.Please see http://www.sap.com/corporate-en/legal/copyright/index.epx#trademark for additional trademark information and notices.

© 2013 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.

National product specifications may vary.

These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation orwarranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Groupproducts and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothingherein should be construed as constituting an additional warranty.

SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG inGermany and other countries.Please see http://www.sap.com/corporate-en/legal/copyright/index.epx#trademark for additional trademark information and notices.