Establish an SAP connection using OAuth 2.0
Create a connection profile to establish a connection between your SAP system and your ServiceNow instance using OAuth 2.0 authentication.
始める前に
Before establishing a connection between SAP and your ServiceNow instance, make sure that the following conditions are met:
- Verify if your SAP system network is accessible to external applications like ServiceNow.
- If external connections are blocked, install a MID Server. A MID Server enables communication and data movement between a ServiceNow instance and external applications or data sources. For instructions, see Installing the MID Server.
If you already have a MID Server installed in the network and connected to your ServiceNow instance, this SAP connection automatically uses it.
Role required: sam_admin
手順
- Navigate to All > SAP Compliance and Optimization > Connection Setup and select New.
-
On the form, fill in the fields.
表 : 1. SAP Connection Setup form Field Description Name Name of connection profile. Default price list Default price list that should be considered for reconciliation. Connection type Values include: - Basic Auth
- OAuth 2.0
Connection URL The base URL to connect to the SAP instance. OAuth Client ID Client ID for your SAP connection. OAuth Client Secret Client secret for your SAP connection. 注:You can get the OAuth Client ID and Client Secret at the time of registering your SAP application. -
Select Submit.
The initial connection is established.
-
Select the SAP connection and review the fields on the record.
表 : 2. SAP Connection form Field Description Name Name of the connection profile. The value is generated in the SAP Connection Setup form. Default price list Default price list that should be considered for reconciliation. The value is generated in the SAP Connection Setup form. Use USMM Role Optimization The option to specify USMM role-based optimization that must be applied during reconciliation. Last run Date and time when the data was last pulled for the SAP connection. REST message REST message that contains the SAP API information. OAuth entity profile The OAuth entity profile that contains the credentials for the connection. Active Option that indicates that the SAP connection is active. Connection type This field is automatically populated based on your connection type. User Mapping SAP user field SAP users across different clients that are mapped to a corresponding ServiceNow user. User field ServiceNow user field. 重要:Changing the values in the User Mapping fields after data is pulled results in the loss of the mapping between discovered users and system users. The mapping between discovered users and the Rights used by and Rights needed by fields is also lost.Configuration Fetch roles Controls the data pull from SAP for roles data. Fetch engine usage Controls the data pull from SAP for engine usage data. Fetch digital access usage Controls the data pull from SAP for digital access usage data. Fetch activity Controls the data pull from SAP for user activity and web activity data. Fetch user transactions Controls the data pull from SAP for user transaction activity data. -
Generate an access token by selecting the Get OAuth Token related link.
注:You must be in the local network of SAP to generate the access token.
- Log in using your SAP credentials.
-
In the Access Permission Request dialog box, select Allow for the scopes that you had added during the application registry.
A message is displayed on the SAP Connection form indicating that the OAuth refresh token is available.
-
If you're running the latest version of the ABAP program, test your SAP connection by selecting the Test SAP Connection and Version related link.
注:If you upgrade your ServiceNow instance, you must download and deploy the new version of the ABAP program and reconfigure a service provider with the SOA Manager.
- Send a request to the custom ABAP program to collect the SAP data into the custom tables again by selecting the Refresh data in SAP related link.
-
If the SAP data you pulled is corrupted, view current data by selecting the Pull all SAP Data to ServiceNow related link.
SAP data is scheduled to be pulled regularly.
- オプション: Update connection information by selecting the Update connection related link.
- Select Submit.
-
View SAP clients in the SAP Clients related list.
The SAP clients are generated when SAP data is pulled during the scheduled job.
- Select Update.
タスクの結果
The SAP connection is established.
次のタスク
You can start creating software models and entitlements.