Hello Expert,
I had created procedure and run it in SAP B1 through Crystal Report.In this procedure I have applied the condition null for the parameter @docnum.But when I try to run the report it displaying the message that the parameter field is mandatory.Please suggest some solution for it.
Also I want to populate the list of all the Baseref from SAP B1 in the parameter field @Docnum while running the crystal report.
My Procedure is given below....
SELECT @DOCNUM as DOCNUM ,T1.[BaseRef],T0.[DocNum], T0.[DocDate],T0.[cardname],T0.[U_VehcleNo],
T0.[U_DvrName], T1.[Dscription],T1.[Quantity],T1.[unitMsr], T2.[BatchNum], T2.[Quantity],
T1.[WhsCode] FROM Odln T0 INNER JOIN dln1 T1 ON
T0.DocEntry = T1.DocEntry, IBT1 T2 WHERE T2.[BaseEntry] = T0.[DocNum]
AND T2.[ItemCode] = T1.[ItemCode] AND
t0.datasource <>'N' and T1.[BaseRef] = case when @DOCNUM = '' or @DOCNUM is null
then T1.[BaseRef] else @DOCNUM end
regards,
PankajK
IDM Services Ltd.
Nigeria