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: 
shubham_anand
Associate
Associate
Parent Blog: Actions Editor – Feature List, Usage and Creation/Maintenance of Actions Project

Actions project acts as a thin layer of abstraction over a service to simplify the consumption of API's and artefacts. The service definition is in the form of an openAPI - in the case of a REST service or an Edmx/XML Metadata for an OData service .

The OData $metadata file is a CSDL file that is made available to clients to help them discover the structure and organization of the entities, navigations, and the service operations that are available to manage resources beyond the usual create, retrieve, update, or delete operations. It resides on $metadata path of the service URL.

So, we fetch this metadata file from the service that is selected by user and then convert it to openAPI and use it to create Actions project out of it.

e.g. :
Northwind V4 service URL : https://services.odata.org/V4/Northwind/Northwind.svc
The metadata file is available at $metadata path ,
i.e. : https://services.odata.org/V4/Northwind/Northwind.svc/$metadata

We can consume these API sources to create actions project for exposing LCNC artefact, given that they're OData based services. Some of the examples are CAP & RAP services.

Note: CAP services can be REST or OData. Only in the case of OData we find service definition using $metadata so it can be used to create Actions Project and not the REST based CAP service.

Pre-requisites : Add a destination to a service in your BTP subaccount .
More details are available here: https://help.sap.com/docs/forms-service-by-adobe/sap-forms-service-neo/configure-destination-in-your...

Steps to consume CAP/RAP/other Destinations :

  1. Create a destination to your service which should have the below assigned flags.sap.applicationdevelopment.actions.enabled : true
    sap.build.usageshould be set to CAP for CAP destinations, RAP for RAP destinations and odata_gen for Other BTP OData destinations.


     

  2. In Lobby, select the source to proceed to the next screen.
    The destination you just added should be visible on the next screen:


    Click on Learn More , which will take you to SAP help docs where you can get to know more about how to add destination for a particular source .

  3. Click on the destination you just added to navigate to the service details screen.

  4. Click on Next button to provide the name and description for the Actions Project and complete the creation process.

  5. After successful creation, the Action project will open within the Action Editor where the list of available Actions can be selected.

    Select the actions you want to add and click Add button.

  6. Navigate to the Test tab and the Destination which was used to create the Action Project is already pre-selected.

  7. Click on Test button to validate if the service is correctly consumed via destinations and the data is seen in the Test preview of actions editor.


Thanks for reading and I hope it helped to understand the concept of configuring Destinations and consuming them in Actions project. Please feel free to leave a comment if there are any questions and I would be happy to receive any feedback.

References: