cancel
Showing results for 
Search instead for 
Did you mean: 

Downpayment link with PO Urgent

former_member557985
Participant
0 Kudos

Hi Experts,

Help me with solution for below,

We normally do a down payment to most of our suppliers /vendors based on the purchase order, How to link the P.O with that particular downpayment?

Need in query

Accepted Solutions (1)

Accepted Solutions (1)

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Run below query in query generator to get list of PO with linked Down payment Invoices.

SELECT T0.[DocNum], T0.[DocDate], T0.[CardName], T1.[ItemCode], T1.[Dscription], T1.[Quantity], T3.[DocNum], T3.[DocDate]

FROM

OPOR T0 INNER JOIN POR1 T1 ON T0.[DocEntry] = T1.[DocEntry]

LEFT JOIN DPO1 T2 on T2.[BaseEntry] = T1.Docentry and T2.[BaseLine] = T2.[LineNum] and T2.[BaseType] =22

INNER JOIN ODPO T3 ON T2.[DocEntry] = T3.[DocEntry]

WHERE T0.[DocDate] between [%0] and [%1]

Regards,

Nagarajan

Answers (3)

Answers (3)

former_member557985
Participant
0 Kudos

Thanks you for your prompt response.

Will run the query & update you.

Abdul
Active Contributor
0 Kudos

Hi try this one

SELECT t0.CardCode , T0.CardName,T0.DocTotal as "Po Total", T2.DocTotal As "Downpayment Amount" FROM [dbo].[OPOR] T0 inner join DPO1 T1 on T0.DocEntry = T1.Baseentry and T1.[BaseType] = T0.Objtype Inner Join ODPO T2 on T1.DocEntry = T2.DocEntry

former_member557985
Participant
0 Kudos

If possible can explain me with query bcoz I am new to SAP business one

Abdul
Active Contributor
0 Kudos

Hi,

In Downpayment Rows Table DPO1 there is field named ad Baseentry which will equal to DocEntry of Purchase order in your scenario and another field Basetype which will be equal to Objtype of Purchase order OPOR table.