At some point you might want to migrate your existing SAP HANA extended application services, classic model application to the microservice architecture based advanced model of SAP HANA native development. This step is supported by SAP with a tool briefly called XS Advanced Migration Assistant. To show you how this tool works and supports you in the migration process, I will use the SAP HANA Interactive Education (SHINE) demo application. This blog focuses on migrating the Purchase Order Worklist application in the XS classic SHINE sample application.


Prerequisites

To perform a migration you need to be aware of the files that are not supported by the migration assistant und migrate them manually in advance. How to do this manual step, is described in the official documentation.

 

Prepare the XS classic source system.

Scenario: You run an SPS 11 XS classic source system.

Your are good to go.

Scenario: You run an XS classic system older than SPS11 and  have an SPS11 development system available.

You need the SHINE application either from the SAP Software Download Center or an existing SAP HANA extended application services, classic model development system. Then import it into an SPS 11 system.

Scenario: You run an XS classic system older than SPS11 and use the XS advanced development system as parser.

You need to configure environment settings for external parsing.

set HANAEXT_HOST=<XSA hostname>
set HANAEXT_SQL_PORT=<HANA SQL port>
set HANAEXT_USER=<HANA username>
set HANAEXT_PASSWD=<HANA password>
set HANAEXT_CERTIFICATE=</path/to/HTTPS/certificate/file>

For a Linux system, use export instead of set.

 

Run migration and evaluate migration report

Run the migration assistant.

To find out more about configuration and options go to Migrate your XS Classic Application to XS Advanced

 

 

Evaluate the migration report.

The migration report lists all items migrated for the complete SHINE application; the action items are grouped according to technical areas. In this example for our Purchase Order Worklist, action is required in the following areas:

  • Step 1: Migration of Security Concept Required

  • Step 4: XSJS JavaScript Migration Required

  • Step 5: Translation

 

 

Security related concept check

Check the authorization scope of the XS advanced user to ensure that all database calls are protected. The XS classic SHINE application contains two roles, “User” and “Admin“. These XS classic roles contain database privileges that cannot be migrated to XS advanced automatically; the XS Advanced Migration Assistant only considers the application privileges. It is essential to ensure that the XS advanced scopes are sufficient to distinguish users.

Create the required XS advanced services and feed values

To build, deploy and run the migrated SHINE application in XS advanced, it is necessary to create some XS advanced services manually.

The SAP Web IDE for SAP HANA automatically generates some XS advanced services. However, this automation does not include the User Account and Authorization (UAA) service or the synonym grantor service. You must create these services manually, for example, using the XS CLI (xs create-service command).

xs cups synonym-grantor-service -p 
xs create-service xsuaa devuser uaa -c ./xs-security.json

Adjust the generated template

You do not need to adapt anyting to the Purchase Order Worklist application. You might need to touch other parts of the SHINE application to get it started. In such a case check the xs-security.json file for references to FioriLaunchPad and delete these references. In a standard scenario these would be the references to remove:

{
  "name": "$XSAPPNAME.sap.hana.democontent.epm.ui.uis.FioriLaunchPad.WidgetAccess:FioriShineCatalog",
  "description": "Access FioriShineCatalog Widget"
},
{
  "name": "$XSAPPNAME.sap.hana.democontent.epm.ui.uis.FioriLaunchPad.AppSiteAccess:FioriShineLaunchPad",
   "description": "Access FioriShineLaunchPad AppSite"
},
{
  "name": "$XSAPPNAME.sap.hana.democontent.epm.ui.uis.FioriLaunchPad.AppSiteAccess:FioriLauncPadWithImage",
  "description": "Access FioriLauncPadWithImage AppSite"
},
{
  "name": "$XSAPPNAME.sap.hana.democontent.epm.ui.uis.FioriLaunchPad.AppSiteAccess:FioriShineLaunchPadWithTheme",
  "description": "Access FioriShineLaunchPadWithTheme AppSite"
}


 

"$XSAPPNAME.sap.hana.democontent.epm.ui.uis.FioriLaunchPad.AppSiteAccess:FioriShineLaunchPad",
"$XSAPPNAME.sap.hana.democontent.epm.ui.uis.FioriLaunchPad.AppSiteAccess:FioriShineLaunchPadWithTheme",
"$XSAPPNAME.sap.hana.democontent.epm.ui.uis.FioriLaunchPad.WidgetAccess:FioriShineCatalog"

 

Making required code updates

You need to make changes to the database container and the JavaScript container. For the Web container everything is migrated by the migration assistant.

The database (DB) container

The migrated SHINE application requires additional privileges for HDI objects in the XS advanced database (DB) container.

So you need to check the content of cfg/synonymconfig.hdbsynonymconfig and of src/synonyms.hdbsynonym and possibly add the configuration you find here.

 

The JavaScript (XSJS) container

It is not possible to guarantee that the XS Advanced Migration Assistant detects all problems in the XS classic XS Javascript xsjs code scan. You must review all issues that are listed in the XSJS section of the migration report, as shown in the documentation.

 

Translation-related artifacts

The XS Advanced Migration Assistant is not sure what to do with XS classic text bundles (.hdbtextbundle). It stores them in the todo/ folder. You must copy these text bundles (now .properties files) manually to the desired destination. Details on target locations and eventually needed code corrections are available here: Translation-Related Artifacts

 

Deploy and run the migrated application

First prepare and assign XS advanced role collections that enable access to the migrated XS advanced application. Then deploy and run the XS advanced application in the XS advanced run-time environment.

Check out this topic for assumptions, a proper sequence and more background information: Deploy and Run the Migrated Application

 

Related Links:

SAP HANA XS Advanced Migration Guide

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply