Skip to Content
0
May 03, 2016 at 01:38 PM

Query to detect when a contact person email address is updated

55 Views

Hi

Further to above thread I am also trying to create a query to detect when a user has updated a contact person (OCPR table) with a new email address.

The objective of this query is to use it to trigger an Alert so that external correspondance email list can be updated accordingly (At the moment duplicates are being created when an email address is changed in SAP B1)

I think this is possible with table ACPR?

But I am finding this beyond my capability

This is where I have got to so far:

SELECT T0.E_MailL AS ‘Old email’, T1.E_MailL AS ‘New email’

FROM OCPR T0

INNER JOIN ACPR T1 ON T1.CntctCode = T0.CntctCode

WHERE T1.E_MailL <> T0.E_MailL

GROUP BY T0.E_MailL, T1.E_MailL

Any assistance would be appreciated

Regards

Karen