Skip to Content
0

Query for Ship on Time in SAP B1

Dec 21, 2016 at 01:11 PM

74

avatar image
Former Member

I've been searching for a query that will return the on time shipments in SAP B1. I'm new to SAP and using 8.82. What I need is a query that will return data based upon date range of ordered created and order ship date. I need the output to be order number, date created, expected ship date, date shipped, warehouse code, line item, quantity ordered, quantity shipped, customer number, customer name.

I've seen multiple queries that come close, however most don't give me results that are useful for measuring the outbound performance.

10 |10000 characters needed characters left characters exceeded

Hi Stan,

Please always include the tag for the product (in case SAP Business One), otherwise you won't get much visibility in your question, since it is very specific to SAP BusinessOne.

I have added it as the primary tag. I hope this helps to have your question answered.

Thanks, Luis

1
Former Member
Luis Darui

Thanks Luis

0
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Nagarajan K Dec 31, 2016 at 04:47 AM
0

Hi,

Try this query:-

SELECT T0.[DocNum] 'SO #', T0.[DocDate] 'SO Posting Date', T1.[ShipDate] 'SO Line Item Due Date', T0.[DocDueDate] 'SO Due Date', T0.[CardName], T0.[NumAtCard], IsNull(T3.[DocDate],'') 'Del Date', DateDiff (dd, ISNULL(T1.ShipDate,T0.DocDueDate),T3.DocDate) 'Delay' FROM ORDR T0 INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry LEFT JOIN DLN1 T2 ON T0.DocEntry=T2.BaseEntry AND T1.LineNum=T2.BaseLine LEFT JOIN ODLN T3 ON T2.DocEntry = T3.DocEntry WHERE T0.DocDate>= [%0] and T0.DocDate<=[%1] and DateDiff (dd, ISNULL(T1.ShipDate,T0.DocDueDate),T3.DocDate) >0 Order By T0.[CardName] ASC

Regards,

Nagarajan

Share
10 |10000 characters needed characters left characters exceeded