27
Migrating MBO Apps from Sybase Unwired Platform to OData on SAP Mobile Platform 3.0 or HANA Cloud Platform mobile services (HCPms) This paper explains the steps of converting MBO based apps on Sybase Unwired Platform (SUP) to OData on SAP Mobile Platform 3.0 or HANA Cloud Platform mobile services (HCPms) The general theme of this approach is to keep certain aspects of an application, such as the existing client user interface and services, and replace the underlying communication and mobile enabling services with the new SAP Mobile Platform 3.0 SDKs and HCPms. Innovapptive Thought Leadership - Migration to SAP Mobile Platform 3.0

Innovative mobile apps – migrate MBO apps to SAP Mobile Platform 3.0

Embed Size (px)

Citation preview

Page 1: Innovative mobile apps – migrate MBO apps to SAP Mobile Platform 3.0

Migrating MBO Apps from Sybase Unwired Platformto OData on SAP Mobile Platform 3.0 or HANA Cloud Platform mobile services (HCPms)

This paper explains the steps of converting MBO based apps on Sybase Unwired Platform (SUP) to OData on SAP Mobile Platform 3.0 or HANA Cloud Platform mobile services (HCPms)The general theme of this approach is to keep certain aspects of an application, such as the existing client user interface and services, and replace the underlying communication and mobile enabling services with the new SAP Mobile Platform 3.0 SDKs and HCPms.

Innovapptive Thought Leadership - Migration to SAP Mobile Platform 3.0

Page 2: Innovative mobile apps – migrate MBO apps to SAP Mobile Platform 3.0

Innovapptive Thought Leadership - Migration to SAP Mobile Platform 3.0

2

Executive Summary

SAP’s Mobile Application Development Platform (MADP) portfolio has been helping organizations leap over mobile app development hurdles with an open, standards-based mobile app development platform and rapidly design cost-effective, innovative mobile apps whether in the cloud or on-premise. Even with the earlier versions of Sybase Unwired Platform (SUP), SAP has helped enterprises take advantage of mobile’s endless business opportunities with secure access to back-end systems, perfect visibility into operations, and dramatically increased productivity due to a user-friendly environment.

With the release of SAP Mobile Platform 3.0 (SMP 3.0) and the newly released SAP HANA Cloud Platform mobile service, enterprises can streamline the development, delivery, security, and management of mobile apps. This integrated platform helps developers efficiently build any-device apps that run on-premise or in the cloud. With SMP 3.0 becoming SAP’s new industry platform for developing mobile applications, enterprises globally are facing the challenge to migrate their existing Mobile Business Objects (MBO) based SUP applications to the open standards of OData. This migration could involve extensive effort, cost and other technological complexities if not handled in the right fashion. This paper attempts to address these issues and finally focuses on the primary steps to migrate from SUP MBO based apps to SMP 3.0 OData based apps.

This paper starts with an overview of SUP and slowly explores the capabilities of SMP 3.0 and its key takeaways to get started with the technological paradigms associated with SUP MBO data migration. It also covers the various migration strategies and the conversion stages to help you get started with the migration process.

Overview of Sybase Unwired Platform

Sybase Unwired Platform, as a mobile enterprise application platform enables enterprise developers to simply and quickly develop applications that connect business data to mobile workers on any device. Built on proven, industry-leading technology, the Sybase Unwired Platform addresses the difficult mobile challenge of creating and managing multiple mobile applications that securely connect a variety of heterogeneous back-end data sources to all major device types. As the enterprise landscape becomes increasingly complex, Sybase Unwired Platform enables enterprises to embrace mobility across the entire organization through the use of a consistent, but highly adaptable, development platform.

SUP as a mobile enterprise application platform is flexible and provides open infrastructure, securely integrating heterogeneous back-end data sources to sizable mobile device types. SUP was designed to ease the task of developing applications that integrate business data to mobile devices for workflow management and back-office integration. Application developers code the business logic of a mobile application with the help of development tools in SUP. The platform automatically executes the translation required to generate customized versions of the new application for a wide range of mobile devices of operating systems. The main purpose is to ensure simplicity and faster development of complex applications that use varied data sources and to make them work on multiple mobile devices.

Eclipse supports the aspect of SUP, and the development tasks connected with the user interface and logic are supported in two models:

Page 3: Innovative mobile apps – migrate MBO apps to SAP Mobile Platform 3.0

Innovapptive Thought Leadership - Migration to SAP Mobile Platform 3.0

3

1. Building native applications using programming languages native to mobile operating systems in an integrated development environment (IDE) using the generated API.2. Codeless container-driven approach - metadata drives the application interface and logic.

SUP uses Mobile Business Objects (MBO) to address the data elements of mobile application. MBO development connotes defining object data models with back-end Enterprise Information System (EIS) connections, attributes, operations and relationships that ensure filtered data sets to be synchronized to the device. The tools in Eclipse offer support for both online and offline access to data mobilization, applications, services and processes.

An overview of some of the key components of SUP include:

Sybase Unwired Workspace: Ensures modeling (provides a graphical environment) of mobile business objects (MBOs)Mobile Workflow Forms Designer: Provides instant mobilization of business processes, while eliminating coding.Device Application Designer: Provides a platform wherein developers can create prototype mobile applications with the help of code generation approach.Sybase Control Center: Lets administrators to administer, manage and oversee SUP.Sybase Unwired Server: Is a middleware component that offers the runtime infrastructure.

Overview of SAP Mobile Platform 3.0

In 2014, SAP launched its latest product in the MADP space focusing on providing its customers with an open, secure and full-spectrum mobile platform. SMP 3.0 is now the latest standard that provides an open development environment, enabling users to develop mobile applications with familiar environments and languages, open source tools and third party toolkits, libraries and frameworks. Using SMP 3possible to swiftly design cost-effective and intuitive apps with the most open and standards - based mobile application development platform.

SAP Mobile Platform

B2E B2B B2C

Open and Standards-

based

Rapid with SDKs

Native Hybrid

Mobile Web Metadata

SMS

Android iOS

Windows Offline

App Services

Platform Services

Layered Protection of the Enterprise

Back-end Agnostic

Lifecycle Management

Analytics and Reporting

Page 4: Innovative mobile apps – migrate MBO apps to SAP Mobile Platform 3.0

Innovapptive Thought Leadership - Migration to SAP Mobile Platform 3.0

4

From a technological point-of-view it’s easy to see how SMP is superior compared to its earlier versions. Key benefits are -

Using a single architecture, multiple services, you can scale the complexity of mobile apps Open source and open standard based mobile platform: Supports OSGi Spring, HTML5, HTTP Rest, OData and CordovaData integration capabilities (both SAP and non-SAP servers) using Integration Gateway and is deployed on the SMP 3.0 server. Bonds the technology divide with OData Renders support for all major operating systems Provides Kapsel architecture (container) to support offline capabilitiesProvides native OData SDK.Offers platform SDK - mobile application framework. Offers Agentry, which is an open UI framework that lets developers to work on their own customer UI representation of an Agentry screen.

SMP 3.0 Toolkit

SMP 3.0 is the best in breed technology platform, converging the cutting edge technologies such as SUP, Syclo Agentry, Sybase Mobilizer and SAP integration gateway. SMP services can be leveraged for a variety of functions like -

Data authenticationSecure data accessIntegration of SAP and non-SAP back-end software

AppBuilder for designing your UI5 app.

OData Modeler that lets you build your data model.

Mobile application workbench that lets you customize your apps.

Agentry Eclipse tooling that lets you customize your Syclo Apps

SMS builder that lets you develop SMS based apps.

Integration Gateway that enables you to map backend interfaces to OData

Page 5: Innovative mobile apps – migrate MBO apps to SAP Mobile Platform 3.0

Innovapptive Thought Leadership - Migration to SAP Mobile Platform 3.0

5

Versioning of applicationsLife-cycle managementUsage analyticsEnd-to-end traceability

Why Migrate to SAP Mobile Platform 3.0

Easily manage apps with simplified Admin UI - HTML5 based; integrates Agentry and SUP and provides application centric UX design.Configure push notifications for variety of devices such as IOS Android, Blackberry and Windows 8, Windows Phone. Authentication and SSO (Single Sign On) feature that lets you configure end-to-end authentica-tion from the client to the back end without a VPN.Integrates with your security policies with authenticated support provided for the following authentication mechanisms including CA Siteminder, SSO and Basic Auth. Provides app analytics - usage reporting by various stakeholders including user, device, appli-cation and vendor. Provides Trace and runtime analysis - graphical depiction of run times - per app or across all apps and detailed logging and tracing.

Migrating to SAP Mobile Platform 3.0

Now that SAP Mobile Platform 3.0 became the SAP recommended Mobile Application Development Platform (MADP) of choice for several SAP customers, the next big question is how do you migrate the existing SUP MBO based apps to SMP OData based architecture. This poses a big challenge.

The best method is to start a redesign project. Please note that in case your apps are only consuming SAP back end systems, you have to model the OData service in the SAP back end on SAP’s NetWeaver Gateway. Or else, you can model OData service on SMP 3.0 Integration Gateway, where you can model OData services that consume JDBC, SOAP Web services or JPA back end sources. In addition to that, you also have to perform the following functions:

Redevelop the client app.Delete all MBO libraries and system classes. Insert the SMP OData libraries (only available for Android and iOS).

Assuming that there is no client database any longer, OData offline only provides you with a persistent cache that lets you store OData documents (responses/requests).

The next table provides you with an overview about the possible SMP specific application types and the corresponding information (replacement, migration effort & strategy) to get started with the migration strategy.

Page 6: Innovative mobile apps – migrate MBO apps to SAP Mobile Platform 3.0

Innovapptive Thought Leadership - Migration to SAP Mobile Platform 3.0

6

Strategies for Migration

It is possible to migrate all SAP applications including SAP® Mobile Platform 2.x, Agentry applications, MBO applications and OData applications to SAP Mobile Platform 3.0. You can choose three different strategies if you intend to migrate to SAP mobile platform 3.0, depending on your situation.

RedeploySome of the applications that can be redeployed to SAP Mobile Platform 3.0 are -

AgentryMobiliserSAP Mobile Platform version 2.3. Agentry Mobiliser applications

One thing to be noted here is no built-in upgrade support exists to migrate applications from version 2.x to version 3.0, which entails you to set up parallel infrastructure in a production environment with a scheduled switchover. This might again require you to redeploy application clients.

RedevelopBased on the type of the application that needs to be migrated, you may need to redevelop SAP Mobile Platform 2.x MBO applications - both native offline-able applications and hybrid web container applica-tions with the help of online MBOs. Apart from that, you may also need to pool up efforts to redevelop applications that use HTTP and on device portal (ODP).

The basic philosophy behind this strategy is to retain certain areas of an application such as the existing

Page 7: Innovative mobile apps – migrate MBO apps to SAP Mobile Platform 3.0

Innovapptive Thought Leadership - Migration to SAP Mobile Platform 3.0

7

client user interface and services and replace the underlying communication and mobile enabling services with the new SAP Mobile Platform 3.0 SDKs and services.

Redesign

In terms of cost-benefit analysis perspective of applying migration strategies, it may sometimes seem prudent to commence the migration effort from the beginning. In such scenarios, you should only think of migrating back-end services to OData centric services with Delta token capabilities to support message-based delta synchronization.

Primary Migration Activities for MBO to OData Migration

Mobile Apps built on SAP Mobile Platform version 2.X MBO framework can be migrated to SAP Mobile Platform 3.0 OData services by leveraging the OData SDK and the OData service standard functionality offered in SAP NetWeaver Gateway.

OData services can be used to implement -

Entity set with delta query support to replace the delta download process of MBOs to support offline

Create, update, and delete (CUD) operations to replace the upload process of MBOs.

$filters to replace MBO synchronization/personalization parameters.

The steps for migrating SUP MBO components to SMP OData services are below -

1. Setting Up the MBO-to-OData Development Environment2. Build OData Services with NetWeaver Gateway Service Builder3. Implement GET_ENTITYSET for Defined Entities4. Implement Filters to Replace Parameters and Personalization Keys5. Create, Update, and Delete Entities6. Delta Query Support for OData Services Exposed in NetWeaver Gateway

Below is a brief overview of each step to get started with the migration process -

Step 1 - Set Up the MBO-to-OData Development Environment

In order to create SAP components that replace SAP MBOs and expose them as OData services, you need to primarily set up your development environment. To do this, you need to install SAP NetWeaver Gateway version 2.0 SP07 or later.

Step 2 - Build OData Services with NetWeaver Gateway Service Builder

You can use NetWeaver Gateway (NWGW) to build OData services in an Advanced Business Application Programming (ABAP) system. The NWGW Service Builder is a design-time transaction that offers powerful tools to develop OData services that expose SAP business data.

Using a SAP graphical user interface exposed by the SEGW transaction code, you can access Service Builder with which you can create OData services from existing Entity data models, SAP ABAP data dictionary structures or SAP interfaces.

7

Page 8: Innovative mobile apps – migrate MBO apps to SAP Mobile Platform 3.0

Mobile Quality Management for SAP® ERP

8

Step 3 - Implement GET_ENTITYSET for Defined Entities

A GET_ENTITYSET method corresponds to a QUERY operation that returns zero to many entries. Its primary role is to generate the entity collection and is the equivalent of downloading and synchronizing MBOs.

Each entity has a corresponding service implementation that executes at runtime. In order to support the maintenance of the entity, you can implement standard operations such as create, read, update, and delete (CRUD) as well as query. For each entity type, a standard set of five method shells are generated -

<Entity>_GET_ENTITYSET - corresponds to a common “Get List” query and is also functionally equivalent to a full MBO download. A standard GET_ENTITYSET operation call returns the entire entity collection without any filters.

<Entity>_GET_ENTITY - corresponds to a read operation.

Sample screen showing Data Models creation (using import feature)

Sample screen showing ABAP structure

Innovapptive Thought Leadership - Migration to SAP Mobile Platform 3.0

Page 9: Innovative mobile apps – migrate MBO apps to SAP Mobile Platform 3.0

9

Innovapptive Thought Leadership - Migration to SAP Mobile Platform 3.0

<Entity>_CREATE_ENTITY

<Entity>_UPDATE_ENTITY

<Entity>_DELETE_ENTITY

The actual implementation varies from simple to complex, based on the entity, operation type, and the corresponding business object in the business back-end.

Step 4 - Implement Filters to Replace Parameters and Personalization Keys

You can use the OData $filter system query option to query a subset of entries from a collection of entries, using an expression specified in the query option.

These example expressions illustrate the $filter option -

.../SalesOrders?$filter=SoID eq '500000000'

returns the sales order with SoID equal to ‘500000000’

…/SalesOrders?$filter=BuyerName eq 'SAP'

returns sales orders bought from SAP

In order to meet the requirements set for MBOs, including those defined by load parameters, synchronization parameters and personalization keys, filtering along with delta query options can be used. However, on account of internal differences between the MBO model and the OData standard, a direct mapping between respective features cannot be achieved and expect limitations from either perspective.

Step 5 - Create, Update and Delete Entities

Implement CREATE_ENTITY, UPDATE_ENTITY, and DELETE_ENTITY methods, which replace SAP Mobile Platform 2.X MBO equivalent operations.

You can modify the MBO definition with create, update, and delete operations, and map them to insert, update, or delete MBO records at the client side with respective BAPI operations that are called and executed on the SAP backend. An OData service provides equivalent functionality by utilizing the REST compliant, HTTP based requests using the POST, PUT and DELETE methods to create, update, or delete entities respectively.

Sample screen shot for implementing GetEntitySet

Page 10: Innovative mobile apps – migrate MBO apps to SAP Mobile Platform 3.0

Innovapptive Thought Leadership - Migration to SAP Mobile Platform 3.0

10

SAP NetWeaver Gateway exposes such OData services and offers an OData channel runtime API that can be used to implement the create, update, and delete operations on the ABAP back-end. The ABAP interface /IWBEP/IF_MGW_APPL_SRV_RUNTIME is the central runtime interface implemented by every data provider class of a gateway exposed OData service. It consists of all the relevant methods for creating, updating, and deleting entities, and also those used for retrieving or downloading data (for example, GET_ENTITYSET). For create, update, and delete operations, the relevant methods are -

CREATE_ENTITY and CREATE_DEEP_ENTITY

UPDATE_ENTITY

DELETE_ENTITY

Step 6 - Delta Query Support for OData Services Exposed in NetWeaver Gateway

Convert MBO-based delta-tracking mechanisms to OData service delta-tracking mechanisms to support offline capabilities.

Sample screen showing ABAP structure

Page 11: Innovative mobile apps – migrate MBO apps to SAP Mobile Platform 3.0

Innovapptive Thought Leadership - Migration to SAP Mobile Platform 3.0

Comparing SAP Mobile Platform Version 2.x and 3.x Delta Tracking

SAP Mobile Platform 2.X uses replication-based synchronization between a client-side database and server-side cache database (CDB) to provide data communication between mobile applications and back-end systems. The CDB tracks deltas between back-end systems and the clients. To track changes -

SAP Mobile Platform Server must query the back end for all data, and check each row for changes. For instance, it uses a Scheduled or On-Demand cache group policy

OR

The back-end system must submit changes as they occur to the CDB. For example, it uses a data change notification (DCN). This option is more efficient, since it does not require each row of data to be checked for changes.

SAP Mobile Platform 3.X delta tracking is managed by the back-end system. OData services can leverage delta queries and delta tokens to mimic 2.X CDB delta-tracking capabilities.

Here is a walk through the steps that are needed to configure the OData service on SMP -

1. Login into SMP

2. Click Applications

3. In the Applications screen, click New that opens a New Application pop-up screen.

11

Page 12: Innovative mobile apps – migrate MBO apps to SAP Mobile Platform 3.0

12

Innovapptive Thought Leadership - Migration to SAP Mobile Platform 3.04. In the New Application pop-up screen, fill in the required details and click Save.

5. Under the BACK END tab, type serviceurl of the OData services in the Endpoint field.

6. Under the AUTHENTICATION tab, enter the appropriate authentication details.

Page 13: Innovative mobile apps – migrate MBO apps to SAP Mobile Platform 3.0

Migration of MBO components API to SMP OData services

The subsequent steps illustrate the migration of SUP MBO components API to SMP OData services API on mobile app. For each step, there is a block of code that needs to be executed to move to the next step. The following are the steps for migration -

Step 1 - Remove the MBO generated code and libraries from the project

Step 2 - Remove SUP registration code

Step 3 - Add OData SDK libraries into the project from mobile SDK installation

Step 4 - Register SMP OData -(void)registerUserDelegate:(id<SMPUserManagerDelegate>)delegate{

ServerSettings *serverSettings = [ServerSettings getFromUserDefaults]

/***

Create Client Connection object with app id, domine, and security configuration .

***/

SMPClientConnection *clientConnection = [SMPClientConnection initializeWithAppID:serverSettings.appID domain:@"default" secConfiguration:serverSettings.securityConfiguration];

if ([self.appConnectionID length]>0 ) {

[clientConnection setApplicationConnectionID:self.appConnectionID];

}

/***

Set the Host and port for Connection object.

***/

[clientConnection setConnectionProfileWithHost:serverSettings.smpHostAddress port:serverSettings.mbsPort farm:nil relayServerUrlTemplate:nil enableHTTP:YES];

/***

Registoring user async we must provide usermanager registrator handler.

And it must implement the userRegistrationFailed: and userRegistrationSuccessful:

***/

self.userRegistorDelegate =delegate;

SMPUserManager *userManager =[SMPUserManager initializeWithConnection:clientConnection];

NSError *error;

if ([self.appConnectionID length] ==0 )

{

BOOL isUserRegistored = [userManager registerUser:self.gateWayUserName password:self.gateWayUserPassword error:&error isSyncFlag:YES];

13

Innovapptive Thought Leadership - Migration to SAP Mobile Platform 3.0

Page 14: Innovative mobile apps – migrate MBO apps to SAP Mobile Platform 3.0

if (isUserRegistored) {

[self.userRegistorDelegate userRegistrationSuccessful:userManager];

}else{

[userManager setRegistrationError:error];

[self.userRegistorDelegate userRegistrationFailed:userManager];

}

}

else

{

[self.userRegistorDelegate userRegistrationSuccessful:userManager];

}

/***

Print any primary error is there.

***/

if (error) {

NSLog(@"Error = %@",error);

}

Step 5 - Define BO Class for UI#import <Foundation/Foundation.h>

@interface NewSubstituteBO : NSObject

@property(nonatomic)int64_t primaryKey;

@property(nonatomic,retain)NSString *substituteUserName;

@property(nonatomic,retain)NSString *firstName;

@property(nonatomic,retain)NSString *lastName;

@property(nonatomic,retain)NSString *phoneNumber;

@property(nonatomic,retain)NSString *email;

@property(nonatomic,retain)NSString *orgPosition;

@end

Step 6 - Bind request response of entry data to BO Class for (ODataEntry *entry in entries)

{

ItemDetailsBO *itemDetail1 = [[ItemDetailsBO alloc] init];

[itemDetail1 setName:[entry getPropertyValueByPath:@"SubstituteUname"].rawValue];

[itemDetail1 setUserName:[entry getPropertyValueByPath:@"UserName"].rawValue];

[itemDetail1 setSubstituteName:[entry getPropertyValueByPath:@"SubstituteName"].rawValue];

Innovapptive Thought Leadership - Migration to SAP Mobile Platform 3.0

14

Page 15: Innovative mobile apps – migrate MBO apps to SAP Mobile Platform 3.0

15

Innovapptive Thought Leadership - Migration to SAP Mobile Platform 3.0[itemDetail1 setSubstitutePernr:[entry getPropertyValueByPath:@"SubstitutePernr"].rawValue];

}

Step 7 - Set Up Cache-(void)setUPCache{

/***Get Encrypt for application, stor the key in userdefaults, and set the encrypt key everytime application lunches to EncryptinKeyManager.***/

NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];

NSString *key= [userDefaults objectForKey:ENCRIPT_KEY];

[self.userRegistorDelegate userRegistrationSuccessful:userManager];

}

if (key == nil) {

key = [EncryptionKeyManager getEncryptionKey:nil];

[userDefaults setObject:key forKey:ENCRIPT_KEY];

[userDefaults synchronize];

}

else{

NSError *error = nil;

[EncryptionKeyManager setEncryptionKey:key withError:&error];

}

/***Initialize the Cache once for the application launch.***/

id<Caching>defaultCache = [[Cache alloc] init];

[defaultCache setIsPersistable:YES];

NSError* error = nil;

if (![defaultCache initializeCacheWithError:&error]) {

NSLog(@"Initialize Error : %@@", error);

return;

}

}

Step 8 - Store entries data to cache/**

** Merge Entries to Cache.

**/

-(void)mergeEntriesWithFeed:(ODataFeed*)feed forUrlKey:(NSString*)urlKey

Page 16: Innovative mobile apps – migrate MBO apps to SAP Mobile Platform 3.0

{

id<Caching> cache = [[Cache alloc] init];

NSError* error = nil;

[cache mergeEntriesFromFeed:feed forUrlKey:urlKey withError:&error withCompletionBlock:^(NSNotification *notification) {

NSLog(@"%@", notification);

}];

if(error) {

NSLog(@"Merge Error: %@@", error);

}

}

Step 9 - Read entries from cache/**

** Read Server Entries From Cache.

**/

-(NSMutableArray*)readServerEntriesFromCacheForURlKey:(NSString*)urlKey

{

// Fetching the Entries From Cache.

id<Caching> cache1 = [[Cache alloc] init];

NSError* error1 = nil;

NSMutableArray* cachedEntries = (NSMutableArray*)[cache1 readEntriesForUrlKey:urlKey withError:&error1];

if (error1)

{

NSLog(@"Read Error : %@", error1);

return nil;

}

return cachedEntries;

}

Step 10 - Enable Offline POST, PUT and DELETE [RequestBuilder setDelegate:self];

[RequestBuilder setDidFinishSelector:@selector(OfflineRequestSuccesSelector:)];

[RequestBuilder setDidFailSelector:@selector(offlineRequestFailedSelector:)];

Innovapptive Thought Leadership - Migration to SAP Mobile Platform 3.0

16

Page 17: Innovative mobile apps – migrate MBO apps to SAP Mobile Platform 3.0

Innovapptive Thought Leadership - Migration to SAP Mobile Platform 3.0

Migrating to SAP HANA Cloud Platform mobile services (HCPms) The final section of this white paper illustrates how you can migrate SUP MBO components to SMP OData based apps on SAP HANA Cloud Platform mobile services (HCPms).

But, before we proceed with the migration steps on HCPms, it is essential to understand the SAP HANA Cloud Platform offering and then proceed with the technical details of how to enable SAP HANA Cloud Platform mobile services and subsequently understand how you can install and configure the SAP HANA Cloud Connector.

What is the SAP HANA Cloud Platform (HCP) ?

SAP HANA Cloud Platform (HCP) is the in-memory Platform-as-a-Service offering from SAP that lets customers and developers to build, extend and run applications on SAP HANA in the cloud. It offers flexible subscription models and services for infrastructure, database and application development, providing an instant access to the full power of SAP HANA.

SAP HANA Cloud Platform provides a wide variety of benefits for developers and SAP customers - it powers applications that deliver real-time insights to drive more effective and timely decision making. Using SAP HANA Cloud Platform, you can dramatically quicken analytics, business processes, sentiment data processing and predictive analytics to run your business in real-time.

17

Image Credit : SAP

Page 18: Innovative mobile apps – migrate MBO apps to SAP Mobile Platform 3.0

Innovapptive Thought Leadership - Migration to SAP Mobile Platform 3.0

What is the SAP HANA Cloud Platform mobile services (HCPms) ?

SAP Mobile Platform 3.0 and HCPms are different offerings from SAP, that serve the same basic purpose – integrating mobile applications to the SAP Business Suite. In developing HCPms, SAP has merged the two source-code baselines so that the bulk of the code is common between the two products and there-fore expose the same behavior. A key benefit of this approach is that it allows SAP to develop features, deploy it to HCPms and customers and developers can benefit from it and with the next update of SMP 3.0 on-premise customers will have the same feature available as well. All this glued together with a single mobile SDK means that an app written for HCPms can also run against SMP 3.0 - no code change required.

HCPms supports full-cloud scenarios, where the back-end is already available in the cloud as well as hybrid-cloud scenarios where the back-end is located on premise. The latter is made possible by the SAP HANA Cloud Connector, which establishes a secure connection and allows whitelisting of resources to be accessed by HCPms. The following picture explains the full and hybrid cloud scenarios.

Key Features of HCPms -

Flexible and Scalable runtime for mobile Apps Shares SDK with SMP 3.0Enables Offline ApplicationsEnhanced Push APISupports native and hybrid web Apps, both online and offline with Odata

Enabling SAP HANA Cloud Platform mobile services (HCPms)

The most important pre-requisite for this is mandatory subscription to HANA cloud platform. You can accomplish this enablement by following the 4 steps outlined below -

Step 1 - Enable SAP HANA cloud platform

1. Open your browser and navigate to https://hanatrial.ondemand.com/cockpit2. Click Services in the content pane on the left.

Image Credit : SAP

18

Page 19: Innovative mobile apps – migrate MBO apps to SAP Mobile Platform 3.0

Innovapptive Thought Leadership - Migration to SAP Mobile Platform 3.0

3. Under the list of services, look for SAP HANA cloud platform and click Enable. 4. Wait for a couple of seconds. The screens gets updated (as shown in the below screen shot).

Step 2 - Subscribe mobile services Admin Cockpit to your HCP account.

1. Click Subscriptions in the Content pane2. Click New Subscription.3. Select sapmobile and hcpmsadmin from the Provider Account and Application Name fields respectively.4. Click Create to confirm that displays the following screen -

5. Now click the link hcpmsadmin and click Roles in the Content pane6. Next click New Role.7. In the dialog box that opens, type HanaMobileAdmin as the role name and click Confirm.8. In the SAP HANA Cloud Platform Cockpit screen, click Assign (in the lower part of the screen).9. Assign your user to the newly created role by entering your SCN ID in the displayed dialog box. Note: Ensure that you select the HanaMobileAdmin role in the role list. If you had followed all the steps, the screen should be displayed -

19

Page 20: Innovative mobile apps – migrate MBO apps to SAP Mobile Platform 3.0

Innovapptive Thought Leadership - Migration to SAP Mobile Platform 3.0

20

Step 3 - Enable communication between the Admin Cockpit and the mobile services core

1. Click your account name in the upper left corner (the link is labeled S00XXXXXXtrial) to navi-gate back to the start screen. 2. Click Destinations in the content pane.3. Now create the following destinations.

Once you have successfully created the destinations, the screen should look like this -

Option Description

Name HMAdminJaxrs

Type HTTP

URL https://hcpms-<scn-user-name>trial.hanatrial.ondemand.com/Admin/

Proxy Type Internet

Cloud Connector Version

2

Authentication AppToAppSSO

Option Description

Name HMAdminHandlers

Type HTTP

URL https://hcpms-<scn-user-name>trial.hanatrial.ondemand.com/Admin/AdminData

Proxy Type Internet

Cloud Connector Version 2

Authentication AppToAppSSO

Page 21: Innovative mobile apps – migrate MBO apps to SAP Mobile Platform 3.0

Innovapptive Thought Leadership - Migration to SAP Mobile Platform 3.0

21

Step 4 - Assign admin role

In the SAP HANA Cloud Platform Cockpit screen -a. Click Services in the Content paneb. In HANA Cloud Platform mobile services row, click the right icon, consisting of an image. c. From the list of roles, click the Administrator row.d. Click Assign (in the lower part of the screen).e. In the dialog box that opens, type your S-user id and click Assign to confirm.

Page 22: Innovative mobile apps – migrate MBO apps to SAP Mobile Platform 3.0

Innovapptive Thought Leadership - Migration to SAP Mobile Platform 3.0

Now navigate back to the Services view using the content pane and click Go to Service. You will be re-directed to the HANA Cloud Platform mobile services Admin Cockpit screen.

This concludes the set up of HANA Cloud Platform mobile services and it is now possible to start working with HCPms.

To connect your mobile application, you can point it to:https://hcpms-<scn-user-name>trial.hanatrial.ondemand.com/<APPID>, once you have a valid app configuration.

SAP HANA Cloud Connector

SAP HANA Cloud Connector works as a link between on-demand applications in SAP HANA Cloud Platform and existing on-premise systems. It integrates an easy setup with a clear configuration of the systems that are exposed to SAP HANA Cloud Platform. Apart from that, you can control the resources available for the cloud applications in those systems. You can thus benefit from your existing resources, without the necessity to expose the whole internal landscape.

The cloud connector offers light and simple way to establish secure connections from on-premise systems to SAP HANA Cloud Platforms. It supports Microsoft Windows OS, Linux OS and Mac OS X operating systems.

22

Page 23: Innovative mobile apps – migrate MBO apps to SAP Mobile Platform 3.0

Innovapptive Thought Leadership - Migration to SAP Mobile Platform 3.0

23

Installing and Configuring the SAP HANA Cloud Connector

InstallationNote: This white paper covers the installation steps for Microsoft Windows OS only.

Prerequisites

Microsoft Windows 7 or Windows Server 2008 R2, 64-bit operating system.Download either the ZIP archive for the developer's use case on Windows, or the MSI installer for

productive usage from the SAP Development Tools for Eclipse Page. Install Microsoft Visual Studio C++ 2010 runtime libraries. Install Java 6 or Java 7. Set up Environment variable <JAVA_HOME> for the Java installation directory, so that the bin subfolder can be found. Alternatively, when using the ZIP file, you can add the relevant bin directory to the <PATH> variable.

Developer's Use Case

1. Extract the <sapcc-<version>-windows-x64.zip> zIP file to an arbitrary directory on your local file system.2. Make modifications to this directory and start Cloud connector 2.x via the go.bat batch file.3. Continue with the Next Steps section.

Note: Cloud connector 2.x is not started as a service in the Developer's use case, and hence will not automatically start after a reboot of your system.

Productive Use Case

1. Start the <sapcc-<version>-windows-x64.msi> installer by double-clicking it.2. The installer notifies that you are now guided through the installation process. Click Next. 3. The installer reminds you that you need to have at least Java 6 installed. If you have met this requirement, click Next. 4. You can select the port on which the administration UI is reachable. Either leave the default 8443 or choose a different port if needed. Then click Next.5. Navigate to the installation directory for your SAP HANA Cloud connector and click Next.6. Now, decide whether the Cloud connector should be started immediately after finishing the setup. If you do not want to start immediately, clear the checkbox and then click Next.7. After you have completed all the installation options and if you really want to install, again click Next. 8. Wait for a few seconds to complete the installation. Then click Close. 9. Continue with the Next Steps section.

Note: Cloud Connector 2.x is started as a Windows Service in the Productive use case. Hence, installation requires administration permissions. After installation, the service should be administrated under Control Panel > Administrative Tools > Services. The service name is SAP HANA Cloud Connector 2.0. Make sure

Page 24: Innovative mobile apps – migrate MBO apps to SAP Mobile Platform 3.0

Innovapptive Thought Leadership - Migration to SAP Mobile Platform 3.0

that the service is executed with a user that has limited privileges. Generally, privileges that are allowed for service users are defined by your company policy. Later, you should adjust the folder and file permissions to be manageable by only this user and system administrators.

Next Steps

1. In the browser, type: https://<hostname>:8443, where <hostname> is the host name of the machine on which you have installed the Cloud connector.If you access the Cloud connector locally from the same machine, you can just enter localhost.2. Continue with initial configuration of the Cloud connector 2.x. It works in the same way as for version 1.x.

Configuring the Host Mapping in the Cloud Connector

This is mandatory since the Cloud Connector only allows access to white-listed back-end systems. To do this, follow the below steps:

1. In the Cloud connector administration UI, you can check under Monitor > Audit, whether access has been denied. OP_ACCESS_DENIED, Denying access to system abapserver.hana.cloud:sapgw42Note: This step is optional. 2. In the Cloud connector administration UI, navigate to the Access Control tab page.3. Add a new system under the list of defined resources. 4. Under Mapping Virtual To Internal System, click Add and define an entry as displayed in the following screenshot. 5. Enter the host name in the Internal Host field that must be the physical host name of the machine on which the ABAP application server is running.

24

Page 25: Innovative mobile apps – migrate MBO apps to SAP Mobile Platform 3.0

Innovapptive Thought Leadership - Migration to SAP Mobile Platform 3.0

25

6. Again in the web browser, call the URL that references the cloud application. The application should now throw a different exception:

com.sap.conn.jco.JCoException: (102) JCO_ERROR_COMMUNICATION: Access denied for STFC_CONNECTION

at com.sap.conn.jco.rt.MiddlewareJavaRfc.generateJCoException(MiddlewareJavaRfc.java:632)

at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcClient.execute(MiddlewareJavaRfc.java:1764)

at com.sap.conn.jco.rt.ClientConnection.execute(ClientConnection.java:1110)

at com.sap.conn.jco.rt.ClientConnection.execute(ClientConnection.java:943)

at com.sap.conn.jco.rt.RfcDestination.execute(RfcDestination.java:1307)

at com.sap.conn.jco.rt.RfcDestination.execute(RfcDestination.java:127

at com.sap.conn.jco.rt.AbapFunction.execute(AbapFunction.java:295)

at com.sap.demo.jco.ConnectivityRFCExample.doGet(ConnectivityRFCExample.java:55)

..... (cut rest of the call stack)

This implies that the Cloud connector denied invoking STFC_CONNECTION in this system. As a final step, you need to provide access to this function module in your installed Cloud connector (covered in the subsequent procedure).

Configuring the Function Module in the Cloud Connector

This is mandatory since the Cloud connector only allows access to white-listed resources (which are defined on the basis of function module names with RFC). To accomplish this, follow the below outlined steps -

1. In the Cloud connector administration UI, you can check under Monitor > Audit, whether access has been denied. OP_ACCESS_DENIED, Denying access for user DEMOUSER to resource STFC_CONNECTION on system abapserver.hana.cloud:sapgw42Note: This step is optional. 2. In the Cloud connector administration UI, navigate to the Access Control tab page.3. For the specified internal system referring to abapserver.hana.cloud, add a new resource and select the system in the table.4. Add a new function name under the list of exposed resources. 5. Under Resources Accessible On localappserverhost.compamy.corp:sapgw23, click Add and type STFC_CONNECTION as the accessible resource as shown in the screenshot below.

Note: You need to select the Exact Name option to only expose this single function module.

Page 26: Innovative mobile apps – migrate MBO apps to SAP Mobile Platform 3.0

Innovapptive Thought Leadership - Migration to SAP Mobile Platform 3.0

26

6. Again in the web browser, call the URL that references the cloud application. The application should now return with a message displaying the export parameters of the function module after a successful invocation.

With this final function module configuration in the Cloud Connector, you are done with the process of migrating SUP MBO based apps to SMP OData based apps on SAP HANA Cloud Platform.

Summary

With the progression of SAP Mobile technology, it is evident that SAP Mobile Platform 3.0 has proliferat-ed the market and is here to stay as the technology of choice for integration of mobile solutions to the SAP Business Suite. Considering the key takeaways and value it adds to any business, it makes sense to migrate existing SUP MBO apps to SAP OData based apps, albeit cautiously - factors such as technologi-cal landscape, migration efforts and the sheer necessity need to be considered and evaluated before embarking on the migration strategy.

Further, if you are interested to build a successful cloud based enterprise mobility strategy, the last section of the white paper might interest you, where exhaustive migration steps – from SUP MBO apps to SMP OData based apps on SAP HANA Cloud Platform has been deliberated to help you get started with your cloud based mobile deployments.

Page 27: Innovative mobile apps – migrate MBO apps to SAP Mobile Platform 3.0

For more information

To learn more about Innovapptive’s mPower™ App Suite, Enterprise Mobility Strategy and Consulting, Rapid Deployment Solutions and Custom Development Services, contact your Innovapptive sales representative, visit us at www.innovapptive.com or you can email Innovapptive directly at [email protected]

Innovapptive is an SAP mobile application development and services partner, a provider of a cloud based mobile application management platform, 30+ SAP-certi-fied mobile apps, and a 2014 SAP Pinnacle Award finalist. Innovapptive offers an array of SAP Mobile products and services that accelerates customer’s time to market and value of their SAP mobile deployments. Innovapptive’s products, the mPower™ App store, a cloud based mobile application management solution and the mPower™ App Suite, prepackaged with an SAP certified add on, allow customers to achieve infinite number of customization through simple SAP configurations. The mPower™ App Suite and the mPower™ App Store provides customers a comprehensive portfolio of end-to-end mobile solutions to instantly take their enterprise mobile. The team at Innovapptive brings a unique and unparalleled combination of SAP, mobile and industry experience and have transformed large global 2000 customers such as MARS Chocolate, AMGEN, Forest City Enterprises, Semperian, EBY-Brown and Vallourec USA Corp to name a few.

© Copyright Innovapptive Inc. 2014

Innovapptive Inc.7322 Southwest Freeway, Suite 1816Houston, TX 77074USA

Produced in the United States of AmericaNovember 2014All Rights Reserved

About Innovapptive

27

Innovapptive Thought Leadership - Migration to SAP Mobile Platform 3.0