How to Call OData Service in SAP S/4HANA Cloud from SAP BTP, ABAP environment
2023-12-7 18:43:45 Author: blogs.sap.com(查看原文) 阅读量:4 收藏

When the SAP BTP, ABAP environment was released in 2018, SAP provided the “Create business partner in S/4HANA Cloud using ABAP Environment data” tutorial. This tutorial showed how to call the API_BUSINESS_PARTNER OData V2 API in an SAP S/4HANA Cloud, public edition system from an SAP BTP, ABAP environment system while propagating the principal using OAuth 2.0 SAML Bearer Assertion.

With the 2311 release, there have been some major improvements that impact the scenario:

Therefore, I am happy to share that SAP has reworked the sample scenario and integrated the latest enhancements into the new Integrate the SAP BTP, ABAP environment with SAP S/4HANA Cloud, public edition tutorial group.

The tutorial group utilizes the API_BUSINESS_PARTNER OData V2 API in SAP S/4HANA Cloud, public edition to show how to

  • create a Service Consumption Model 2 in SAP BTP, ABAP environment
  • create a communication scenario in SAP BTP, ABAP environment
  • implement a call of the API from SAP BTP, ABAP environment using the communication scenario and Service Consumption Model
  • configure basic authentication for the communication scenario via outbound communication user
  • configure OAuth 2.0 SAML Bearer Assertion for the communication scenario via outbound communication user

Are you heading for another scenario? For instance, do you want to call an OData service in an SAP BTP, ABAP environment system from an SAP S/4HANA Cloud, public edition system? Or do you want to call an OData service in an SAP S/4HANA Cloud, public edition system from another SAP S/4HANA Cloud, public edition system? Then have a look at the tutorial nevertheless: since SAP S/4HANA Cloud, ABAP environment and SAP BTP, ABAP environment share the same ABAP Cloud development model, the pattern how to implement and configure an OData service call is the same and the role of the communication partners in the tutorial can be exchanged. For instance, you can create a Service Consumption Model and communication scenario in SAP S/4HANA Cloud, ABAP environment, and implement a call to SAP BTP, ABAP environment. Note that the following restrictions apply when changing roles:

  • The Service Consumption Model 2 for OData Client Proxy is not available in the 2308 release of SAP S/4HANA Cloud, public edition. So, you will use the old Service Consumption Model.
  • The API_BUSINESS_PARTNER OData V2 API is not available in SAP BTP, ABAP environment
  • SAP BTP, ABAP environment does not support the OAuth 2.0 SAML Bearer Assertion authentication method for inbound communication, yet.

文章来源: https://blogs.sap.com/2023/12/07/how-to-call-odata-service-in-sap-s-4hana-cloud-from-sap-btp-abap-environment/
如有侵权请联系:admin#unsafe.sh