SAP Knowledge Base Article - Public

3396486 - Create a sales order with API_SALES_ORDER_SRV with reference to contract does not copying pricing data

Symptom

I create a Sales order using the API Sales Order (A2X). I create it with reference to a contract. When the sales order is created, it is not fetching the prices from the contract. My payload is the following:

{ "SalesOrderType"            : "OR",
"SalesOrganization": "1010",
"DistributionChannel": "10",
"OrganizationDivision": "00",
"ReferenceSDDocument"       : "40000000", 
"PurchaseOrderByCustomer"   : "API Create w. Ref to contract", 
 "to_Partner":
[       
 {           
 "PartnerFunction": "PY",       
     "Customer":"1000001"     
   }    
],               
  "to_Item":
[

  "SalesOrderItem"         : "10", 
 "MaterialByCustomer"     :
"Item 1",  
 "Material":"123GPM",  
 "ProfitCenter"     :"220000",
    "RequestedQuantity"      : "1" 
 }

  ]}

Environment

  • Sales and Distribution (SD)
  • SAP S/4HANA Cloud All versions 

Resolution

Please add the reference document data on the item level of the payload also, as below: 

{ "SalesOrderType": "OR",
"SalesOrganization": "1010",
"DistributionChannel": "10",
"OrganizationDivision": "00",
"ReferenceSDDocument": "40000000",
"ReferenceSDDocumentCategory": "G",
"PurchaseOrderByCustomer": "API Create w. Ref to contract",
 "to_Partner":
[
 {
 "PartnerFunction": "PY",
     "Customer": "1000001"
   }
],
  "to_Item":
[
{
 "ReferenceSDDocument": "40000000",
 "ReferenceSDDocumentItem": "10",
 "RequestedQuantity": "1"
 }

  ]}

For more sample payloads, please see the SAP Help documentation.

See Also

Create Sales Orders with Reference | SAP Help Portal

Keywords

API_SALES_ORDER_SRV, A_SalesOrder, OR, TA, CQ, pricing type, Copy price elements unchanged and redetermine taxes, VA01, VA02, VA03, VBAK, VBAP,  , KBA , SD-SLS-API-2CL , API (Public Cloud) , How To

Product

SAP S/4HANA Cloud Public Edition all versions ; SAP S/4HANA Cloud all versions