TIPS SAP Indonesia – Sometimes we need to know how many Delivery Order (DO) documents we have created in certain period and the details of those documents in SAP Business One.
Maybe the standard Delivery Order (DO) report does not satisfy you because of the information provided from SAP Busines One is not complete enough or maybe it doesn’t suite the information you need.
Below is one example of using a custom report query to show list of Header and Detail Delivery Order (DO) in SAP Business One, created in certain date period :
/* List DO Per Periode */
SELECT
CASE WHEN T1.[LineNum] = ” THEN T0.[DocNum] ELSE NULL END DO_Number,
CASE WHEN T1.[LineNum] = ” THEN T0.[DocDate] ELSE NULL END DO_Date,
CASE WHEN T1.[LineNum] = ” THEN T0.[CardCode] ELSE NULL END Customer_Code,
CASE WHEN T1.[LineNum] = ” THEN T0.[CardName] ELSE NULL END Customer_Name,
CASE WHEN T1.[LineNum] = ” THEN 1 ELSE T1.[LineNum]+1 END LINE_NO,
T1.[ItemCode],
T1.[Dscription],
T1.[Quantity],
T1.[Price],
T1.[Currency],
T1.[Rate],
T1.[DiscPrcnt],
T1.[LineTotal]
FROM ODLN T0
INNER JOIN DLN1 T1
ON T0.[DocEntry] = T1.[DocEntry]
AND T0.[DocDate] >= [%0]
AND T0.[DocDate] <= [%1]
ORDER BY T0.[DocNum], T1.[LineNum]
When we execute the query, SAP Business One will ask for period of DO date that we want to retrieve
And when we click the “OK” button, SAP Business One will execute the query and show the result as below :
You can see other tips related with query manager in SAP Business One in the link below :
- How to Use Custom Parameter on Query Manager
https://www.sap-business-one-tips.com/how-to-use-custom-parameter-on-query-manager/ - Easier Way to Search Query on Query Manager
https://www.sap-business-one-tips.com/easier-way-to-search-query-on-query-manager/ - How to Display Total for a Column in SAP Business One Query Manager
https://www.sap-business-one-tips.com/how-to-display-total-for-a-column-in-sap-business-one-query-manager/