Category: SAP Business One Reports

SAP Business One SQL Prompt Variables /* SELECT FROM [dbo].[OSLP] T1 */ declare @slpName as varchar(155) /*WHERE*/ set @SlpName = /* T1.SlpName */ ‘[%0]’ /* SELECT FROM [dbo].[OCRD] T2 */ declare @CardCode as varchar(15) /* WHERE */ set @CardCode = /* T2.CardCode */ ‘[%1]’  …

An SAP Business One Stock Report with All Items The following stock report will display all Items with or without quantities in Stock.   select t0.ItemCode, t1.ItemName, isnull(t3.OnHandQty,0) as ‘In Stock’, t2.BinCode, t2.SL1Code, t2.SL2Code from OITW T0 inner join OITM t1 on t0.ItemCode = t1.ItemCode…

Shared by Owen SlaterĀ on the SCN SAP Business One SQL Batch or Serial Number Quantities in a specific Bin Location declare @WhsCode nvarchar(9), @ItemCode nvarchar(21), @BinLocation nvarchar(228) set @WhsCode = ’01’ set @ItemCode = ‘B10000’ set @BinLocation = ’01-ABC’ select T0.BinAbs, T0.ItemCode, T2.onHandQty, T4.DistNumber, T4.MnfSerial,…

Using variables in SQL queries for SAP Business One is straight forward for simple select statements but what about the more complex variables or if you want to declare a variable for your SQL? Answer: You have to get a bit more creative! See the…

If you are interested in writing your own SQL queries for SAP Business One the following will assist you. Basics of SQL Writing for SAP Business One SQL query and related terms Before going into the details of SQL query, I would like to briefly…

Here are a few basic SQL queries to be used in SAP Business One. You can copy and paste the queries into the Query window of Business One. Simply copy between from “–begin…” to “…–end” and paste into your Query window. SQL for Open Sales…