on 08-12-2020 4:49 PM
Hi Expert. I am a facing a problem with a develop.
Basically, we need to filter the duplicate Customers and BP using the badi
This must be triggered when a Customer is created!.
The develops basically need to filter only the customers that has a percentage value higher to a custom percentage value (this value are defined in a BO).
In the next screen shot we can see the problem. This script es from CheckForDuplicateAccount, when a try to debug always the return is empty.
Hi,
I think the code which you have implemented is incorrect. In your code, you have declared "result" at line 2 but then it (result variable) was never filled/assigned with any value before the second last line which try to remove the duplicates (using execute result.duplicates.remove**** ). In my opinion, even before this,second last, statement is executed the value of "result" is already blank.
Further instead of calling "remove" method of duplicate collection you have to prepare a collection of duplicate records found using "add" method, something like:
resultEntry.BusinessPartnerUUID.content
resultEntry.SimilarityPercent = "90.85";
result.Duplicates.Add(resultEntry);
I would strongly suggest checking the Badi documentation in Repository Explorer where they explained the same via sample code:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Yes. SAP does provide a standard action CheckForDuplicates which is PSM released as part of Customer BO. This action can be used to find potential duplicates with their similarity percent.
I used this action(CheckForDuplicates) as part of BeforeSave script to fill a custom field + logic. However, in my opinion, this should NOT be used with the BADI you were implementing since it might generate an endless loop, but validate it your self.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.