cancel
Showing results for 
Search instead for 
Did you mean: 

OData HTTP request to get sales order sold-to party customer name

manewb
Explorer
0 Kudos

Hello,

Just to preface this: I am a complete novice with SAP.

My current project is to demonstrate simple functional API integration between an Outsystems front and SAP OData backend using the Sales Order API. So far I - and my project partner - have gotten by with using the standard API calls with no need for custom code on the SAP side, which is all fine and good as I have no experience with it.

The issue now is that the customer is only shown as the Sold-to Party ID, which is not very legible to humans. We'd want to be able to retrieve the customer name based on the SP ID, and have the app find the correct SP ID when the customer name is typed when searching.

As far as I have found out going through the API documentation, the Sales Order API only gives out the Sold-to Party ID and I haven't found a way to retrieve the customer name. I have gathered that this is possible using custom code but I was hoping to find a ready-made solution that is easy to implement for a complete newbie such as myself.

Any help would be greatly appreciated, thanks.

Accepted Solutions (1)

Accepted Solutions (1)

former_member189962
Active Participant

Hallo Matti,

This looks like a very trivial requirement and should have already been supported by the standard sales order OData API.

As a workaround, (since you want to avoid the custom coding) you can call another OData API for Business Partners called - API_BUSINESS_PARTNER and directly access the resource A_Customer.

Link - https://api.sap.com/api/API_BUSINESS_PARTNER/tryout

Provide the Sold-to-Party number as the input and you will get full-blown Customer details as the response. For example:

Request URI: https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap/API_BUSINESS_PARTNER/A_Customer(%2717100001%27)

Response:

"Customer": "17100001",

"AuthorizationGroup": "",

"BillingIsBlockedForCustomer": "",

"CreatedByUser": "S4TESTER",

"CreationDate": "/Date(1467158400000)/",

"CustomerAccountGroup": "CUST",

"CustomerClassification": "",

"CustomerFullName": "Company Domestic US Customer 1/30315-1402 Atlanta",

"CustomerName": "Domestic US Customer 1",

"DeliveryIsBlocked": "",

"NFPartnerIsNaturalPerson": "",

"OrderIsBlockedForCustomer": "",

"PostingIsBlocked": false,

"Supplier": "17100001",

.........

......

Cheers!

Ankush

manewb
Explorer
0 Kudos

Thanks for the response. I've yet to try your suggestion but we managed to solve the problem by getting the customer data from the database and hardcoding that into the Outsystems solution.

Answers (0)