CRM and CX Blogs by Members
Find insights on SAP customer relationship management and customer experience products in blog posts from community members. Post your own perspective today!
cancel
Showing results for 
Search instead for 
Did you mean: 
gregorw
Active Contributor


Once again searching for a solution for a generic solution in the SAP Standard paid off. I've got the business requirement that two existing Service Requests (SR, CRM Object Type BUS2000223) had to be merged. When they are merged, then the leading SR should get a new status and the duplicate should get the status "Cancelled". Using my trusted Google Custom Search- SAP Community Network Search I found the SAP Standard documentation Deduplication of Leads. I followed the description and was able to to get the merge of Leads working in our CRM sandbox system.

 

For a quick test possibility I've created an report and used the coding from method EH_ONMERGE_SEL of class CL_BT108S_L_RESULT_IMPL to replicate the call of the BOL method mergeDuplicateDocument. That way I could already test the merge of SR's without the need to make adjustments in the WebUI.

 

The first issue to get around was the customizing view CRMV_ORDER_DEDUP. It restricts the possible transaction types to leads. As I didn't take the time to investigate further I've simply created my own maintenance view for the table CRMC_ORDER_DEDUP.

 

Then I investigated the Package CRM_ORDER_DEDUP with the implementation to merge Leads (CRM Object Type BUS2000108). But my first attempt to use a custom class as a subclass of CL_CRM_DEDUP_MERGE_LEAD_IMPL failed. I've got a dump in the area of the document flow. Then I've reached out to other CRM Experts via Twitter:

 

Luckily andrei.vishnevsky2 replied:

 

 

I've exchanged my investigations with him via E-Mail and he provided a lot of valuable information. So I've created first an interface IF_CRM_DEDUP_MERGE_BUS2000223 (of course with a SSCR-Key needed) and added the instance methods MERGE_STATUS and MERGE_HEADER. For the needed parameters I took the information from the interface IF_CRM_DEDUP_MERGE_BUS2000108. Based on that I've implemented my own merge class with the super class CL_CRM_DEDUP_MERGE. Here it would be great if SAP could provide an implementation of the abstract class CL_CRM_DEDUP_MERGE that could be re-used for other objects. In the moment I had to re-implement the constructor in my class as a copy from CL_CRM_DEDUP_MERGE_LEAD. The rest was straight forward and I've implemented the methods MERGE_STATUS and MERGE_HEADER according to the business requirements.

 

But the execution of my test report still failed with a dump. Via debugging I've found that there where missing entries for SR Object Type BUS2000223 in the customizing view MVOBLRO. So I  took the entries for the Lead:

 




















Role Type Object Type Repository
CRM_DEDUP BUS2000108 BO
CRM_PRIME BUS2000108 BO

 

and create similar ones for the Service Request:

 




















Role Type Object Type Repository
CRM_DEDUP BUS2000223 BO
CRM_PRIME BUS2000223 BO

 

After that adjustment the call of BOL method mergeDuplicateDocument went through smoothly.

 

Do you have a similar requirement? Should SAP perhaps provide support for merge in additional CRM Object Types? Let me know via the comments.

1 Comment