I am developing some custom dashboards and have come accross an issue where the data does not refresh correctly depending on the complexity of the query that it refreshes from.
The queries run within SAP Business One returning the expected results but then fail when being executed from the Dashboard(s). If I replace the query in SAP Business One with a very simple one the data refresh then works.
Is there any documentation around limitations or restrictions on what SQL is able to be used in queries that will be refreshed via the B1iF Xcelsius scenario?
The following is the error I receive when the SQL statement is too complex.
For example the following statements both provide the same data and run in SAP Business One but the first one runs in the Dashboard but the second does not...
SQL that Works:
SELECT TOP 10 T0 .ItmsGrpCod [Group Code], T0 .ItmsGrpNam [Group Name], ISNULL(SUM(ISNULL(T2.Quantity,0)),0) [MTD QTY] FROM OITB T0 INNER JOIN OITM T1 ON T1.ItmsGrpCod = T0.ItmsGrpCod INNER JOIN INV1 T2 ON T2.ItemCode = T1.ItemCode INNER JOIN OSLP T3 ON T3.SlpCode = T2.SlpCode AND T3.SlpName = 'Simon Pitt' INNER JOIN OFPR T4 ON T4.AbsEntry = T2.FinncPriod AND '20101130' BETWEEN T4.F_RefDate AND T4.T_RefDate GROUP BY T0 .ItmsGrpCod, T0 .ItmsGrpNam
SQL that does not work
SELECT TOP 10 T0.ItmsGrpCod [Group Code], T0.ItmsGrpNam [Group Name], ISNULL(SUM(ISNULL(T2.Quantity,0)),0) [MTD QTY] FROM OITB T0 INNER JOIN OITM T1 ON T1.ItmsGrpCod = T0.ItmsGrpCod INNER JOIN INV1 T2 ON T2.ItemCode = T1.ItemCode AND T2.FinncPriod = (SELECT S0.AbsEntry FROM OFPR S0 WHERE '20101130' BETWEEN S0.F_RefDate AND S0.T_RefDate) INNER JOIN OSLP T3 ON T3.SlpCode = T2.SlpCode AND T3.SlpName = 'Simon Pitt' WHERE ( T0.ItmsGrpNam IN ( 'DCO-COREPRO' ,'DCO-CORERETIP' ,'DCO-FLOOR' ,'DCO-HANDPRO' ,'DTR-CORETILE' ,'DTR-DRYCUT' ,'DTR-GRINDCUP' ,'DTR-HANDTRADE' ,'DTR-TILECUT') OR T0.ItmsGrpNam LIKE 'DFL-GRINDSHOE%' ) GROUP BY T0.ItmsGrpCod, T0.ItmsGrpNam
Regards,
Sean