cancel
Showing results for 
Search instead for 
Did you mean: 

Batch Report

bcini
Explorer
0 Kudos

Guys,

I need some help in creating a batch report that shows the Batch No, GRN No, PO No, SO No, AP INV No, AR INV No, Purchase Price, Sales Price, Item Description, Item Code and Client Name.

So far I manage to get the Batch No, GRN No and AP INV No.

SELECT DISTINCT

T0.DocEntry AS OITLEntry, T0.DocNum AS OITLNum, T0.CardCode, T0.DocDate AS OITLDate, T0.DocLine AS OITLLineRef, T0.ItemCode, T0.ItemName, T6.MnfSerial,

T0.DocQty AS OITLQty, T2.DocEntry AS GRFEntry, T2.DocNum AS GRFNum, T4.DocEntry AS APInvEntry, T4.DocNum AS APInvNum

FROM 

OITL AS T0 INNER JOIN

ITL1 AS t5 ON T0.LogEntry = t5.LogEntry INNER JOIN

OBTN AS T6 ON t5.SysNumber = T6.SysNumber AND t5.ItemCode = T6.ItemCode INNER JOIN

PDN1 AS T1 ON T0.DocEntry = T1.DocEntry AND T0.DocLine = T1.LineNum INNER JOIN

OPDN AS T2 ON T1.DocEntry = T2.DocEntry LEFT OUTER JOIN

PCH1 AS T3 ON T3.BaseEntry = T1.DocEntry AND T3.BaseLine = T1.LineNum LEFT OUTER JOIN

OPCH AS T4 ON T3.DocEntry = T4.DocEntry

Order by t4.DocNum

Feel free to send your suggestions.

Many Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

The balance query is based on your process flow.

Are you creating PO directly from SO through procurement confirmation?

Thanks & Regards,

Nagarajan

bcini
Explorer
0 Kudos

Hi Naja,

Thanks for reply.

The PO's are not being generated from the SO procurement confirmation.

Thanks