Symptom
When execute API SapSetVariable in API AfterRedisplay, it always returns 0 - execution failed.
Environment
- SAP BusinessObjects Analysis 2.2, edition for Microsoft Office
- SAP BusinessObjects Analysis 2.3, edition for Microsoft Office
Reproducing the Issue
Execute API SapSetVariable in API AfterRedisplay.
For example:
Public Sub Callback_AfterRedisplay()
Dim lResult As Long
lResult=Application.Run("SAPSetVariable", "0BWVC_COUNTRY", "DE", "INPUT_STRING", "DS_1")
End Sub
Cause
SapSetVariable is not supported within AfterRedisplay, since setting a variable will trigger the AfterRedisplay itself. It will go into an endless loop after successful execution.
Resolution
Please do not use SapSetVariable in AfterRedisplay.
Below APIs are the same as SapSetVariable, please do not use them in AfterRedisplay.
- SAPSetFilter
- SAPMoveDimension
Keywords
SapSetVariable, AfterRedisplay, SAPSetFilter, SAPMoveDimension,return value, 0, execution failed , KBA , BI-RA-AO-XLA , Excel Addin , BI-RA-AO-PPA , Please use component BI-RA-AO-XLA , Problem