cancel
Showing results for 
Search instead for 
Did you mean: 

Need API to Fetch Customer Hierarchies in S/4HANA Public Cloud

THEMBO_JONATHAN
Explorer
0 Kudos
175

Hello SAP Community,

I am currently working with SAP S/4HANA Public Cloud and I need to programmatically retrieve Customer Hierarchies (e.g., parent-child relationships between sold-to, payer, bill-to, ship-to partners, etc.). After reviewing the available APIs in the SAP Business Accelerator Hub, I have not found an OData or SOAP API that explicitly supports fetching customer hierarchies or customer master relationship data.

I have already explored the following:

  • Business Partner APIs (API_BUSINESS_PARTNER)

  • Available CDS Views and Communication Scenarios

None of these seem to expose the full customer hierarchy data as required for our use case.

My questions:

  1. Is there an existing standard API or communication scenario in S/4HANA Public Cloud that supports retrieving customer hierarchies?

  2. If not available as a standard API, is there a released CDS View or extension point that can be used via a custom communication scenario?

  3. Are there recommended approaches or best practices for handling this requirement in a public cloud environment, given the extensibility restrictions?

Any guidance or references would be highly appreciated.

Thank you in advance!

Accepted Solutions (0)

Answers (1)

Answers (1)

IreneLiu
Product and Topic Expert
Product and Topic Expert

Hello @THEMBO_JONATHAN 

In help portal, I found a CDS view Customer Sales Area Partner Function (I_CUSTSALESPARTNERFUNC) which mentions that:

This CDS view retrieves data related to customer partner function.

Could you please have a look on that?

Best regards,

Irene

THEMBO_JONATHAN
Explorer
0 Kudos

Thanks
The Customer Sales Area Partner Function is also present in the core public api: Business Partner
So I am able to pull data from the end point related to the customer sales partner function and looking at it, it does not meet my requirement of obtaining the

Customer Hierarchies