Hello All -
I am working in Embedded Planning and AO 2.2.
I have a requirement to run Planning Sequence after Running Variable Selection Screen e.g. 1) Variable Selection screen pop up, 2) Fill up the selection screen, 3) Execute, & report shows data, 4) Planning Sequence is executed automatically.
What I did is to:
1) To register BADI Callback "After Redisplay", and call Planning Sequence
Public Sub Workbook_SAP_Initialize()
' register callbacks
Call Application.Run("SAPExecuteCommand", "RegisterCallback", "AfterRedisplay", "Callback_AfterRedisplay")
End Sub
2) To call Planning Sequence
Public Sub Callback_AfterRedisplay()
Dim lResult As Long
lResult = Application.Run("SAPExecutePlanningSequence", "PS_1")
End Sub
However, this method never work successfully. Planning Sequence execution always fails.
I used Worksheet_activate. However, this event is not called after Report selection parameter get executed. It's only executed after we deliberately switch from other worksheet, to main worksheet.
I used Workbook_open event, and it cannot run Planning Sequence as well.
The questions:
1) Do you have any thought how we can execute Planning Sequence right after Report execution?
2) How we can make work to run planning sequence in the "After Redisplay" badi?
Kindly please ask your thought, and appreciate your feedback,
Many thanks,
Daniel N.