cancel
Showing results for 
Search instead for 
Did you mean: 

Use OData service from SAP Backend via Cloud Connector in Integration Flow

Julius123
Participant
0 Kudos

Hello,

I am relatively new to Integration Suite. I want to connect my own OData service from SAP GUI (transaction SEGW) to an Integration Flow.

I have read many blogs and tutorials, but haven't gotten it to work. I've described some of the problems that I am facing in this comment. https://blogs.sap.com/2022/01/11/from-odata-provisioning-cloud-foundry-to-sap-integration-suite/#com...

I haven't found a tutorial/blog that matches my requirement. Many are close, but then some details are different. For example, an integration flow is often connected to an Internet OData service instead of an On-Premise.

I'd appreciate if someone could give me a hint how I can address this use case. Maybe you have a link to a fitting blog/tutorial, or know how to fix the described problems.

Kind regards

Accepted Solutions (1)

Accepted Solutions (1)

Sriprasadsbhat
Active Contributor

Hello Julius,

You can use OData V2 adapter in sap cpi to get data from OData api of S4hana.Below is the process.

  • Register your ODATA service in SEGW.
  • Install cloud connector and establish connectivity with your S4Hana

Refer blog for how to add your odata endpoint in SAP Cloud Connector

  • Create iflow in Cloud Integration and use OData V2 adapter with request reply step to get the data.

Refer blog which shows how to query in odata api ( replace your S4Hana related url instead of open odata url and connection type as on-premise )

This youtube tutorial will help you to create Iflow with OData receiver adapter

Regards,

Sriprasad Shivaram Bhat

Julius123
Participant
0 Kudos

Hello Sriprasad,

Thank you for your fast and comprehensive answer.

I have tried to implement the steps according to your guide. The OData service was already registered. The cloud connector is connected with BTP.

One thing i noticed in the first blog is that even if I switch to edit-mode, the Register button is greyed out. I don't think my service is a CDS, but I'm not sure if that's the reason why I can't press the register button.

But the service itself can be found in SICF. I previously registered it with /iwnf/maint_service.

Maybe that leads to the problems I am having.

I continued without that for now.

The first issue is when I tried to create an API provider according to the first blog. When I test the connection, instead of a green 200, I get an orange 401. "

System is up and reachable. However, the ping check responded with code : 401; Message : Unauthorized"

Next was the iflow. In the MessageFlow from the Request Reply to the receiver, the second issue occurs. I chose OData V2 as the adapter type. When I go to Processing, then under "Resource Path" I press "Select", I get an error message "Failed to connect to system".

So that is my current situation.

Kind regards

Julius123
Participant
0 Kudos

Addition: So I have skimmed a book from SAP Press that explains SAP Gateway, and from my understanding, registering the service from SEGW is just an easier alternative to /IWFND/MAINT_SERVICE. If that is the case, and I didn't do a mistake in the latter transaction, it would not be the cause for the problems. The service is accessible otherwise and I already used it for a larger SAP Mobile Development Kit project.

Julius123
Participant
0 Kudos

What I have also tried is to work around the error "Failed to connect to system" by selecting the Connection Source as "Local EDMX File" and uploading the $metadata-XML of my service. However, this leads to the underlying HTTP error being returned under "Monitor Message Processing". So it doesn't solve the issue, just moves it to a different spot.

Julius123
Participant
0 Kudos

The integration flow seems to work now. In the "Connection" tab of the OData-Adapter, I had to select "Basic" for Authentication, then enter the credential name of a credential that contains my credentials in the backend system.

So the working combination now is

- the normal OData service address but with http instead of https and the corresponding port

- Proxy-Type On-Premise

- Basic Authentication with a credential name of a previously created credential

- and a local EDMX file for Processing > Resource Path > Select, because otherwise an error that says "Failed to connect to system" appears.

Your linked blogs helped me to know where I can test the integration flow, and the answer showed in which order the steps are to take. Thank you for your help.

Answers (0)