Action Not working?? Know the role of CSRF and URL Prefix in Action Projects in SAP Build Process Automation
2023-11-15 16:32:58 Author: blogs.sap.com(查看原文) 阅读量:4 收藏

I faced couple of issues testing Action projects in SAP Build Process Automation. Got help from few blogs.

Putting down some information, hope you find it helpful.

Use case- “GET API for Business Partner”

We will try to use GET call here for the BP record and understand the usage of Prefix and CSRF

Now if you see this URL starts with /A_BusinessPartner(‘BPNUMBER’)/to_Customer, it will get the general data for the specified customer.

Now if you run this it won’t allow to run the action because of incomplete path.

In order to make it a successful run, thanks to these amazing blogs on Cloud connector and adding destinations

How to connect On Premise SAP to BTP using SAP Cloud Connector

Using Cloud Connector to establish connectivity between SAP BTP and on premise system

Installation and Configuration of SAP Cloud Connector

then post this follow below

After creating Action Project, enter into this gear icon

Turn this radio button ON

Now click on the second tab in this pop up “URL Prefix”

From cloud connector, you will be exposing your HOST on premise to cloud and connecting your subaccount of BTP.

The complete URL to hit SAP S4 system would be

http{host address}/{BTP Destination}/{Path in URL prefix}/{path visible in Action}

{host address} – will be the host and port from SMICM tcode in SAP S4 system

{BTP Destination} – which will be maintained in BTP account

{Path in URL prefix} – /sap/opu/odata/sap/A_BusinesPartner,

OR 

sap/opu/odata/sap/<SERVICE_NAME>/

{path visible in Action} = /A_BusinessPartner(‘BPNUMBER’)/to_Customer,

URL Prefix is important in order to add the complete URI path

Alternative to this is

Maintain complete URL in destination in BTP subaccount till the service name for the API.

Thank YOU!!

Happy Learning!!!!!!!!!


文章来源: https://blogs.sap.com/2023/11/15/action-not-working-know-the-role-of-csrf-and-url-prefix-in-action-projects-in-sap-build-process-automation/
如有侵权请联系:admin#unsafe.sh