Hey guys,
I'm currently facing an issue and would like to know if anyone has experience with that. We're building an Analysis Office workbook that makes use of BW Integrated Planning queries.
What we would like to achieve is that the query / data source is not input-ready on startup but can be made input-ready by clicking a button (using VBA API). Additionally a planning function must be executed to calculate some columns directly on startup
My problem is that any planning specific VBA command is ignored within the "Workbook_SAP_Initialize()" routine or a callback method that I register here. Additionally callback methods generally ignore planning specifics commands (even if executed by refreshing the data source).
Example:
Public Sub Workbook_SAP_Initialize()
Call Application.Run("SAPExecuteCommand", "RegisterCallback", "AfterRedisplay", "Callback_AfterRedisplay")
End Sub
Public Sub Callback_AfterRedisplay()
Dim lResult As Long
lResult = Application.Run("SAPExecutePlanningFunction", "PF_1")
lResult = Application.Run("SAPExecuteCommand", "PlanDataToDisplayMode")
End Sub
If setting a breakpoint, the commands are exectued but have no effect. When realizing the commands by using a button within the workbook everything works as expected.
Does anyone have an idea regarding my issue?
Thanks in advance!