Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
VijayCR
Active Contributor
Hi SAP Experts,

There are multiple ways to consume actions not available in the store in the SAP Build Process Automation .

S/4 HANA On-Premise or ECC based Custom Odata services can be accessed by the below two ways with the Core Clean principle using the Side-by-Side Extension scenarios

I have explored the different possibilities to expose the S/4 HANA On-Premise Custom OData services to the SAP Build platform since there are challenges exposing the Odata directly from S/4 HANA On-Premise to SAP build

How to create actions on the SAP build ?

 

SAP BTP ABAP RAP ( RESTful ABAP Programming Model )using the side-by-side extension scenario :

  • Create a Custom Entity and call either the backend RFC function modules or API classes from SAP S/4 HANA to perform the functionality

  • Create the Service binding as shown below .

  • Copy the URL and get the metadata for the same.

  • Create a Odata Open API using the open source https://convert.odata-openapi.net/ by pasting the Metadata

  • There are also other open API converters in github for the On-Premise system however they are more specific to the SICF nodes and does not work for the BTP ABAP based Odata services https://blogs.sap.com/2019/07/09/how-to-create-an-openapi-rest-service-from-an-odata-v4-rest-service...

  • Copy the same and save in a file with Extension .json


  • Once you click on the create button the below screen appears to select the required actions :


How to Test the Actions :

  • First Create a destination for the Odata service using the BTP Destinations and add the parameters as shown below

    • sap.applicationdevelopment.actions.enabled : true

    • sap.processautomation.enabled : true



  • Add the destination in the BTP Build



  • Now for the POST operation generate the CSRF token as shown below other wise you get an error 


  • Look for the response 201 as soon as it gets created .


  • Release the action and publish it so that it can be used the build process automation .

  • Now go to your process automation and this action can be used as a Action tasks for all the CRUD operations as shown below


  • All the input Parameters and results will be automatically shown as seen below :


  • Furthermore these can be mapped with the workflow context coming from the trigger either with the trigger form or the from API trigger

  • After the execution of the SAP Process automation this is how the POST or GET call looks in the monitor applications



Using CAP (Cloud Application Programming Model)  based Odata API using the side-by-side extension scenario

  • For the CAP Node.js based applications expose the API service via destinations as shown below

  • Add the destination in the build as shown below


  • For the Open API conversion of the metadata here we can use the below command and it will create .json file as shown below


cds compile srv --service all -o docs --to openapi










Please let me know in case of any feedback
20 Comments
MustafaBensan
Active Contributor
Hi Vijay,

With reference to your comment "there are challenges exposing the Odata directly from S/4 HANA On-Premise to SAP build", it would be helpful for context if you could elaborate on what these challenges were and how they led you to the RAP solution.

Thanks,

Mustafa.
VijayCR
Active Contributor
mbensan  There is a CORS issue to connect to On prem Odata services currently

thanks

vijay
MustafaBensan
Active Contributor
I like the use of actions in your solution to allow modular reuse of CRUD operations.  What do you think about the use of the Call Web Service with Destination activity as described in the following tutorial?

Learn How to Create and Configure BTP Destinations in SAP Build Process Automation
VijayCR
Active Contributor
yes this could be one alternative however this is not a clean core approach my focus was more on side-side extensions so that this can work irrespective of the backend systems for custom Odata services
MustafaBensan
Active Contributor
Can you clarify why the approach in the tutorial is not a "clean core" approach?  Doesn't the tutorial approach keep the core clean by creating a solution on SAP BTP and integrating it with the exposed on-premise API?

 

 
VijayCR
Active Contributor
The core approach I Follower here is not to call Odata directly from BTP ABAP Using instead use released API classes or CDS views  for CRUD operations

thanks

vijay
MustafaBensan
Active Contributor
Understood.  My point was that even when using the released API classes or CDS views for CRUD operations, they are still exposed as OData services which could be consumed via the Call Web Service with Destination activity of SAP Build Process Automation instead of Actions, right?
VijayCR
Active Contributor
Yes your right we could follow webserives approach from BTP ABAp as well instead of RAP using service consumption model .
thanks

vijaya
MustafaBensan
Active Contributor
0 Kudos
Okay, thanks for the clarification.
LeandroRibeiro
Participant
0 Kudos
Hi Vijay,

A very nice blog!

The more blogs of this type (SAP Build integration with On Premise - ECC or S/4) are created, the more people like me who are learning SAP Build will be grateful.

I imagine I can use this same idea by creating actions in the SAP Build App (instead of SAP Build Process Automation), right?

Best regards.
VijayCR
Active Contributor
0 Kudos

Hi Leandro ,

thanks for your feedback

Yes we can use the Odata services via destiantions in SAP Build apps not actions directly .

thanks

Vijay

Dan_Wroblewski
Developer Advocate
Developer Advocate
You can use actions in SAP Build Apps? I thought Actions were artifacts consumed in SAP Build Process Automation ... it would make sense to make them available in both tools, but how do you do that in SAP Build Apps?
VijayCR
Active Contributor
daniel.wroblewski
 sorry for the confusion we can use the BTP ABAP Odata services via destination in Build Apps.

Thanks,

Vijaya
geetbijlani
Participant
0 Kudos

Hi Vijay,

While converting ODATA service to open API using  https://convert.odata-openapi.net/ , in my case after entering the meta data and clicking on convert , nothing really happens. The result is blank. Is there any step that I may be missing or any specific format.

 

Please let me know if I am missing anything here or if there is an issue with the metadata.

 

Best Regards,

Geet

dinurp_at_yahoo
Discoverer
0 Kudos
Old question yet,

you can import edmx files while creating an Action project. There is no need for a converter tool.
0 Kudos
Hi Geet,

I have the same problem. Have you found a solution?

Best regards,
geetbijlani
Participant
0 Kudos
Hi abdoulaye.sangare,

 

No, unfortunately not yet this way. However, if you have subscription to integration suite, you can convert the ODATA services to API's with Open API specification using API Management . It can then be used in SPA as actions.

 

Best Regards,

Geet
Hi geetbijlani

I found a solution without using a Open API.

In your backend system launch transaction /IWFND/GW_CLIENT -> Metadata -> Display in Browser
Save your xml with extension .edmx and load this file like action.

 
geetbijlani
Participant
0 Kudos
Thank you so much for this suggestion. I will try this out!
Karthik-Thiru
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Vijay, All,

It is not needed anymore to either convert EDMX to Open API specification or even to upload EDMX specification. With the new product features, Build Actions can be created directly from a destination pointing to the odata service.

Refer to this blog for the reduced steps - https://blogs.sap.com/2023/11/06/sap-build-process-automation-consume-an-odata-api-as-actions-using-...

Regards,

Karthik
Labels in this area