| Change type | Description |
|---|---|
| Updated in version 25.0 | SAP data API bulk upload payload generated for Studio scripts. |
Studio allows you to access SAP Data API. You can create scripts and submit the scripts to Evolve using Studio. Studio has a data source type SAP API (JSON) which is JSON format for Fiori/Query scripts. Studio users will see SAP API (JSON) as a source type only if an SAP Data API license is present on the system.
To access SAP Data API from Studio follow the below steps:
- Activate a Valid SAP Data API License.
-
Create SAP API Store Library in Evolve. Refer to SAP API Store Library in SAP Data API with Evolve.
Create script for integration with SAP Data API(Studio/Query/Direct)
To Create a script integration, User must have license for respective product (i.e. Studio/Query) and should also have Solution developer role of the corresponding product library. Below steps need to be followed for creating script integration:
-
Click on File → New → Select the type of script you want to create as SAP Data API.
-
Click on Create from SAP Recording.
-
Login to SAP server with valid credentials.
-
Enter a Valid TCode for recording in Transaction Code text box and select SAP API(JSON) from Data type dropdown. This data type is only visible if advance key SapIntegrationAPIEnable value is true on Evolve.
-
Click on Start Recording to create new SAP Data API script.
User can also select existing JSON file (.txt and .json) with valid JSON schema.
After new script creation, Mapper will show untitled file. If an existing file is passed, then data source view will be populated using existing file which should have valid JSON schema. You can click on browse button to open any other file(.txt /.JSON) with valid JSON schema. If provided JSON is not de-serialized, error will be thrown. For Studio, Refresh button is available to generate JSON payload with latest changes in Mapper. The JSON payload is generated for single and bulk transactions. For Query, we do not require Refresh button, as input criteria will be asked in Run time criteria dialog.
Next, follow the steps given below.
-
Set the Payload Trace Exit.
-
Come to tcode and go to the Payload Trace tab.
-
Refresh after a call from Evolve.
-
Open a call that is listed as an error and click the Error Log.
Submit a Solution to Evolve
If SapIntegrationAPIEnable key is enabled, user is allowed to submit solution in SAP API library which is created in Evolve, refer to SAP API Store Library in SAP Data API with Evolve. The user must have Solution Developer role on any one SAP API library to submit solution in SAP API library. Follow below steps to submit a solution:
-
To submit a Solution to Evolve, Go to Evolve Tab and click on Submit; the Submit Wizard will pop up.
-
On Script Information tab , add Solution name, Category and Description. Category and Description fields are not mandatory.
-
Data Template tab will be disabled for both Studio and Query.
-
In Solution File Workflow tab, Destination will only show SAP API library. If Solution Approval is enabled only then reviewer list will be visible and show all reviewers for the selected App. The current user will not be listed in reviewer list if self approval setting is disabled.
-
Supporting Document tab will be enabled to add supporting documents with the solution for both Studio and Query.
-
On Summary Tab, Click on Submit to submit solution to Evolve.
All solutions (Studio/Query) will go in same library of the SAP Data API type. If Solution Approval preference is disabled, the solution will go to Production state else review task will be created against selected reviewer. Reviewer must approve the solution to move solution in Production state.
You can add Default destination for Evolve. Add SAP API solutions to App Options →Evolve→Solution Library dialog. This solution is only visible if SapIntegrationAPIEnable value is set to true. The default text is blank as Evolve does not have any default “SAP API” library. The Browse button will show all “SAP API” library according to the permission for logged-in app. The selected library will be shown in text box and same will be saved to Evolve on Save to Evolve action.
Open solution of SAP Data API (Studio/Query)
If “SapIntegrationAPIEnable” key is enabled then user can see “SAP API Library”. Studio will show “SAP API Library” library below Excel Solution Library. The “SAP API” library will show all the solutions from default selected library. If no library is selected, it will show libraries in list. “SAP API Library” will show both Studio and Query solutions. The rest of the behavior is same as other libraries(i.e. Status, Search solution and library browsing). When you click on solution, the respective view will be loaded.
Evolve tab will be populated based on the solution status. If solution goes through review process according to the preference then process history will be shown else no history will be shown. If solution has been submitted with supporting documents then supporting documents will be visible on Evolve tab.
Run SAP Data API (Studio)
On data source view in Map Tab, the Generate JSON button will generate JSON payload for single/bulk transaction according to the script. The Browse button will be used to pass existing JSON file. Studio supports single/bulk transaction run. No local scheduling and chain script is supported as supported in XML data source. The rest of run setting behavior is similar to XML data source(if validate is on, “Validate” and “Simulate” will be visible). If list value is supplied, check data will work. You can execute SAP Data API from Run tab locally by clicking on Test Button. Run Button will be available if script is in Production state.
Run SAP Data API(Query)
You can toggle SAP API(JSON) option on App→ Preferences→ Run preferences → Scheduling to control local scheduling through Studio client. If “SAP API(JSON)” option returns true then Studio will show local scheduling. The rest of desktop scheduling behavior is similar to XML data source type. Data source view only shows Browse to select any .txt file with valid JSON schema. Write Records has only one option Clear All Mapped Data from Result file. Record and Header Delimiter will be shown disabled and rest of options are similar to XML data source. The chaining of script is not allowed. Execute SAP Data API from Run tab locally by clicking on Test Button. Run Button will be available if script is in Production state.
SAP Data API - Bulk Upload
The SAP Data API previously supported single-record uploads for Transaction/BAPI scripts. With v25.0, the API now supports bulk uploads, enabling users to process multiple records in a single request. This new functionality enhances efficiency by allowing asynchronous processing through a dedicated queue, with robust tracking and status features. The bulk upload option is seamlessly integrated with the existing single upload feature, giving users flexibility in how they submit data.
This feature is specific to Transaction/BAPI scripts. It enables users to generate a bulk upload payload in Studio and consume it in Evolve to publish SAP Data API. Key details include:
- Asynchronous Processing: The API runs asynchronously using a separate queue for bulk uploads.
- Payload Storage: The API payload is stored in the database to ensure data safety.
- Request Status Tracking: A dedicated HTTP GET endpoint allows users to check the status of the request, returning the result once processing is complete.
- Completion Notification: Upon completion, users will receive an email notification.
The SAP API Bulk Upload is an asynchronous operation. Unlike single API calls, customers cannot immediately get a run response after submitting the request. Instead, they must follow a specific sequence to automate the process.
Steps to Perform SAP API Bulk Upload
Step 1: Submit Request Payload
Customers must submit their request payload to the following endpoint:
javascriptCopyEdit<BaseURL/GatewayURL>/api/v2/SAPIS
- Upon successful pre-validation of the payload, Automate Evolve will return a Request ID in the response body.
- Example of a successful
response:
jsonCopyEdit
{"RequestID":"2523c7d1-5d1c-4f25-a51b-84d24ffe6f04"}
Step 2: Retrieve Run Response
Customers can use the Request ID returned in Step 1 to retrieve the run response.
- Use the following endpoint to check the status and retrieve
results:
javascriptCopyEdit<BaseURL/GatewayURL>/api/v2/SAPIS/CheckResponse/{RequestID} - Replace
{RequestID}with the actual ID received in Step 1.Asynchronous Nature: Since the bulk upload operation is asynchronous, the response for the initial request only includes the Request ID, not the immediate processing results.
Request ID Handling: Customers must use the provided Request ID to query the status or results of the bulk upload.
Endpoint Base URL: Replace
<BaseURL/GatewayURL>with your specific API gateway base URL.
Studio Behavior for Single and Bulk Payload Generation
In Studio, the payload scheme is generated via a mapper. The steps for generating the bulk payload include:
- Upload Type Selection: A drop-down allows users to select between Single or Bulk payload generation, with "Single" as the default.
- Generate Payload: Upon selecting the upload type, users can click the Generate JSON View button to create the payload.
- Save Dialog Changes: The selected upload type will appear in the save dialog and be stored in the script's data source section.
- Run Tab: The Upload Type and Generate JSON View options are disabled on the run tab.
Publishing Bulk Upload API from Studio
Steps for publishing the bulk upload API from Studio:
- Select the bulk API, then click Evolve → Submit.
- Add a Reporting Tag on Script Information page and view the read-only "Upload Type."
- Click Submit.
The bulk API is published to Evolve.
Publishing Bulk Upload API from Evolve
To publish from Evolve:
- Add a "Reporting Tag" for both Studio and Query API scripts.
- The "Upload Type" is read-only and will follow the script settings.
- The bulk payload is displayed in both JSON and Text views.
- Upon publishing, the following endpoints are provided:
- Request:
<BaseURL/GatewayURL>/api/v2/SAPIS - Response Check:
<BaseURL/GatewayURL>/api/v2/SAPIS/CheckResponse/{RequestID}
- Request:
Sample Payload for Bulk API
{
"SolutionDetail": {
"SolutionName": "string",
"LibraryName": "string",
"AppName": "string"
},
"RunParameter": [{
"Document_Date_in_Document": "date",
"Reference_Document_Number": "string",
"Document_Header_Text": "string",
"Loop1": {
"Loop1Items": [
{
"General_Ledger_Account": "string",
"Debit_Credit_Indicator": "string",
"Amount_in_document_currency": "0.0"
}
]
}
}],
"SapDetails": {
"ConnectionName": "string",
"EvolveUser": "string",
"SAPUser": "string",
"SAPPassword": "string",
"SAPLanguage": "string",
"WindowsCredentials": {
"UserName": "string",
"Password": "string"
}
}
}
"{
"RunResponse": {
"SuccessRow": "integer",
"ErrorRow": "integer",
"PayloadResponse": [{
"Success": "bool",
"LogField": "string",
"RunResult": {
"Gross_weight": "0.0",
"Net_weight": "0.0"
}
}]
}
}"API Solution Library View Changes
For Transaction API solutions: Two new columns are introduced from version 25.0: Upload Type and Reporting Tag.
- Upload Type shows "Single" or "Bulk" (Transaction-specific).
- Reporting Tag applies to all supported scripts. Multiple Reporting Tag values can be added by semi column ";" as a separator. Reporting Tag name does not support spaces.
Execution of SAP Data API (Bulk Upload)
The bulk upload API is executed asynchronously. The following steps occur:
- Validation:
- License validation.
- Check payload size against the
BulkUploadApiLimitkey in System settings. - If all validations pass, a
RequestIDis returned.
- Job Creation:
- A new job (
BulkApi) is added to the job table for processing. - The user can monitor the job on the business job page.
- A new job (
- Queue Processing:
- The Evolve installer will create a new queue,
wsapibulkupload, during fresh installations, upgrades, and repairs. This queue will have the same permissions as the existing queue,wsautorunfile. - A new capability, "API Bulk Posting", will be added with the following
details:
- Description: Enables posting multiple records to SAP from a single SAP Data API call.
- Configuration Options: Enable/disable, pre-fetch, and "WFM Trace" for the "API Bulk Posting" capability.
- The Queue Manager will display the details of the newly added
wsapibulkuploadqueue. - All messages for "API Bulk Posting" will be published to and processed from
the
wsapibulkuploadqueue.
- The Evolve installer will create a new queue,
Email Notifications for Bulk Upload Solution Execution
An email notification is sent after the execution of a Bulk Upload Solution. The type of email depends on the execution outcome:
- Successful: Sent when the bulk upload solution executes successfully.
- Success with SAP Errors: Sent when the bulk upload solution executes successfully but encounters SAP-related errors.
- Error: Sent when the bulk upload solution execution fails.