SAP Data API with Studio

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 Transaction/Query scripts. The advance key SapIntegrationAPIEnable is set to true/false based on valid SAP Data API License availability. If advance key SapIntegrationAPIEnable is true, JSON will be visible as data source type in Studio and SAP API library will also be visible in Evolve. If this key is not enabled, user will not be allowed to open JSON mapped file.

Note: : SAP API only supports single script. Linked and Multi script is not allowed for SAP API .

To access SAP Data API from Studio follow the below steps:

  1. Activate a Valid SAP Data API License.
  2. Create a script for integration with SAP Data API.

  3. Create SAP API Store Library in Evolve. Refer to SAP API Store Library in SAP Data API with Evolve.

  4. Submit Solution to Evolve.

Create script for integration with SAP Data API(Transaction/Query/Direct)

To Create a script integration, User must have license for respective product(i.e. Transaction/Query) and should also have Solution developer role of the corresponding product library. Below steps need to be followed for creating script integration:

  1. Click on File → New → Select the type of script you want to create as SAP Data API.

  2. Click on Create from SAP Recording.

  3. Login to SAP server with valid credentials.

  4. 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.

  5. 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 Transaction, Refresh button is available to generate JSON payload with latest changes in Mapper. The JSON payload is generated for single transaction only. Bulk uploads are not available with SAP Data API. For Query, we do not require Refresh button, as input criteria will be asked in Run time criteria dialog.

Note:

  • Unauthorized error 403 with SAP API calls can mean that you do not have the required permission, or you have a broken URL that is not recognized by SAP to run further. SAP gives 403 error for both cases.

  • In this situation, use the SAP TRACE and enable the Payload Trace, which will show you issue : /IWFND/TRACES

    Next, follow the steps given below.

    1. Set the Payload Trace Exit.

    2. Come to tcode and go to the Payload Trace tab.

    3. Refresh after a call from Evolve.

    4. 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:

  1. To submit a Solution to Evolve, Go to Evolve Tab and click on Submit; the Submit Wizard will pop up.

  2. On Script Information tab , add Solution name, Category and Description. Category and Description fields are not mandatory.

  3. Data Template tab will be disabled for both Transaction and Query.

  4. 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.

  5. Supporting Document tab will be enabled to add supporting documents with the solution for both Transaction and Query.

  6. On Summary Tab, Click on Submit to submit solution to Evolve.

All solutions(Transaction/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(Transaction/Query/Direct)

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 Transaction and Query solutions. The rest of behaviour 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(Transaction)

On data source view in Map Tab, the Generate JSON button will generate JSON payload for single transaction according to the script. The Browse button will be used to pass existing JSON file. Studio supports single transaction run only. 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(i.e. 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.