Skip to Content
0
Former Member
Feb 24, 2012 at 08:30 AM

EH_ONSAVE or Badi Partner_update

162 Views

Hello experts.

I need you opinion about the place where a validation needs to be performed based on e-mail. The requirement is that on the creation of a contact person, a check is performed if the email address entered already exists in the system. Email address is our unique identifier of a contact person so duplicates are not allowed.

I wrote myself a custom funtion module in order to perform the check but the problem is that I do not know where to call it. I created a new implementation of badi PARTNER_UPDATE method CHENGE_BEFORE_UPDATE but I have problems preventing the system to save the contact person when a duplicte email address is found. Searching the internet I found that it is also possible to implement the code in the EH_ONSAVE event of the component. I looked for it in the component workbench but for component BP_CONT in view BPCONTOverview, there is already some code in the EH_ONSAVE event. When I redefine it, that code is gone. Could someone help me out here? I'm pretty new to CRM so a little help would be very nice.

Regards,

Tom