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: 
anshulgoel031
Associate
Associate

Introduction:


This blog focusses on the usability of the Standard, Custom, Header and Body Parameters within an Action of the Action Project that can be maintained using the Actions Editor.

Parent Blog:


Actions Editor – Feature List, Usage and Maintenance of Actions Project

Concept & Need –


An API could be capable of consuming a complex input or returning a complex response structure but the “to-be” executed business process could only require a certain set of the parameters that is relevant for consumption. Similarly, not all the standard parameters may be sufficient while calling the API and there could be a scope for custom parameter to invoke an API and the business relevant data. This could be flexibly achieved by defining additional parameters.

Action Editor allows Action Designers to Add/Delete/Modify Input, Body and Output parameters within an Action of an Action Project. Additionally, It also provides the flexibility to Add/Maintain CUSTOM parameters that are not available from the API specification.

Deletion of Input/Output/Body Parameters:

 

Use Case:


An Action Designer can use the Delete feature to remove any unnecessary parameters from the definition of the Action making it more light and relevant to the business process. Let us try to understand this with an example.

Example: Deletion of Input Parameter in Action Editor

    1. Select the list of parameter(s) you want to delete.






    1. After Selecting the parameter(s), Click on the Remove icon on the top of the table.

 

anshulgoel031_0-1707895785945.png

Remove Icon


 

    1. After clicking on the remove icon, a "Remove Paramaters" dialog Box would appear



Remove Parameters Dialog Box


 

    1. Click on the “Remove” button & hit the Save button to complete the Deletion process.



Note: The process to delete an Input-Body & Output parameter is identical to the above.

 

Addition of Input/Output/Body Parameters:

 

Use Case:


An Action Designer can use the Add feature to add the Deleted Input/Output/Body parameters. Let us try to understand this with an example.

Example: Addition of Input Parameter in Action Editor

    1. Click on the “Add” icon above the table.
      anshulgoel031_1-1707895810918.png

Add icon

    1. An “Add New Field” Panel would appear on the right. "Add New panel" would contain two options "Available Fields" & "New Field". In "Available Field" where you can select the parameters that were in a “Deleted” or “Inactive” state, which can be re-added to the definition of the Action within the Action Project.
      Screenshot 2024-02-14 at 12.32.34 PM.png



“Add New Field: Available Fields” panel.


 

    1. After selection of the parameters, the users can click on the “Add” button and hit the Save button to complete the Add process. The Action Designer can also add “Custom” Parameters also which is discussed in the next section.



 

Note: The process to Add an Input-Body & Output parameter is identical to the above.

 

Adding a Custom field (parameter/header/query/path):

 

Concept & Need -


Often APIs expose complex parameters which may not be suitable to be exposed directly to a Action Designer and hence they need to be broken down into simpler parameters.

Feature Description:



    1. Actions Editor allows definition of custom input parameters apart from the standard API input parameters. These custom input parameters cannot be passed to the API but they are meant to be exposed to the Action Designer in the consuming Editor.

 

    1. The custom input parameters support same set of features as the other standard API input parameters in the Actions Editor – Label, Hide, default and static value definition.



Use Case:


An Action Designer can use the Add feature to also add a Custom header/query/path parameter that is originally not available within the definition of the Action of an Action Project from the specification. There could be potential use cases that that cannot be fulfilled by a standard parameter while invoking an API and this could be managed by defining a Custom Parameter. Let us try to understand this with an example.

Example: Addition of “Content-Type” Input Parameter in Action Editor

    1. Open the “Add New Field” Panel as shown in described in “Addition of Input/Output/Body Parameter” section. Click on the “New Field” button. An empty form would appear to enter the Custom Parameter definition. Input the details.
      Screenshot 2024-02-14 at 12.42.54 PM.png

“Add New Field: New Field” Form with Custom Parameter add field.



 

Blog Reference –



 



 

Thanks for reading and i hope it helped to understand the concept of maintaining the Parameters within the Actions Editor. Please feel free to leave a comment if there are any questions and I would be happy to receive any feedback.

 

1 Comment