Skip to Content
0

How to perform inetgration between 3rd party application cloud database and on-premise SAP system?

Jan 05, 2017 at 03:49 PM

256

avatar image

We are using SP HCI platform(process integration) for integration between our on-premise SAP system and 3rd party application database hosted on AWS RDS.

Basically, we are creating Sales Order in a 3rd party application which is persisted on aws rds database instance. The create sale order should be sent to SAP system by calling its standard BAPI for creating Sales Order. Extracted data from database would be mapped to BAPI fields to create sales order.

I have been trying to write an integration flow on eclipse IDE with SAP HCI Integration plug-ins. I could not find any databse connector or channel which would enable to connect to and extract data from my cloud database on aws rds.

How should I achieve this process Integration? Do I have to use HCI Data Integration to pull data from my cloud database instance in Hana cloud database and then somewhow call my HCI PI flow to perform data mapping and call SAP BAPI? I am confused.

Please help me here.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

7 Answers

Best Answer
Raj Chablani Jan 12, 2017 at 11:15 AM
0

Hi Sriprasad, Thanks for your prompt response. The solution did work for me, I got the flow working and got JSON output. Now, I want to use this JSON output to call another webservice (SOAP WebService of SAP). In the flow for which I have attached screenshot below:

Thus, I have to make 2 web service calls.

1) First web service will pull data for aws rds

2) This data would be pushed to another SAP soap web service

As you can infer from above, my second web service should be my target/receiver system.

But in my current flow design, first web service is the target/receiver system. How can I call my first webservice (source of data) within the Integration process box. I could not find any help material for this on internet. Kindly guide me here


flow.png (46.0 kB)
Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Raj

The first call should be made with a Request-Reply step within your process, connected to a separate Receiver via an HTTP channel. In Eclipse you'll find the Request-Reply step under Tasks -> Service Call.

Regards,

Morten

1
Morten Wittrock Jan 05, 2017 at 10:00 PM
1

Hi Raj

Do you have any way of triggering an HCI flow from the 3rd party application? If your integration has to be via the database, keep in mind that HCI doesn't have a database adapter, so you'd need to access it in another way. There is a REST API for RDS, though. You could use a Trigger element to periodically access the database and check for new sales orders, calling the BAPI for each one and marking it as updated in the database afterwards. This assumes that you have some control over the database schema (i.e. that you can add a SENT_TO_SAP column).

Writing this up afterwards would make an interesting blog, actually :-)

Kind regards,

Morten Wittrock

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hey Morten,

Thanks for your prompt response. Sorry I was on leave yesterday and could respond back.

Is there any specific reason that HCI does not have a database connector? Is it part of design to use REST services rather than directly conect DB or connector would be part of future road map?

Secondly, I will expose some web services for now to access the data. But we follow RESTful web service design and all our services expose JSON data. Does HCI have support to perform mappings with JSON data?

Lastly, to connect with SAP on-premise system, I understand that we need SAP Cloud connector to be installed in my on-premise network. But does HCI have capabilities to make BAPI calls? I could not find any SAP connectors in HCI eclipse IDE plugins and tools.

Is there any blog you can connect me to make BAPI calls and provide message mappings between JSON data and SAP BAPI?

0

Hi Raj

Regarding the missing JDBC adapter, I assume it is just a matter of time. As for JSON, you can retrieve it with the HTTP adapter and process it in Groovy or JavaScript. There is no RFC adapter at the moment (also coming, I'll assume), so you'd need to expose your RFCs either as SOAP webservices (SOAMANAGER) or via Gateway. You can call these services in your on-premise landscape without the Cloud Connector, but you would need to do some reverse proxying in order to be secure.

Regards,

Morten

0
Sriprasad Shivaram Bhat Jan 12, 2017 at 01:54 AM
1

Hello Raj,

End points with CXF are for sending Exchange and invoking WebService bean object in Apache Camel(on top of which SAP HCI-PI built on) so the URL which you are trying to call http adapter is wrong.

For HTTP communication you have to form your URL like below

https://I4039-iflmap.hcisbp.eu1.hana.ondemand.com:443/http/test

Regards,

Sriprasad Shivaram Bhat

Share
10 |10000 characters needed characters left characters exceeded
Raj Chablani Jan 11, 2017 at 08:35 AM
0

Hi Morten,

I have now created a very basic flow which has a sender Http Adapter. It calls a Restful webservice which has been configured in the Receiver channel Adapter.

Below are Http configuration for sender channel:

My flow compiles fines and I was even able to deploy it on my tenant Node with any error:

[11/01/17 13:22] Deployment Summary [11/01/17 13:22] ======================= [11/01/17 13:22] No. of integration project(s) triggered for deployment : 1 [11/01/17 13:22] Integration project(s) which caused deployment failure : 0

Below is my Integration Operation View:

If you check the above screen shot, I have highlighed the URL seen in the Operation server properties.

In screenshot below, I have highlighted my Integration project and its corresponding status:

After all the above configuration, I tried hitting my HTTP sender channel end point with following URL (url pointed in screent shot for operation server configuration):

https://l4039-iflmap.hcisbp.eu1.hana.ondemand.com/test - I get page cannot be displayed error

I also tried: https://l4039-iflmap.hcisbp.eu1.hana.ondemand.com/cxf/test - I get no service found.

Kindly let me know what is it that I am doing wrong here. I am stuck on these for 2 days now.


flow.png (46.0 kB)
senderchannel.png (22.7 kB)
deployedipview.png (146.0 kB)
Share
10 |10000 characters needed characters left characters exceeded
Raj Chablani Jan 15, 2017 at 06:15 AM
0

Hi Morten,

Thanks for the response.

I have now as per your advise used Request-reply component to call my web service of source system to fetch data. As mentioned in one of our earlier conversations, my webservice returns JSON data. Since, HCI do not have standard component to read and map JSON data I am trying to use groovy script using the Script component.

The script component follows the Request reply component where I format the message payload as per my need. I have create the script in src.main.resources.script folder. Libraries required to parse json I have placed in src.main.resources.lib folder.

I have added certain debug statements in groovy script. Executed checks on the flow and deployed it. Everything went fine with no errors. I could not see the debug statements probably because tracing has not been enabled by the administrator. To ensure that the groovy script is being processed by HCI, I deliberately added syntax errors in the script and again executed checks and deployed the flow. Everything was shown in green again in the console which was surprising.

How would I know if HCI is realluy processing my groovy script or is there something wrong I am doing in the complete process. Kindly advise.

This is my erronrous groovy script:

nd.JAXBElement;

imp.xml.namespace.QName;

def Message processData(Message message)

{

//Body def body = mesge.getBody(); println ("Printing body::");

essage.setBody(body);

return message;

}

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hi Raj

A syntax error in Groovy will halt the processing. Could you possibly show a screenshot of your iflow?

Regards,

Morten

0

By the way, Raj. If the default JSON to XML conversion is enough for your use case, you can go ahead and use that. Add a Converter step, right-click and change it to JSON to XML conversion (in Eclipse only).

0
Raj Chablani Jan 27, 2017 at 12:46 PM
0

Dear Morten,

Apologize for delayed response.

Please find attached the flow diagram as requested:

flow.png

Attaching the groovy file snapshot too with errors in it:

groovy.png

Let me know if additional details are required


flow.png (42.3 kB)
groovy.png (60.7 kB)
Share
10 |10000 characters needed characters left characters exceeded
Raj Chablani Feb 05, 2017 at 12:23 PM
0

Hey Morten,

Can you please help here?

Share
10 |10000 characters needed characters left characters exceeded