Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
ClarenceWanrap
Product and Topic Expert
Product and Topic Expert

Parent Blog: https://blogs.sap.com/2022/10/21/actions-editor-feature-list-usage-and-maintenance-of-actions-projec...

The motivation behind this is to empower the Action Designer to create and maintain Actions within an Action Project even when the Specification is not already known. The Action Designer can maintain the project by adding and manipulating custom Actions.

  1. Creation of an Action Project from Scratch:
    1.  The Action Designer can use the “Create” button within the lobby to create a new Actions Project.

      ClarenceWanrap_0-1706804375564.png







    2. From the list of sources, the Action Designer can choose the Build from Scratch Card.

      ClarenceWanrap_1-1706804375582.png

    3. The Action Designer must provide details for the Project Name, Description. Following this, the Action Designer should click the Create button to commence the creation of the Actions Project.

      ClarenceWanrap_2-1706804375584.png

    4. After successful creation, the project is seen in the Lobby. It would automatically open in the Actions Editor without any user intervention.

  2. Creation of Custom Action:

    On opening of an Action Project with no Actions previously added the Add Custom Action dialog is automatically displayed. This dialog can also be accessed by pressing on the Add button and then selecting the Custom Action option from the drop down, as shown below: 

    ClarenceWanrap_3-1706804375591.png
    1. The Action Designer must provide details for the Operation, Name, Description and Endpoint of the action and then press on the Add button.

      ClarenceWanrap_4-1706804375592.png

    2. Once the Action Designer clicks on the Add button, the Action is added to the list of Actions. The Action Designer can then edit and modify the action by adding/removing parameters to either the Input or Output according to the API’s definition. For this example, we are adding an INPUT parameter by pressing on the Add button of the Parameter table.

      ClarenceWanrap_5-1706804375606.png

    3. The Action Designer can then enter the Parameter details and press on the Add button as shown below.

      ClarenceWanrap_6-1706804375622.png

    4. Another method for adding parameters to both the Input and Output sections is through the Add Fields from Sample JSON approach. This method enables the Action Designer to add parameters by uploading JSON files. It can be accessed by clicking on the Add button in the respective body table and then selecting the Fields from Sample JSON option from the dropdown, as illustrated below:

      ClarenceWanrap_7-1706804375643.png

    5. A dialog is displayed containing a wizard with two steps. The first step involves the uploading and editing of JSON files. Upon clicking Next, the preview of the Input/Output section resulting from the addition of new parameters in the previous step is displayed, as shown below:

      ClarenceWanrap_8-1706804375660.png

    6. The Preview step would highlight the new parameters that is newly added as shown below. On clicking the Add button, the parameters will be merged with the Input/ Output section.

      ClarenceWanrap_9-1706804375687.png

  3. Generate Output from Response:
    1. After navigating to the Test Tab in the Action Details section, the Action Designer can then choose the connectivity configurations. Upon entering the values for the parameters, they can click the Test button.

      ClarenceWanrap_10-1706804375702.png

    2. Upon receiving the response, the Action Designer can then click the "Generate Output" button to automatically populate the output schema for the corresponding HTTP code. This process merges the existing output schema (if present) with the schema generated from the API response.

      ClarenceWanrap_11-1706804375730.png

    3. The Generate Output Dialog is displayed, providing a preview of how the output section would appear if the "Add Output" button is pressed. The highlighted parameters represent the new parameters extracted from the API response.

      ClarenceWanrap_12-1706804375756.png

      If there are any conflicts in the two schemas that we are attempting to merge using the "Generate Output" button, the "Conflicts Found" table is displayed below, showing all parameters that cannot be added due to a conflict.

      ClarenceWanrap_13-1706804375775.png

      Upon clicking the "Add Output" button, a toast message indicating the successful generation of the output is displayed. The Action Designer can then navigate to the Output section to view or edit the parameters.

      ClarenceWanrap_14-1706804375798.png

    4. The Action Designer can navigate to the output section to view the new parameters added by first selecting the response code obtained in the previous step. In this example, the response code of the API from the previous step is 200; hence, we select 200 from the dropdown, as shown below:

      ClarenceWanrap_15-1706804375804.png

    5. The parameters are added to the body of the Output section as shown below:

      ClarenceWanrap_16-1706804375814.png

Thanks for reading, and I would really appreciate your feedback. Please feel free to leave a comment in this blog post.

1 Comment