Skip to Content
0
Aug 11, 2016 at 10:42 AM

Item Master data - Change Log Query

2619 Views

Hi Experts,


We created a query for a client that shows Item Master Data Changes done in the system. However the Client wants to see the specific field that was changed for a specific item and also wants to see the old value and new value of this field. More or less similar to the change log - Show differences window that shows Changed Field, Previous Value and New Value.


Is it possible to get a query to display the three (3) extra columns?


Here's the Original Query we created.


SELECT T0.ItemCode, T0.ItemName, T1.ItmsGrpNam, T0.DfltWH, T0.UpdateDate, T0.AvgPrice, T0.FrozenFor as 'On Hold?', T0.Canceled, T2.U_NAME as 'Added By', T3.u_NAME AS 'Updated by', T0.logInstanc as 'No of Changes to date' FROM AITM T0

INNER JOIN OITB T1 ON T0.ItmsGrpCod = T1.ItmsGrpCod

LEFT JOIN OUSR T3 ON T0.UserSign2 = T3.USERid

INNER JOIN OUSR T2 ON T0.userSign = T2.userid WHERE T0.UpdateDate >=[%0] AND T0.UpdateDate <=[%1]

Reply will be highly appreciated. Thanks

Kind Regards,

Pascale.