2024 Jul 26 4:37 PM - edited 2024 Jul 26 4:39 PM
Dear Community,
My question is about the data returned by SAP S/4HANA Cloud Public Edition APIs, for example, API_SALES_ORDER_SRV.
Let’s say I want to consult the root node of Sales Order with ID 7. This is the SO in SAP S/4HANA Cloud Public Edition:
This is the API call:
https://my000000-api.s4hana.cloud.sap/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrder('7')
This is the service response of the nodes marked in red on the image:
<content type="application/xml">
<m:properties>
<d:SalesOrder>7</d:SalesOrder>
...
<d:TransactionCurrency>MXN</d:TransactionCurrency>
<d:IncotermsClassification>DAP</d:IncotermsClassification>
<d:CustomerPaymentTerms>0002</d:CustomerPaymentTerms>
...
</m:properties>
</content>
As you can see, the API does not return associated texts with each of the codes:
My questions are: Is there any way to include the texts in the API response? If yes, is there any way to indicate in the API request the language in which you want to receive them?
Thanks!
Thank you for your question, @espinaro.
The properties and values you obtained with odata/sap/API_SALES_ORDER_SRV/A_SalesOrder('7') you may use as parameters for the next GET APIs:
For incoterms use OData V2 API "Incoterm - Read (A2X)", SAP Business Accelerator Hub. Here, you might want to filter by language: /odata/sap/API_SD_INCOTERMS_SRV/A_IncotermsClassification('EXW')/to_IncotermsClassificationText?$filter=Language%20eq%20'EN'
For currency, I found this CDS View I_CurrencyText (Basic) in the SAP Business Accelerator Hub. SAP Business Accelerator Hub. You could expose that view as a Read OData API on your own following the instructions within.
For terms of payment I found CDS View I_PaymenttermsText (Basic): SAP Business Accelerator Hub. Again, you could expose that view as a Read OData API on your own.
If that solves your request, please mark accordingly. Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
73 | |
10 | |
9 | |
8 | |
8 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.