on 09-25-2014 10:17 AM
Hi All,
In one sales order change log there are 4 records, means 4 instances, it means the S/O has been updated 3 times after generation.
In the change log window for the 1st instance, updated by and created by is showing same user name where as for the 2,3, and 4th instance shows created by and updated by is different user, means S/O is updated by a different user , but in the ADOC table for all the 3 records it is showing the user sign is same and it is the user name who created the S/O, How can I get the user name for the instances 2,3,4, from which table?
Your assistance is appreciated.
Rgds
Suman
Hi,
Try this query for quantity change log. Let me know your feedback.
ELECT
T2.DocNum,T2.[DocStatus], T2.[CardName],T2.[NumAtCard], T1.LineNum+1 as 'Line', 'Qty' as 'Field',
cast(T1.Quantity as varchar(18)) as 'OldValue', cast(T0.Quantity as varchar(18)) as 'NewValue', T2.UpdateDate, T4.[U_Name] as 'UpdatedBy', T2.[DocTime]
FROM
adoc T2
JOIN ado1 T1 ON T2.docentry = T1.docentry AND T2.Objtype = T1.Objtype and T1.Loginstanc = T2.LogInstanc-1
JOIN ado1 T0 ON T2.docentry = T0.docentry AND T2.Objtype = T0.Objtype AND T1.LineNum = T0.LineNum
INNER JOIN OUSR T4 ON T2.UserSign2 = T4.INTERNAL_K
AND T0.LogInstanc = T2.Loginstanc
WHERE
T0.Quantity<>T1.Quantity AND T2.[DocStatus] = 'O'
Thanks & Regards,
Nagarajan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suman,
In the Adoc you have the Usersign and Usersign2.
The usersign2 is the update user.
Hope it helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
107 | |
12 | |
10 | |
5 | |
5 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.