the general syntax for creating SAP Business One tokens is:
<Parameter Name>@SELECT … FROM … WHERE …
The
<Parameter Name>
is the name of the parameter that you want to create. The
SELECT
command is not always mandatory for SAP Business One tables. For example,
SELECT
is not mandatory for the
OCRD (business partners) and OACT (G/L accounts) tables. For an example where SELECT is not used, see Business Partner Selection Criteria.
The FROM clause specifies the table that the token will be based on. The WHERE clause specifies the filter criteria for the token.
Here are some examples of SAP Business One tokens :
* Country@SELECT distinct Country FROM OCST
* State@SELECT code, name FROM OCST WHERE (Country = '@Country')
* DocKey@
The
Country@SELECT distinct Country FROM OCST
token will create a parameter that lists all of the countries in the OCST table. The
State@SELECT
code, name FROM OCST WHERE (Country = '@Country')** token will create a
parameter that lists the states for the country that is selected in the
Country parameter. TheDocKey@`
token is a special token that is used to identify the current active document.