SAP Knowledge Base Article - Public

2577920 - API SAPExecutePlanningSequence is not supported within API AfterRedisplay

Symptom

'Call Application.Run("SAPExecutePlanningSequence","XXX")' in Callback_AfterRedisplay does not work.

Environment

SAP Analysis for Microsoft Office

Reproducing the Issue

Execute API SAPExecutePlanningSequence in API AfterRedisplay.

For example:

Public Sub Callback_AfterRedisplay()

    Dim IResult As_Long
    IResult = Application.Run("SAPExecutePlanningSequence","PS_1")

End Sub

Cause

The usage of the command SAPExecutePlanningSequence (as well as most other commands) inside the AfterRedisplay callback is blocked by Analysis Office.

The return value of the VBA command is 0 and Application.Run("SAPGetProperty", "LastError") (see section "Using LastError information" in the documentation) will return 13 - "A callback is running.".

The reason is that the execution of the planning sequence will again trigger a redisplay which will again run the AfterRedisplay callback and result in an endless loop.

Resolution

API SAPExecutePlanningSequence is not supported within API AfterRedisplay

See Also

3096766 - Command inside a callback is not working in Analysis Office

Keywords

SAPExecutePlanningSequence, API, AfterRedisplay, Callback_AfterRedisplay , KBA , BI-RA-AO-XLA , Excel Addin , How To

Product

SAP Analysis for Microsoft Office 2.6 ; SAP Analysis for Microsoft Office 2.7 ; SAP Analysis for Microsoft Office 2.8 ; SAP BusinessObjects Analysis 2.0, edition for Microsoft Office ; SAP BusinessObjects Analysis 2.1, edition for Microsoft Office ; SAP BusinessObjects Analysis 2.2, edition for Microsoft Office ; SAP BusinessObjects Analysis 2.3, edition for Microsoft Office ; SAP BusinessObjects Analysis 2.4, edition for Microsoft Office ; SAP BusinessObjects Analysis for Microsoft Office 2.5