How to add Partner ContactPerson to SalesOrder via API

5 days ago 14

Hi 

We are trying to adhd the PartnerRole ContactPerson to a Salesorder via the API. We are capable to adhd each different Roles similar BillTo, ShipTo etc. Partner. But we cannot get the ContactPerson to work.

We are utilizing the pursuing API: https://xxx/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrder/
And nonstop the pursuing Payload:

{ "SalesOrderType": "TA", "SalesOrganization": "2210", "DistributionChannel": "10", "OrganizationDivision": "00", "SalesOrderDate": "/Date(1896341058398)/", "SoldToParty": "1116830", "ShippingType": "X1", "to_BillingPlan": { "BillingPlanCategory": "0", "BillingPlanType":"90", "BillingPlanStartDate":"/Date(1696341058398)/", "to_BillingPlanItem": [{ "BillingPlanDateCategory":"02", "BillingPlanBillingDate":"/Date(1696341058398)/" }] }, "to_Partner": [ { "PartnerFunction": "AG", "BusinessPartnerAddressUUID": "ff1769a5-59df-1eef-8feb-f602b0cc2490" }, { "PartnerFunction": "RE", "BusinessPartnerAddressUUID": "ff1769a5-59df-1eef-8fec-87992d9ce491" }, { "PartnerFunction": "RG", "BusinessPartnerAddressUUID": "ff1769a5-59df-1eef-8fec-87992d9ce491" }, { "PartnerFunction": "WE", "BusinessPartnerAddressUUID": "ff1769a5-59df-1eef-8fec-1f131815e490" }, { "PartnerFunction": "AP", "ContactPerson": "61483", "ReferenceBusinessPartner": "1027297", "Personnel": "0" }, { "PartnerFunction": "SH", "to_Address": [{ "StreetName": "teststrasse", "HouseNumber": "12", "PostalCode": "8173", "Country": "CH" }] } ] }

The mistake we're getting is:

    <message xml:lang="en">Partner relation AZ is not defined successful spouse process SO02 ()</message>

Thanks a lot
Stephen

Read Entire Article