SAP Connection
This section shows how to connect to an SAP source system.
Prerequisites
Before connecting to SAP for the first time, set up an SAP dialog user with the necessary SAP user rights.
Create an SAP Connection
Use the following endpoint to create a new connection to an SAP application server:
POST /v1/connections/sap/source HTTP/1.1
Host: localhost:1337
Content-Type: application/json
Content-Length: 109
{
"Host": "sap-erp-as05.example.com(1)",
"User": "alice",
"Password": "myPassword",
"Client": "800",
"Language": "en",
"InstanceNo": 0
}
- Input values for the SAP connection can be found in the Properties of the SAP Logon Pad or they can be requested from the SAP Basis team.
fetch('http://localhost:1337/v1/connections/sap/source', {
"method": "POST",
"headers": {
"[Content-Type": "application/json]",
"[Content-Length": "142]"
},
"body": JSON.stringify("Host": "sap-erp-as05.example.com", "User": "alice", "Password": "myPassword", "Client": "800", "Language": "en", "InstanceNo": 0)"
});
When this endpoint is called, the Xtract Core web server tries to establish a connection to the SAP system with the given credentials before saving the connection.
Tip
The Content-Length
property in the header represents the byte size of the JSON string in the request body. When using curl, the Content-Length
can be determined automatically. The -v
(verbose) option returns the request details, including Content-Length
.
Test the SAP Connection
Use the following endpoint to check if an existing SAP connection can succesfully connect to the specified SAP system:
When this endpoint is called, the Xtract Core web server opens a connection to SAP using the information that is stored in the configuration of the connection. If no connection can be established, Check the Accessibility of the SAP System and the SAP User Rights of the SAP dialog user.
Related Links
- Xtract Core API Reference: SAP Connection
- Knowledge Base: Supported SAP S/4HANA Versions
- Knowledge Base: SAP User Rights
- Knowledge Base: Check the Accessibility to an SAP System