0

# Downpayment link with PO Urgent

Apr 25 at 11:13 AM

35

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

Nagarajan K Apr 25 at 02:04 PM
0

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

Share
Abdul Mannan Apr 25 at 12:37 PM
0

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.

Share
D R Apr 25 at 01:30 PM
0

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

Share
D R Apr 25 at 03:54 PM
0

Thanks you for your prompt response.

Will run the query & update you.

Show 1 Share

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