on 08-05-2020 12:34 AM
Can a query be made that would show all Open Orders and Rows based on a given/searchable date? For example, I want to see a list of all Open Sales Orders on Jan 1, 2020.
hi,
not sure which version you are using, but as of SAP Business One 10.0 you may generate easily the required list and many more reports using the Web Client. For further details check out this page:https://learnbusinessonewebclient.com/
regards,
Maya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How about this:
SELECT DISTINCT h.DocNum, h.CardCode, h.CardName, h.DocDate, h.DocDueDate, h.DocTotal
FROM ORDR h
INNER JOIN ADOC hi ON h.DocEntry = hi.DocEntry AND hi.ObjType = 17
WHERE hi.DocStatus = 'O' AND hi.DocDate BETWEEN [%0] AND [%1]
Regards,
Johan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi dustin.barnhart and ndpace,
The query shows a history entry of each order that was open at least once during the given time frame.
The dates however are from the current document status, and due to the use of DISTINCT, you only see one entry per order.
Please try this to see what I mean:
SELECT h.DocNum, h.CardCode, h.CardName, hi.LogInstanc as [Version], h.DocDate, hi.DocDueDate AS [Due date then], h.DocDueDate AS [Due date now], hi.DocTotal AS [Total then], h.DocTotal AS [Total now]
FROM ORDR h
INNER JOIN ADOC hi ON h.DocEntry = hi.DocEntry AND hi.ObjType = 17
WHERE hi.DocStatus = 'O' AND hi.DocDate BETWEEN [%0] AND [%1]
ORDER BY h.DocNum, [Version]
Regards,
Johan
Did you find a solution to this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This seems to meet my requirements:
SELECT T0.[DocNum], T0.[DocDate], T0.[UpdateDate] as [Closed Date], T0.[DocTotal] FROM ORDR T0 WHERE T0.[DocStatus] ='c' and T0.[DocDate] <=[%0] and T0.[UpdateDate] >[%0]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try this query,
SELECT T1.[DocEntry], T0.[DocNum], T0.[DocDate], T0.[CardName], T0.[NumAtCard], T1.[ItemCode], T1.[Dscription], T1.[Quantity] FROM ORDR T0 INNER JOIN RDR1 T1 ON T0.[DocEntry] = T1.[DocEntry] WHERE T0.[DocStatus] = 'O' and T0.[DocDate] between [%0] and [%1]
Regards,
Nagarajan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
100 | |
11 | |
11 | |
6 | |
6 | |
5 | |
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.