cancel
Showing results for 
Search instead for 
Did you mean: 

Query to find the Changes made in PO

Former Member
0 Kudos

I want to Create a report of the changes made in PO.Tried using the ADOC and ADO1 table.But not able to get the link.Kindly Suggest

Accepted Solutions (1)

Accepted Solutions (1)

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Try this query for quantity field changes. same way you can create for other fields:

SELECT

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.[CardCode] BETWEEN 'V10000' AND 'V10000' AND T2.[DocStatus] = 'O' AND DateDiff(d,T2.UpdateDate,GETDATE()) <= 0

Note: Change vendor code in highlighted area.

Hope it will helpful.

Thanks & Regards,

Nagarajan

Former Member
0 Kudos

Thank You it works perfect.

I have created a PLD of the Same.I would to know if we can have the printout of the PLD taken out along with the PO and how ?

Thanks is advance.

Merle

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Yes possible by means of print sequence. Please follow below steps:

1. Administration--->Setup---> General--->Report and Layout Manager--->Choose purchase order

2. Choose print sequence tab

3. Add new print sequence for the PO. First assign your regular PLD and assign newly created PLD ( above PLD)

4. Open PO under Purchase A/P module.

5. File---->Print sequence

6. Both PLD can be previewed and printed

Note: If there is no changes in PO, i think it is not necessary print second PLD

Thanks & Regards,

Nagarajan

Former Member
0 Kudos

Dear Nagarajan,

The query that you have given works fine when there is a change in QTY and any other value at row Level.But what if they have added  NEW rows in the PO.

can that be fetched too ?

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Newly added row will not be reflected until changes in quantity field.

Thanks & Regards,

Nagarajan

Former Member
0 Kudos

Dear Nagarajan,

In the Default List i am not able to see my PLD created.

The Steps i used to Create PLD are as follows.

1) Saved the Above Query as abc in SAP under General Tab in Query Manager.

2) With the Help of Query Manager, clicked the Create Report Button and set the report as User System Report (Template).

Kindly Suggest

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Sorry. Please ignore above reply (print sequence). You have to print PO first and then QPLD.

Please follow steps:

1. Create QPLD using above query and save it under query manager.

2. After adding PO, print PO with default PLD

3.  To print QPLD, select query from query manager and choose preview from File--->Preview

Thanks & Regards,

Nagarajan

Former Member
0 Kudos

Dear Nagarajan,

This query worked fine.But i would like to know how much time this ado1 or adoc table table to update.

As i found that from SAP when i check the change log there are 11 instances on change log.

But when i check the adoc table it has only 10 instance of change log.

Kindly suggest.

Thanks,

Merle

Answers (0)