Forum Navigation
You need to log in to create posts and topics.

Query - Batch Number Transaction Report

This nifty little report lists all transactions related to each Batch in SAP Business One. If you really want to make this report look awesome, create a SQL Report Type Universal Function with the B1Usability Package. Otherwise, simply paste this code into the Query Generator and off you go!

SELECT
T0."BatchNum",
T0."ItemCode",
T0."Quantity",
T0."DocDate",
T0."CardName",
CASE
WHEN T0."BaseType" = 59 THEN 'Goods Receipt'
WHEN T0."BaseType" = 15 THEN 'Sales Delivery'
WHEN T0."BaseType" = 13 THEN 'AR Invoice'
WHEN T0."BaseType" = 60 THEN 'Goods Issue'
WHEN T0."BaseType" = 56 THEN 'Goods Receipt'
WHEN T0."BaseType" = 20 THEN 'Goods Receipt PO'
WHEN T0."BaseType" = 17 THEN 'Sales Allocation'
WHEN T0."BaseType" = 18 THEN 'AP Invoice'
ELSE 'Unknown'
END AS "Generated By",
T0."BaseNum" "Doc ID"
FROM IBT1 T0 ORDER BY T0."BatchNum", T0."DocDate"