SAP Knowledge Base Article - Public

3589633 - Business Partner Replication Error: "Second business partner in relationship is not valid"

Symptom

While replicating Business Partner from SAP ERP or S4HANA, customerPartnerFunctionERPReplicationMessageIn or businessPartnerS4ReplicationMessageIn, the incoming message fails with the following error:

"{\"error\":{\"message\":\"Second business partner in relationship is not valid.\",\"code\":\"sap.crm.md.service.businessPartnerRelationshipService.businessPartnerRelationshipMessage.secondBusinessPartnerInvalid\"}}"

Environment

  • SAP Sales & Service Cloud v2
  • SAP Sales & Service Cloud v2 Integration with SAP ERP
  • SAP Sales & Service Cloud v2 Integration with SAP S4HANA

Reproducing the Issue

  1. Go to Message Monitoring.
  2. Open the failed message ID.
  3. Navigate to the message request and check the error log.

Cause

  • Although the failed message is for BusinessPartnerReplication to replicate single business partner, the "second business partner" mentioned in the error message is one of the parties sent under PartnerFunction node. 
  • If the Value Mapping under "partner number type" is not maintained, the system will not be able to determine whether the incoming partner function is an Account, Contact Person, or Employee type.

Resolution

Map the external party codes to either Account, Contact Person, or Employee, in the value mapping of PartnerNumberType. This mapping will help the system determine the local ID from the corresponding type and reprocess the failed message.

Keywords

"Second business partner in relationship is not valid", "secondBusinessPartnerInvalid" , KBA , CEC-CRM-INT , Integration for SAP Sales/Service Cloud , Problem

Product

SAP Sales Cloud and SAP Service Cloud Version 2 1.0