SAP Knowledge Base Article - Public

3274422 - Error: “Multiple values for partner exists in the payload” While Performing a PATCH Operation to Update the Existing Partner Functions of a Customer Using OData API_BUSINESS_PARTNER

Symptom

Using the OData API_BUSINESS_PARTNER, upon trying to modify/update the existing Partner function for the Customers using PATCH operation, system throws the error:

Multiple values for partner exists in the payload

Environment

SAP S/4HANA Cloud

Reproducing the Issue

PATCH operation:

Example of the query:

https://myxxxxxx-api.s4hana.ondemand.com:443/sap/opu/odata/sap/API_BUSINESS_PARTNER/A_CustSalesPartnerFunc(Customer='ZZZZZZ',SalesOrganization='XYZ',DistributionChannel='10',Division='00',PartnerCounter='0',PartnerFunction='XX')


Sample Request Payload as below:

{

  "PersonnelNumber": "PQR"

}

where xxxxxx represents the tenant URL of the S/4HANA cloud system
ZZZZZZ represents the Customer ID
XYZ represents the Sales Organization
10 represents the Distribution Channel
00 represents the Division
0 represents the Partner Counter
XX represents the Partner Function
PQR represents the Personnel Number


Response Payload:

Status code
400


Body
{
  "error": {
    "code": "CI_DRAFTBP_MESSAGE/073",
    "message": {
      "lang": "en",
      "value": "Multiple values for partner exists in the payload"
    },
    "innererror": {
      "application": {
        "component_id": "LO-MD-BP",
        "service_namespace": "/SAP/",
        "service_id": "API_BUSINESS_PARTNER",
        "service_version": "0001"
      },
      "transactionid": "********************************",
      "timestamp": "20221020200106.2397060",
      "Error_Resolution": {
        "SAP_Transaction": "For backend administrators: use ADT feed reader \"SAP Gateway Error Log\" or run transaction /IWFND/ERROR_LOG on SAP Gateway hub system and search for entries with the timestamp above for more details",
        "SAP_Note": "See SAP Note 1797736 for error analysis (https://service.sap.com/sap/support/notes/1797736)"
      },
      "errordetails": [
        {
          "ContentID": "",
          "code": "API_BP_MSG/035",
          "message": "More than one partner number specified in service payload: BPCustomerNumber  PersonnelNumber",
          "longtext_url": "/sap/opu/odata/iwbep/message_text;o=LOCAL/T100_longtexts(MSGID='API_BP_MSG',MSGNO='035',MESSAGE_V1='BPCustomerNumber',MESSAGE_V2='',MESSAGE_V3='PersonnelNumber',MESSAGE_V4='')/$value",
          "propertyref": "",
          "severity": "error",
          "transition": false,
          "target": ""
        },
        {
          "ContentID": "",
          "code": "API_BP_MSG/032",
          "message": "Validation errors occurred for entity type A_CustSalesPartnerFuncType",
          "longtext_url": "/sap/opu/odata/iwbep/message_text;o=LOCAL/T100_longtexts(MSGID='API_BP_MSG',MSGNO='032',MESSAGE_V1='A_CustSalesPartnerFuncType',MESSAGE_V2='',MESSAGE_V3='',MESSAGE_V4='')/$value",
          "propertyref": "",
          "severity": "error",
          "transition": false,
          "target": ""
        },
        {
          "ContentID": "",
          "code": "CI_DRAFTBP_MESSAGE/073",
          "message": "Multiple values for partner exists in the payload",
          "longtext_url": "/sap/opu/odata/iwbep/message_text;o=LOCAL/T100_longtexts(MSGID='CI_DRAFTBP_MESSAGE',MSGNO='073',MESSAGE_V1='',MESSAGE_V2='',MESSAGE_V3='',MESSAGE_V4='')/$value",
          "propertyref": "",
          "severity": "error",
          "transition": false,
          "target": ""
        }
      ]
    }
  }
}


Cause

For partner functions in API_BUSINESS_PARTNER it is only allowed to provide one of the fields BPCustomerNumber, Supplier, PersonnelNumber or ContactPerson.

During a PATCH the existing data is read from the database and merged with the fields provided in the payload.

Consider the scenario when you send only the below Request XML: 

{

"PersonnelNumber" : "PQR"

}


The BPCustomerNumber will be read from the database, merged with the PersonnelNumber and again both numbers will be filled, which will lead to the error.

Resolution

The below payload works successfully using the PATCH function.

{

    "BPCustomerNumber" : "",
    "PersonnelNumber" : "PQR"

}

The only case that a payload with only PersonnelNumber in PATCH would be successful, would be when the Partner Function back when it was first created was also created by sending a Personnel Number.

So if a partner function was created with a payload like the below (only PersonnelNumber filled, BPCustomerNumber empty) a subsequent PATCH with only Personnel Number would be successful:

POST operation:

{

    "Customer" : "ZZZZZZ",
    "SalesOrganization" : "XYZ",
    "DistributionChannel" : "10",
    "Division" : "00",
    "PartnerCounter" : "0",
    "PartnerFunction" : "XX",
    "BPCustomerNumber" : "",
    "Supplier" : "",
    "PersonnelNumber" : "PQR",
    "ContactPerson" : ""

}


Then PATCH operation would work successfully for the modify/update the existing Partner function for the Customers with the below Request Payload.

{

"PersonnelNumber" : "PQR"

}

Keywords

Multiple Values, PATCH, PersonnelNumber, POST, OData, API_BUSINESS_PARTNER, A_CustSalesPartnerFunc, Personnel Number, SAP Gateway Error Log, /IWFND/ERROR_LOG, BPCustomerNumber, Partner function, Customer, CI_DRAFTBP_MESSAGE/073  , KBA , LO-MD-BP-ODT , OData Service for Business Partner , Problem

Product

SAP S/4HANA Cloud all versions