cancel
Showing results for 
Search instead for 
Did you mean: 

SAP C4C - How to delete Contacts in mass

Former Member
0 Kudos

Hello SAP Support

We need to set obsolete and delete in mass 300 contacts.

When I say "Delete", it means to unassign the contact from the Account or remove the relationship from the account. Manually we can do it from the account page by clicking on the garbage icon button in the contact facet.

We want to do it in mass, but it's not clear the way we can proceed :
- By migration template, I will only be able to set obsolete the contacts , not unassign the contact from the Account.
- By dataworkbench with "Contact relationship", I can't find the object ID linked to the contact ID. So it seems not possible or it's a bug.

Can you please help ?

Thank you

jérémie

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Ankush,

Indeed we can't delete Contacts, but I got the answer from the SAP Support and it helped me. below their answers :

Hi,

I have analysed the issue presented to us and have Steps to follow and Resolutions.

Description

Your requirement is to remove the relationships from your customers massively.

Example: Account ABC have three other accounts in tab "Relationship". You want to remove them.

Relationships can also include contact person. Hence your requirement may be to remove the contact assignment from an existing customer account.


Resolution

You can meet this requirement using Data Workbench.
With Data Workbench enabled for OData entity "BusinessPartnerRelationships" with "Delete" option flagged you can remove the relationship from customers.

So, the first step is to create a new odata service with this entity.

1. Go to Administrator->OData Service Explorer
2. Select to Show Custom OData
3. Click on button new
4. Maintain the name and flag the field "Data Workbench Enabled"
5. Edit the new service and click on "Select Business Object"
6. Select BO "BusinessPartnerRelationship" and node "Root"
7. Include the following fields in OData Service

Root: UUID, CategoryCode, DefaultIndicator
FirstBusinessPartner: InternalID
SecondBusinessPartner: InternalID

Explanation about the fields:
Field "DefaulIndicator" indicates which is the main contact of correspondent account.
Fields "InternalID" and "InternalID1" correrspond to Account ID and second Account ID respectively.
Field "CategoryCode" shows the relationship type which "BUR001,Contact Person Rel.ship" means Contact relationship. Note there are other assignments than Contact Person.

8. Save and activate it

To use this OData Service in Data Workbench and delete the relationship assignments follow the steps below

1. Export the relationship data which needs to be deleted
->Go to Export->select the business object "BusinessPartnerRelationships"-> select the filter criteria "ID" (if needed) ->Next->Click on "Export"

2. Download the above exported file from Montior.

3. Edit the downloaded file
->Add "ToBeDeleted" as the last column to the file.
->For the records to be deleted, set the value as "true" in "ToBeDeleted" column.
->Save the above changes in the file.

4. Go to Data Workbench->"Update" view
->Select the object->click Next
-> Upload the file from 3rd step, Next
->Click on Import.

Important Remark: Removing the contact assignment of customers, data like business address, function, department, business communication data gets removed as well, because this data is relationship dependent and gets deleted when the relationship is deleted.


Answers (1)

Answers (1)

AnkushPashine
Advisor
Advisor

Dear Jérémie,

When you are removing the 'Contact' from the Contacts facet of an Account,
basically you are unlinking the contact with that account (i.e. removing the
relationship as :: 'Is Contact Person' for that particular Account).

=> As 'Contact' is the master data you do not have option to be 'Deleted'
,only you can set it to 'Obselete'.

Hope this answer your query.

Thanks and Regards,
Ankush Pashine.

dhruv_mehta
Active Contributor
0 Kudos

Can we make it obselete via Data Workbench.