Wednesday, October 28, 2015

Deleting Contact Person between SAP CRM and SAP ECC

In this week blog I'll explain what happens in SAP CRM as the SAP ECC system is leading to delete a contact person from an account. Deleting the contact person in ECC ensures that not the contact person but the relationship in CRM (is contact person of) between the contact person and the account is deleted. Deleting the contact person in SAP CRM is more difficult because this business partner can also be used in several business transactions.

In order to indicate that the specific business partner in SAP CRM is no longer active, it would make sense to set an archiving flag. The contact remains visible, however, if you select this contact you will receive a warning that the contact person is marked for archiving.




Setting the archiving flag automatically in SAP CRM requires custom development.
When the contact person is deleted in ECC, a BDOC message BUPA_MAIN to CRM to delete the contact relationship BUR001 is triggered.


Transaction CRMC_BUT_CALL_FU holds the sequence of function modules triggered when processing the BDoc in SAP CRM.

You can create a custom function module with the interface same as BUPA_MWX_BDOC_BPS_FILL_CENTRAL and then register it in transaction CRMC_BUT_CALL_FU for CRM outbound.

New record for event CRM IN is added with custom function module YCRM_CONTACT_DEL_FLAG


BAPI_BUPA_CENTRAL_CHANGE is used in custom YCRM_CONTACT_DEL_FLAG to update the archiving flag on the business partner.


Result:

1 comment: