SAP Knowledge Base Article - Public

3632092 - Exporting Contact Person ID (Short Number) via Business Partner A2X API in SAP S/4HANA Cloud Public Edition

Symptom

  • When creating a Sales Order via the API, the specified contact person (ReferenceBusinessPartner) is ignored.
  • SAP selects the default contact person from the list instead of using the provided one.
  • The API only processes the Partner field, not Assigned BP, causing a mismatch.

Environment

SAP S/4HANA Cloud Public Edition

Reproducing the Issue

  1. Launched VA01, entered Sold-to Party.
  2. Selected a valid Sales Area.
  3. SAP automatically filled Contact Person..
  4. Attempted to manually add another BP or others, still overridden or ignored on save.
  5. Observed the same partner assigned in the Partner tab as seen when calling the Sales Order API with ReferenceBusinessPartner.

Cause

  • SAP Sales Order partner determination logic does not respect manually assigned Assigned BP values (from GUI or API). Only partner IDs directly matching the Partner field, as per configured determination, are accepted. Contact Person (CP) is locked by config and not manually overridable.
  • The partner function CP (Contact Person) in the sales order header partner procedure:
  • Does not allow manual override (PM flag not set).
  • Uses automatic determination based on the business partner’s contact relationships.
  • The field ReferenceBusinessPartner in the API corresponds to the Assigned BP in the UI, which is not evaluated during creation.

Resolution

  1.  Adjust Contact Person Priority in Business Partner Master Data
    • Reorder or remove Contacts in the Business Partner relationships so the desired Contact Person appears first.
    • This helps guide the automatic determination logic in the Sales Order partner procedure.
  2. Retrieve Actual Assigned Contact Person After Creation
    • Use the /A_SalesOrder OData API (GET method) to read the final determined Contact Person.
    • This allows the systems to display or log the actual CP assigned by the system logic.

See Also

Keywords

Public Cloud, contact person, sales order API, SAP S/4HANA Cloud Public Edition, ReferenceBusinessPartner, partner determination, CP function, Business Partner A2X API, CDS view, , KBA , SD-SLS-SO-2CL , Sales Orders (Public Cloud) , Problem

Product

SAP S/4HANA Cloud Public Edition all versions