PT Sterling Tulus Cemerlang
www.sterling-team.com

Whatsapp
+62-877-8655-5055

Email
sales-enquiry@sterling-team.com

Address
Sampoerna Strategic Square
South Tower Level 30
Jl Jend. Sudirman No. 45-46
Jakarta 12930 – Indonesia

500+ FREE Tips SAP Business One for you to Become SAP B1 Super User from Sterling Tulus Cemerlang (STEM)

How to Use Custom Parameter on Query Manager

SAP Business One Tips Custom Parameter on Query Manager

With Query Manager on SAP Business One, not just a select syntax, you can also use a selection criteria, and added to your custom query. Here is a simple query sample with a date criteria parameter.

With a [Date From] – [Date To] on OINV Table

declare @FromDate date
declare @ToDate date

set @FromDate = ‘2019-01-01’
set @ToDate  =’2019-01-31’

SELECT * FROM OINV
WHERE DocDate >= @FromDate
AND DocDate <= @ToDate

So, you need to change that query, to be like query below:

/*SELECT * FROM OINV TO*/

declare @FromDate date
declare @ToDate date

/* WHERE */

set @FromDate = /* T0.DocDate */‘[%0]’
set @ToDate =/* T0.DocDate */ ‘[%1]’

SELECT * FROM OINV
WHERE DocDate >= @FromDate
AND DocDate <= @ToDate

That’s it, you can try to use that basic composition for declare the variable and use selection criteria on your custom query on Query Manager feature.

Also read:

Run Your Business With The Piece of Mind Using SAP Business One

This article was written by PT. Sterling Tulus Cemerlang
More details about SAP Business One,
email to: sales-enquiry@sterling-team.com or call +6221-5806336 or wa +6287786555055

, , ,