cancel
Showing results for 
Search instead for 
Did you mean: 

BI 7.10: Using SAPBExRefresh in workbook

Former Member
0 Kudos

Hello,

we like to extend a workbook with VB code. That means users shouldn't use BEx menu bar to refresh the workbook. they should get a button in the workbook, which starts function SAPBExRefresh. The workbook is created with BI 7.10. If we execute workbook with BEx Analyzer BW 3.5, function refresh works fine and variable screen will open. If we execute workbook with BEx Analyzer BI 7.10, function "refresh" doesn't work correctly and no variable screen will open. Does someone know what the problem could be? Are there any selection to do in the query/workbook?

Many thanks for your help.

Regards

Friedrich

Accepted Solutions (1)

Accepted Solutions (1)

former_member213233
Participant
0 Kudos

Hi Friedrich,

Function "refresh" doesn't work correctly in BI 7 version, instead you try with the "Change Variable" funtion, it works.

regards

Dev

Former Member
0 Kudos

Hello Dev,

thanks for your rapid response. Do you have also the technical name of 'Change Variable' function, like SAPBEx....?

Many thanks in advance.

Regards

Friedrich

former_member213233
Participant
0 Kudos

Hi,

Please DO NOT click referesh button while executing the report. because when we click some times hunged into out of memory state and you will not get any input screen.

Plese DO Click on the u201C Change Variable buttonu201D from menu buttons to provide your input values.

Dev

Former Member
0 Kudos

Hello Dev,

we don't like to use the buttons in menu bar. We like to use our own buttons, which we are created with VB code. This VB code should contain a function to refresh the workbook resp. open variable screen.

Regards

Friedrich

Former Member
0 Kudos

Sorry to be refreshing this old thread, but I am looking for a solution to the same problem.

Can I use SAPBEXrefresh procedure in 7.0? It doesn't seem to be doing anything, although it seems like this API is still supported - it says in the description of the SAPBEXrefresh function:

'In the 7.0 Analyzer, ALL the items in the workbook can be refreshed, but refreshing

'a query individually is not supported.

Is there any SAP documentation desciribing differences between 3.5 and 7.0 from the VBA angle?

Former Member
0 Kudos

Seems as if I managed to find a solution to my problem. It seems that the Refresh button doesn't call the variables box anymore in 7.0 , that's why it doesn't seem to be doing anything (it reuses saved variables, right?). Instead, one needs to use Change Variables to be able to get to the variables box.

So, in order to refresh all queries (with an option to enter variables) I used the following code:

Sub RunReportButton()

Dim ReturnCode As Integer

ReturnCode = Run("BExAnalyzer.xla!MenuRefreshVariables")

End Sub

Former Member
0 Kudos

In order to run the VBA in SAPBEXOnRefresh I had to change 2 things:

- In BEXInterfaceModule change the code to:

Public Function BEx() As Object

Set BEx = Application.Run("BExAnalyzer.xla!GetBEx", ThisWorkbook)

End Function

- second: go to TOOLS --> References anda check out the "SAP BEX Analyser API"

Your VBA code should work fine now.

0 Kudos

Hi Jorge,

I dont see "BEXInterfaceModule" under the VBAProject(Book1.xls). Do i need to do any other changes to make this module visible?

Lohith

Answers (0)