cancel
Showing results for 
Search instead for 
Did you mean: 

Sales order Change log

former_member186803
Participant
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

kothandaraman_nagarajan
Active Contributor
0 Kudos

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

Answers (1)

Answers (1)

former_member186712
Active Contributor
0 Kudos

Hi Suman,

In the Adoc you have the Usersign and Usersign2.

The usersign2 is the update user.

Hope it helps

former_member186803
Participant
0 Kudos

Hi Silva,

Sorry, there is no user sign2 in ADOC table.

Thanks

former_member186712
Active Contributor
0 Kudos

Hi Suman,

Please run this query:

SELECT T0.[DocNum], T0.[UserSign], T0.[UserSign2] FROM ADOC T0

Has you can see it exists.

What is your SAP version and PL?

Regards

former_member186803
Participant
0 Kudos

Hi Silva,

My SAP version is 8.82 pl 01

The column usersign2 is not showing in table but the query runs.

Great, it helped .

Thanks a ton.

Suman

former_member186712
Active Contributor
0 Kudos

Happy to help

Don't forget to close the thread and if you wish mark the answer as helpul or correct answer.

former_member186803
Participant
0 Kudos

Some S/O is updated but still usersign2 does not show the updating user's name it is still showing the created by user name in usersign2 column. dont know why.

Thanks

former_member186712
Active Contributor
0 Kudos

Hi,

As far as I understood after some test, you have to see the info in the ADOC plus the inform in the ORDR (Sales Order)

All the changes are in the Addoc and the last change is in the ORDR.

Hope it helps