Java 9 on Java EE 8 Using Eclipse and Open Liberty

ICYDK: I wrote a post a few weeks ago titled Which IDE’s and Server’s support Java EE 8 and Java 9, which looked at the current state of play between Java 9 and Java EE 8. As you would expect things have moved quickly and we now have some alpha and development builds supporting Java 9 and Java EE 8. These are –

* Payara 5 – for payaradomain
* Open Liberty

Adam Bein posted a video, Java EE 8 on Java 9, on how to deploy a Java 9 application on Open Liberty using netbeans. It’s a great video and worth a look. https://goo.gl/r8bz1j #DataIntegration #ML

Native HANA Free trial set up with SHINE content – SP 12

SAP native HANA application has been rapidly changing or improving in the recent years, in terms of database features, application developments, ETL objects and UI developments etc. In order to catch up with those changes there has to be a continuous learning process involved. For this purpose, there are several Open SAP courses, HANA academy and documentation available on SAP Website. However, I feel it is really very important to try developing the new objects in system to understand better. for that, SAP offered a free HANA trial system for native HANA developments complemented with lots of demo objects with data.

In this document, I provide detailed and updated information on how to set up free trial system on your personal computer with ready made demo content provided by SAP.  It is advisable to refer the demo content first, then start building the objects accordingly to speed up your learning process.

Note: Free trial HANA system and SHINE demo content is for Native HANA objects only, not for S/4 HANA or BW/4 HANA object development.  It is provided with Version 1.0 SP 12.

Also, system set up and demo content is on XS classical engine, will cover XS Advanced in the next document.

This document is divided into 2 sections,  System set up and use of demo content as reference.

1. System Set up: 

a. Firstly, you will need to be a member in SAP community, mostly you all will have either PID or            SID, either of them can be used.  if not a member, then register as member in the below site.

https://www.sap.com/community/about/registration-and-profile.html

b. Register as Developer in SAP Cloud platform, below is site.  provide your member ID or your              email obtained in step 1 registration.

https://www.sap.com/developer/topics/cloud-platform.html

c. Upon registration, you are directed to SAP cloud platform, then Select Neo Trial, follow the next         steps to complete the subscription;

d. With that, Your account will be accessing the all the services provided with Trial version. Here             you can access Web IDE for UI5 application developments, also Java developments etc..                   however, in this document, I am focusing on HANA database object developments. So I will               choose Data base and schemas.

e. Create a new Data base, with the following details,  SYSTEM is the Administrator ID, with all              Privileges,  you will also enable SHINE user and provide user and password. So you got 2                  different accounts which you can use to log in to Database,  SYSTEM and p391642.

f. With this setup, data base is created,  you can try accessing the it using Web IDE platform link as        shown below,

It is a web based work bench to develop database objects, access catalog objects and also               security setup. It is an alternative to HANA studio or Eclipse. Further information on this, you               can find in help.sap.com

g. If you wanted to work on HANA Studio or Eclipse to develop database artifacts, you will have to          install these client application. I would suggest to use Eclipse over HANA studio, because                 Eclipse is open source, it can be download from internet, where as HANA studio is SAP                     software, need to install from SAP market place. Both work with same functionalities, so I will go         with eclipse.

Download Eclipse latest version, either Oxygen or Neon,

https://www.eclipse.org/downloads/download.php?file=/oomph/epp/oxygen/R/eclipse-inst-win64.exe

h. Open the application from your desktop,  install the  HANA software, use the navigation as,

go to help menu on top — > Select Install new software then provide the below and select all the         software as shown below and choose next and finish.

https://tools.hana.ondemand.com/neon

with that, you successfully installed Eclipse IDE on your computer. Then, you will need HANA            system to it.

i.  Choose, Either modeler prospective or Administration prospective,  Add cloud system as                     shown below.

j. You will provide the account name, SAP member ID and password which you got in step a.                 and choose next.

k. then select your data base and user name and password, here database user, which is either            SYSTEM or SHINE content user ID. Finish.

All set up done, you can start working on developing HANA objects either in Web workbench or         Eclipse.

2. Working on HANA development objects,

As part of Native HANA application development, several objects created, they are tables, stored        procedures, functions, calculation views, flow graphs, CDS artifacts, XSJS files, Odata service            files etc,  you can see the list in the development prospective, projects screen.

there are several HANA academy videos on how to create and work on these objects, also                 huge SAP documentation is available on web. Along with that, an demo content is prepared for           all of these objects in order to build an EPM application for business.  

You can access this content with the following navigation,

In the content  —  > sap — > hana — > demo content — > epm — > *    here you will see  several           calculation views, XSJS files, CDS objects, tables functions and procedures are provided in               order to build Enterprise procurement model, with sales and purchasing data.

these models are built on EPM demo content tables, can be accessed in the schema,                         SAP_HANA_DEMO, there is sufficient amount of data in these tables, if you need more, you can        create as well.

Using these demo content tables, you can build the following native HANA objects to improve expertise on it,

* Calculation views, to model the data which can consumed for reporting and analytics.
* Stored Procedures and Functions;  to enhance the model with more custom SQL logic.
* CDS views: modeling with data persistence can be achieved.
* Flow graphs, to design an Data flow from one of demo tables to transform the data.
* XSJS files, to write the business control logic.
* UI5 files, to create front end application for business users.

for all of these application object developments, SHINE content has got models with example            data.

Conclusion: 

With that, you can work on HANA demo system to learn the concepts before working on                      customer production system, also in order to get a good overview on all Native HANA objects,            understanding SHINE content helps a lot to start creating objects in the HANA system. More              options on SHINE for XS Advanced, will be addressed in the next document. Also suggest to go        through the open SAP course on  SHINE content.

Thanks for reading.

  http://bit.ly/2C6EJgG #SAP #SAPCloud #AI

Setup of CPI iFlow with Custom Business Object

This blog post will explain how you can model your iFlow to insert and update data in your Custom Business Object. As a prerequisite you should read blog post https://blogs.sap.com/2017/05/12/usage-of-odata-service-of-custom-business-object/.

Overall iFlow

The iFlow consists of 8 steps for mass data coming in through a SOAP service and mapping to the OData service of a custom business object (CBO). Each step is explained in detail.

The HTTP session handling is set to “On Integration Flow” to ensure that the same session is used for all calls to SAP Hybris Marketing instead of creating multiple sessions. This increases performance:

In this example the payload of an incoming SOAP Service looks like this: 6 EXTERNAL Max Mustermann 7 EXTERNAL Ellen Musterfrau 8 EXTERNAL John Doe

Step 1: Iterating Splitter to package mass data into chunks of 1000

In order to not overload the CBO backend system the data is handled in chunks of 1000. An iterating splitter is used for that purpose. The incoming payload is split at the token :

After the split the payload looks like this: 6 EXTERNAL Max Mustermann 7 EXTERNAL Ellen Musterfrau 8 EXTERNAL John Doe

Step 2: Process Call to Local Integration Process “Enrich SAP_UUID”

To update or delete an entry, the SAP_UUID as technical key is needed. Therefore for each entry the SAP_UUID is enriched in a local integration process, if the entry already exists in the CBO.

Step 3: Iterating Splitter to handle each entry in a seperate call

Currently CPI does not support batch processing for OData GET calls. Therefore each entry must be handled seperatly. But they can be processed in parallel. The splitting is again done at the Token but this time without grouping:

Step 4: Content Modifier to save the semantic key in properties

The semantic keys of the OData service of the CBO are ContactId and IdOrigin. In the Content Modifier the values are saved in properties for usage in step 5:

Step 5: Content Enricher to read the technical key SAP_UUID

A Get request is made to the SAP Hybris Marketing system to get the technical key SAP_UUID. The properties ContactId and IdOrigin are given over in the filter expression. As the content enricher needs a matching field from the existing payload and from the receiving payload, also the ContactID is requested:

In the Content Enricher properties the result is then mapped to the current payload:

If a SAP_UUID is returned by SAP Hybris Marketing, the payload looks as follows after the content enrichment: 7 00163e35-616b-1ed7-b5b9-662f3d264ba0 7 EXTERNAL Ellen Musterfrau

If no SAP_UUID is returned, the payload looks like this: 8 EXTERNAL John Doe

Step 6: Mapping After Enrichment

As the payload looks different after the content enrichment for new and changed objects, a mapping is introduced that maps both cases to the same structure. As result structure already the OData structure of the CBO is used. The fields ContactID, IDOrigin, Field1 and Field 2 can directly be assigned:

For the field SAP_UUID a complex expression is build. It is checked if the tag SAP_UUID exists in the incoming payload. In this case the SAP_UUID is taken over. In case the tag does not exist, an empty constant is written to the target SAP_UUID tag:

Step 7: Gathering of SAP_UUID Enrichment Calls

In the last step of the local integration process all calls are gathered and enhanced by an overall tag . The overall tag is needed by CPI for further XML processing.

After the gathering the payload looks like this: 00163e0c-0f31-1ee7-8eae-19ed448a1944 6 EXTERNAL Max Mustermann 00163e35-616b-1ed7-b5b9-662f3d264ba0 7 EXTERNAL Ellen Musterfrau 8 EXTERNAL John Doe

Step 8: Map request chunk to OData Batch Processing

The last step of the whole integration flow maps a chunk of 1000 to batch processing of the CBO OData service. The tag is mapped to the tag . The target tag gets an empty constant assigned. The tag is mapped to the tag . The target tags and have a complex expression based if the entry needs to be created or updated. The target tag is not needed and therefore disabled. The target tags and get an empty constant. The target tag has a complex expression. The fields ContactID, IDOrigin, Field1 and Field2 are mapped directly from source to target.

The target tag can either be POST for a new entry or PUT for a changed entry. If the source tag is empty (SAP_UUID equals string ”) then the constant POST is assigned to tag . Else the constant PUT is assigned:

The target tag is only needed for changed entries. Therefore the complex expression is as follows: If the source tag is empty (SAP_UUID equals string ”), revise the result (Not). Only if the revised result is true, create the tag . The creation of the tag is created by concatenation of constant value YY1_HCI_ID_ID_ORIGIN(guid’ with source SAP_UUID and next concatenation to constant value ‘):

The complex expression for the target tag is similar to the target tag . Only if the source SAP_UUID is filled the target tag is created:

The payload now looks as follows: PUT YY1_HCI_ID_ID_ORIGIN(guid’00163e0c-0f31-1ee7-8eae-19ed448a1944’) 00163e0c-0f31-1ee7-8eae-19ed448a1944 6 EXTERNAL Max Mustermann PUT YY1_HCI_ID_ID_ORIGIN(guid’00163e35-616b-1ed7-b5b9-662f3d264ba0’) 00163e35-616b-1ed7-b5b9-662f3d264ba0 7 EXTERNAL Ellen Musterfrau POST 8 EXTERNAL John Doe

Batch requests to an OData service are always send as a POST request. Therefore the Receiver Channel needs to be setup like that:

The timeout is configured with 5 minutes as this is the normal runtime in SAP Hybris Marketing system.

  http://bit.ly/2DfuqpW #SAP #SAPCloud #AI