Enterprise Resource Planning Blogs by SAP
Get insights and updates about cloud ERP and RISE with SAP, SAP S/4HANA and SAP S/4HANA Cloud, and more enterprise management capabilities with SAP blog posts.
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member245258
Participant
5,341
[Last reviewed for Updates: January 18, 2019]

In previous episode of my blog I had explained about how we start with SAP API Business Hub:

https://blogs.sap.com/2017/11/20/getting-started-with-sap-api-business-hub/

In this episode I would be explaining how we call GET method of SAP S/4HANA Cloud API from SAP API Business Hub.

For complete utilization of information present in this blog, it is recommended to go through my earlier blogs as part of this series if not done already.

In our example here, we will fetch a list of top 10 Purchase Orders from SAP S/4HANA Cloud system by putting a filter criteria using GET method. Lets have a look at the steps to achieve this.

Note: Every API might be having multiple entities in it. Hence based on our requirement we have to  select a relevant entity.

1. Click on the entity 'A_PurchaseOrder' and then click 'GET /A_PurchaseOrder':



2.  Put value '10' in parameter '$top' (as we want to retrieve top 10 Purchase Orders from our SAP S/4HANA Cloud system):

Note: We can even leave all parameters blank, in case we want to retrieve all values.



3. Click 'Try it out' to finally trigger the request in SAP S/4HANA Cloud system (as configured in earlier blog):



4.  The response would be received in JSON format similar to the snapshot below:



 

In case we want to fetch details of one specific Purchase Order, we can use another entity 'GET /A_PurchaseOrder('{PurchaseOrder}')' :



Here we will provide Purchase Order Number in 'PurchaseOrder' parameter and Click 'Try it out':



This will fetch details of a given Purchase Order as result.

We are now successful in reading the details of 'Purchase Orders' from SAP S/4HANA Cloud using API via SAP API Business hub.

In my next blog I would explain the steps to create a Purchase Order in SAP S/4HANA Cloud using API, triggered from SAP API Business Hub.

Stay Tuned!

Disclaimer: This blog is based on SAP S/4HANA Cloud 1711 release.
7 Comments
former_member22425
Active Participant
 

Good one....
RanjuGupta
Advisor
Advisor
Good one Akshay.. Thanks for sharing 🙂

 
former_member245258
Participant
0 Kudos
Thanks Ranju!
Ajay_Mathur
Product and Topic Expert
Product and Topic Expert
This blog series is extremely good Akshay! I went through all 3 blog posts and am now more confident of trying out these API calls myself whenever required! Thank you.....
former_member245258
Participant
0 Kudos
Thanks a lot Ajay!
Former Member
0 Kudos
Hi Expert,

If i add new custom field via in app extension in business partner object in S/4 HANA Public cloud, then will i get extended field in O data get method of business partner?

Thanks
former_member245258
Participant
0 Kudos
If the relevant OData API is enabled for extensibility then YES!