Introduction
The following content was prepared with the support of Sampath Ramanujam.
The main goal of this blog is to show the most important steps to configure and consume the External Scheduler Integration application programming interface (API) for SAP S/4HANA Cloud, extended edition. This will enable you to schedule applications jobs, to read the status, abort running jobs and cancel jobs based on an external system.
Please note that no start condition can be specified, it is always ‘immediate start’.
- Technical name: BC_EXT_APPJOB_MANAGEMENT
- Type: Inbound OData API
- Version: 2
Service Configuration
The External Scheduler Integration API was released for SAP S/4HANA Cloud, so you need to follow the next steps to configure the service in extended edition.
Prerequisite:
- Enter to the SAP API Business Hub and select the service required.
- Copy or write down the API Technical Name
Main service configuration:
- Access to the backend through SAP GUI.
- Enter to the Activate and Maintain Services transaction: /N/IWFND/MAINT_SERVICE.
- Click on Add Service button.
- Populate the System Alias with ‘LOCAL’ value. In case of errors, please check the SAP KBA 2527329 – No System Alias found for Service ‘<service name>’ and user ‘<current user>’
- Paste the API Technical name (prerequisite) in the Technical Service Name field.
- Click on Get Services button.
- After the API appears in the Select Backend Services, select the line item and click on the Add Selected Services button.
- A new ‘Z’ technical service name will be created. Click on the Local Object button to populate the Package assignment and Continue (Enter).
Test API
If you continue in the same screen, please go back (F3) to the search the new service created. In case that you left the screen, you need to access again to the Activate and Maintain Services transaction (/N/IWFND/MAINT_SERVICE).
- Use the filter button to search the service:
- The new service will appear with active Status. Click on SAP Gateway Client button:
- Select the HTTP Method and click on Execute:
- You will get the HTTP response:
Host and Port Information
The host and port information in your system is a prerequisite to maintain the RFC Configuration. Please check the following options to see the availability on your system (We recommend to discuss and align this with your internal IT Team):
- Enter to transaction SICF and click on execute. In the Define Services screen, you can click on More, and select Information on Port and Host (Ctrl+Shift+F12):Please note that this option is also available through the Activate and Maintain Services transaction:
- Click on ICF Node and select Configure (SICF) from the dropdown:
- Another option to find the Host and Port information is in the transaction SMICM. Click on Services button:You will get the host and port data:
RFC Configuration
This configuration* will enable your system to consume the API service. Please execute the following steps:
- Enter to the Configuration of RFC Connections (SM59).
- Click on create button, populate the RFC Destination, and select connection type “G – HTTP Connection to External Server”.
- Maintain the key fields for the configuration:
-
- In the Technical Settings tab:
- Populate the Host and Port information:
- In the Technical Settings tab:
-
- In the Logon and Security tab:
- Select the Basic Authorization option in the Logon Procedure and populate a communication user.
- In the Security Options, select SSL active and SSL Certificate “ANONYM SSL Client (Anonymous).
- In the Logon and Security tab:
-
- In the Special Options tab:
- Select the ICM default timeout
- Maintain the HTTP settings
- In the Special Options tab:
*NOTE: We recommend to discuss and align this configuration with your internal IT Team. You need to adjust the settings based on the system layout.
Job Selection
In case that you do not know the Job data to schedule it through the inbound service, you can access to the Application Job Repository transaction (SAPJ). This will help you to search the job based on a Job Catalog or Job Template. For example:
Please Copy or write down the Object Name because it will be important to display the job logs:
Platform Test
You can use an external platform to test the application programming interface e.g. SAP API Business Hub or Postman.
Job Logs
Enter to transaction SM37 to check the job log. Please note that you can use several parameters to find the correct job. In the following scenario we will use the ABAP Program Name that we copied from the Application Job Repository (Object name field):
After you complete all the previous steps, you will be able to consume the API and schedule an immediate application job in SAP S/4HANA Cloud, extended edition. Please note that SAP strongly recommends to follow the 5 Golden Rules during your implementation.
In case of any question regarding the product, please post a question in the community with the SAP S/4HANA Cloud, extended edition tag. For more detailed information: About Tags.
Important Assets
The following documentation might be helpful to obtain more detailed information:
SAP S/4HANA:
- SAP S/4HANA release 1909: Installation guide
- SAP S/4HANA release 1909: SAP Gateway Foundation
- SAP Gateway Foundation: Activate and Maintain Services
- SAP Note 2920697 – Extensibility Guide for SAP S/4HANA Cloud, extended edition
SAP API Business Hub:
- SAP API Business Hub: External Scheduler Integration
- SAP Help: External Scheduler Integration (Documentation for SAP S/4HANA Cloud)
Troubleshooting:
- SAP KBA 2527329 – No System Alias found for Service ‘<service name>’ and user ‘<current user>’
- SAP Note 2503171 – Usage of External Job Scheduling solutions with SAP Integrated Business Planning (This is for SAP IBP but attached you can find a helpful document with a similar approach for this scenario)
SAP Blogs:
- How to discover SAP API’s in SAP S/4HANA Cloud, extended edition
- 如何在SAP S/4HANA Cloud, extended edition里查找SAP的白名单API