on 05-11-2012 3:48 PM
Dear Experts,
I have made a simple purchasing report.
SELECT T0.[CardCode] as 'Vendor No.', T0.[CardName] as 'Vendor Name', T2.[SlpName] as 'Buyer',
T0.[DocNum] as 'PO No.', T1.[LineNum] as 'Line No.', T1.[ItemCode], T1.[U_Quote] as 'Purchase Item Description',
T1.[Quantity] as 'Qty Ordered', T1.[OpenQty] as 'Open Qty', T1.[Price] as 'Unit Price', T0.[DocDate] as 'Document Date',T0.[DocDueDate] as 'Receiving Date', T1.[U_Ship_Date] as 'Ship Date' FROM OPOR T0 INNER JOIN POR1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OSLP T2 ON T0.SlpCode = T2.SlpCode WHERE T0.[DocStatus] = 'O' GROUP BY T0.[CardCode], T0.[CardName], T2.[SlpName], T0.[DocNum], T1.[LineNum], T1.[ItemCode], T1.[Dscription], T1.[U_Quote], T1.[Quantity], T1.[OpenQty], T1.[Price], T0.[DocDate],
T0.[DocDueDate],T1.[U_Ship_Date] ORDER BY T0.[CardName], T1.[U_Quote]
I have even included line number but what exactly it is picking up m not getting.
I thought logicaly what it should pick up it if there are 3 items in one purchase order than it will/should show line num
0,1,2 but it is not.
My concern is what exactly is line num for?
Thanks-
Mona.
Hi Mona,
Linenum in POR1 is like serieal no.it always in order if it is not means user may deleted the particular line and reenter the details.
In your query no need for group by function.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Checked it. Seems to work fine.
Check with only only docentry in the WHERE clause to confirm the working for the linenum.
Kind Regards,
Jitin
SAP Business One Forum Team
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.