on 11-26-2021 2:25 AM
I am trying all exercises from C_CPI_14 - Unit 3 - Exercise - Consume Purchase order API from SAP API Business Hub, Step 19 In the configuration view of the OData connector, select the Connection tab. Enter the Request URL you previously took note of. Deselect the CSRF token fetch.
When I tried to provide below URL in the Request & Reply - Address as specified in the document, I am getting connection error
https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap/API_PURCHASEORDER_PROCESS_SRV
Can someone, please help me so that I can continue with my learning and complete. Appreciation your inputs /
#Developing with SAP Integration Suite
Hi nkrishna,
Please try to do this:
Enter api.sap.com in your browser
Choose a product to explore -> click on S/4HANA Cloud
In the top switch from Overview to API's
In the line below switch from All to ODATA V2
In the right search field enter purchase order and press enter
Click on the ODATA V2 API Purchase Order tile
Click on the Try Out button
If you are not automatically signed in, use your credentials to log in
In the left navigation bar, scroll down and expand Purchase Order and choose the GET API (do not use the Subcontracting Components API)
Enter 15 in the $top parameter field
Click on the Run button
As the result you will see the S/4HANA Cloud sandbox URL in the Request URL field
and the first 15 purchase orders in the request body.
Copy now the API Key from the right button Show APIKey and the Request URL
Enter these informations into step 19 of your iFlow configuration.
BR,
Illya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello lllya,
Many thanks for your kind advice and assistance to resolve my issue, appreciated.
I followed same steps you suggested and the Request URL which I received is "https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap/API_PURCHASEORDER_PROCESS_SRV" and APIKey TSU1f4dbpstPqUYFKV49dlHrV8Kan055. After entering this details, I am getting error message,v "failed to connect to the system".
Not sure where is the problem!!
Hello lllya,
Today I have tried the request URL & APIKey using postman https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap/API_PURCHASEORDER_PROCESS_SRV.
I am getting 401 unauthorized error. May be this is the reason why I am unable to proceed with the connection step. Can you please guide me
Hi Nagendra,
You need to configure the connection between the Request&Reply and the Receiver.
Click on the OData connection element and select the Connection tab there to enter the API URL and any other required input.
By the way, when I click on the link I provided, it takes me to the SAP API Business Hub page... There you can directly get the API Key as described.
BR,
Illya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you cannot access api.sap.com with your credentials (which usually must be the case), you must contact the SAP API group. Help information can be found at the bottom of the api.sap.com page.
If you can access api.sap.com and successfully test the GET method A_PurchaseOrder there, everything is fine and you can proceed with the iFlow configuration.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Nagendra,
Please pass the header name APIKey in receiver odata adapter request header section ( in addition to Ilya suggested changes ) then you should be able to resolve the issue.
Regards,
Sriprasad Shivaram Bhat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.