Defining Crystal Parameters
Defining Crystal parameters against UDF's and UDT's for SAP B1
Lets say you define a new User Defined field againts the Item Master table (OITM) for a Product Variant. We will call the UDF U_PRODVAR. Lets also link it to a table with the same name with two columns, code and name for the valid values.
When creating the crystal report, you want to be able to filter on items based on the variant defined above.
When creating the parameter the code should look something like this:
Variant@select distinct T1.Code, T1.Name
from OITM T0
inner join U_PRODVAR T1
on T0.U_PRODVAR = T1.Code
It is import to link the UDF to an SAP Table as well as reference the SAP table first in the join.
You can also use this logic for add on tables like Enprise Job Costing Tables.