Question & Answer
Question
Answer
Contents
Datastage: Adding DNS entry to host file
Configuring SAP OData Service on S/4HANA on premise
Testing activated OData service on SAP server
Configuring SAP OData Service on S/4HANA Cloud
Creating communication arrangement
Introduction
Before you use the SAP OData services, some basic configuration needs to be done on Datastage and SAP Servers. Follow this document to meet the required prerequisites.
Datastage: HTTP Proxy usage
The OData connector be used with an HTTP proxy when direct Internet connection is not available. For more details see technote 0957673.
Datastage: Adding DNS entry to host file
The hosts file is used to map hostnames to IP addresses. If the host name cannot be resolved directly, add an entry for the SAP server exposing the OData service. The location of the hosts file on the Datastage Engine tier machine depends on the operating system:
(e.g. C:\Windows\System32\drivers\etc\hosts)
Unix: /etc/hosts
For example to resolve yourdomain.com to IP address 1.2.3.4: open the hosts file with a text editor and append the following line (note an # character in front of the IP address will deactivate the entry):
1.2.3.4 yourdomain.com www.yourdomain.com
Note:
S/4HANA on-premise or ERP system: you may need to add the SAP Server DNS entry to the Datastage Engine tier machine.
S4/HANA cloud system: DNS entry may not required as the host is resolved in general publicly.
Configuring SAP OData Service on S/4HANA on-premise
Enabling ICM Services
SAP OData service operates on the HTTP or HTTPS protocol. Therefore, the corresponding services must be enabled in the Internet Communication Manager (ICM). It is recommended to use HTTPS service as it is more secure and offers an extra layer of security because it uses SSL to transfer data.
Figure 1: How to Open Services Panel
Figure 2:Creating SAP Profile Parameters
Figure 3: Defining new service
While defining the service ports, some of the parameters will be pre-populated according to the SAP system. Set the following parameters:
For HTTP:
New Service Port = <http port>
Bind to Host Name = <Host name of the server>
Protocol = HTTP
Keep Alive (in Sec.) = 60
Max. Processing Time = 60
For HTTPS:
New Service Port = <https port>
Bind to Host Name = <Host name of the server>
Protocol = HTTPS
Keep Alive (in Sec.) = 60
Max. Processing Time = 60
Figure 4: Ports setting in ICM
Activating the SAP Gateway
Perform the following steps to activate the SAP Gateway:
Figure 5: Customising Execute Project
Figure 6: Activate or Deactivate SAP Gateway
Figure 7:Cancel already activated Gateway
Figure 8: Activate gateway services
Activating OData services
To activate OData services, proceed as follows.
Figure 9: Defining Services
Figure 10: Activating the required services.
Testing activated OData service on SAP server
The SAP Gateway Client is a tool that can be used to execute OData requests. It is integral part of the SAP Gateway.
The tool is started by calling transaction /n/IWFND/GW_CLIENT (Refer figure 11).
- Specify the OData request URI.
- Select the HTTP method, the protocol (HTTP or HTTPS), the request headers and the request body.
- After you have entered all necessary request data, click button “Execute” to send the request.
- After executing, the response headers and response data are displayed.
Figure 11:Testing SAP OData service through SAP Gateway Client
Configuring SAP OData Service on S/4HANA Cloud
Creating Communication User
Communication user is a special type of technical user used for external Odata service calls. It is used for SAP communication with the external system only, It is not possible to log on using SAP GUI using communication user. The “Maintain Communication Users” app enables you to define these settings in Cloud.
Figure 12: Go to maintain communication user app
Figure 13: Create new communication user
Figure 14: Creating password for Communication user
Figure 15: Create Communication user
Creating communication System
A communication system is a specification of a system that represents a communication partner and all the necessary technical information needed for the communication, like hostname/IP-Address, identity, user information, certificates, etc. In S/4HANA Cloud systems, these entities are required for external communication. The “Communication Systems” app enables you to define these settings in Cloud.
Figure 16: Communication system app
Figure 17: Create new communication system.
Figure 18: Communication system ID and name.
Figure 19: Communication system details
Figure 20: Add user to communication system.
Creating communication arrangement
A Communication Arrangement describes a communication scenario with a remote system during configuration. It provides necessary metadata for the service configurations like credentials, outbound ports, destinations, and URLs. It consists of several service specifications, which contains the technical data to enable inbound and outbound communication. The “Communication Arrangements” app enables you to define these settings in Cloud.
Figure 21: Communication arrangement app.
Figure 22: New communication arrangement.
Communication scenario defines a set of inbound and outbound services for a business process. Inbound services are Web services that have been created based on an SAP or custom business object, or Web services provided by SAP. Outbound services are external Web services that have been integrated into your solution. Based on a communication scenario, a customer can create a communication arrangement in SAP’s cloud solution to exchange business documents electronically. For Example, Standard communication scenario SAP_COM_0053 is used for purchase order integration with SAP system. API API_PURCHASEORDER_PROCESS_SRV is exposed in this scenario to create, delete or update purchase order.
Figure 23: Adding scenario and communication arrangement name.
Figure 24: Details of communication arrangement
https://<your-system>-api.s4hana.ondemand.com/sap/opu/odata/sap/<API-name>
- Click Save
Figure 25: OData service URL and save.
Was this topic helpful?
Document Information
Modified date:
03 July 2019
UID
ibm10886655