Hi All,
is there standard SAP API to get Sales Contract number based on Customer and material IDs,, we are going to post Sales order in S4HC with reference to contract number (using CPI ) using below API
https://api.sap.com/api/API_SALES_ORDER_SRV/resource
but for that we need to get contract number first
Regards
Ghadeer
Request clarification before answering.
Hi ghadeer_2020,
Please find here the Sales Contract API documentation:
This service enables you to read sales contracts, as well as create, update and delete sales contract headers and items. I recommend to check the entities to analyze your requirement.
Hope this helps.
Arturo Montes de Oca
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ghadeer_2020,
Currently you can use the Sales Contract (A2X) | API | SAP API Business Hub to read sales contract, but this API is based on OData V2 version, does not support nested filters in $expand. So, you may can using below request to get all sales contract for one customer, then filter the item's material in your app logic.
https://HOST/sap/opu/odata/sap/API_SALES_CONTRACT_SRV/A_SalesContract?$expand=to_Item&filter= SoldToParty eq 'CustomerNumber'.Or you may can try to enable the extensibility. For example, you can add one custom field to contract item (enable it for both UI and API), e.g. ItemCustomerNumber. When you create the sales contract, set the ItemCustomerNumber same as the customer at header level. Then you can use the filter to query the /A_SalesContractItem entity.
Hope it helps you.
Best Regards,
Troy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 14 | |
| 12 | |
| 7 | |
| 6 | |
| 5 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.