cancel
Showing results for 
Search instead for 
Did you mean: 

How to initially display 'query prompt' instead of 'workbook prompt' when AO workbook is opened?

domid2018
Explorer
0 Kudos
1,451

I have only one BW query in my Analysis for Office workbook. When I open the workbook, the 'workbook prompt' instead of the 'query prompt' is displayed initially. Actually, I need the 'query prompt' opened initially so that I can select one of my BW query variants. How to set the 'query prompt' as the initial prompt in the workbook? (I do not have merged my variables in the workbook. I also do not want to use the workaround 'click on crosstab in workbook' > 'Analysis' ribbon > open 'prompt for datasource')

Accepted Solutions (1)

Accepted Solutions (1)

domid2018
Explorer
0 Kudos

Another solution would be: Setting the analysis parameter 'ShowDSVariantsForWorkbooksWithOneDS to true. As a consequence, the prompting dialog is opened in data source mode instead of document mode.

Answers (1)

Answers (1)

domid2018
Explorer
0 Kudos

The following solution worked for me:

Unselect the properties 'Refresh Workbook on Opening' and 'Force Prompt for Initial Refresh' in the workbook properties and implement the following code for the specific data source 'DS_1':

Public Sub Workbook_SAP_Initialize()

Dim As lre_refresh As Long
Dim As lre_prompt As Long

lre_refresh = Application.Run("SAPExecuteCommand", "Refresh", "DS_1")

'The following code line is only required if there are no mandatory variables in the prompt
lre_prompt = Application.Run("SAPExecuteCommand", "ShowPrompts", "DS_1")

End Sub