How to retrieve the data of all business partners after the creation of SAP C4C sales order by code
For example, after I create a Sales Order, how can I retrieve the Involved Parties information automatically filled in by SAP Partner determination by code?
One way to do this is to use SAP C4C Odata service.
Work Center Administrator->Odata Service Explorer
Select Custom Odata services from the drop-down menu and click New to create a new OData service.
Select BO: CustomerQuote corresponding to the sales order and select Party as the node. This node contains all the business partner data of the sales order:
Different business partners are distinguished by RoleCategoryCode and RoleCode on the Party node, so these two fields should be selected as well:
Finally, visit Odata in the browser and get the data of all Party nodes:
https:// .c4c.saphybriscloud.cn/sap/c4c/odata/cust/v1/zjerrysalesorder/CustomerQuoteCollection('00163E7209C61EE8B7B05E4D176BAB6B')/CustomerQuoteParty
The rest is code consumption of the OData service. For specific steps, please refer to SAP's official github:
https://github.com/SAP/C4CODATAAPIDEVGUIDE
To get more Jerry's original articles, please pay attention to the public account "Wang Zixi":