cancel
Showing results for 
Search instead for 
Did you mean: 

SAPBEXreadWorkbook release 3.5 to 7.0

Former Member
0 Kudos

Hi everybody

I am using some VBA to open a template with diagramm and graphics in Excel and I fill it with results of a workbook. In 3.5 everything was running nicely. In 7.0 there are/were some troubles.

<b>Old code:</b>

Const WBID_TEMPLATE As String = "CQ00SA3O0OIMA70BN1HOPO6A7"

Dim sWbTemplate As String

...

sWbTemplate = Run("SAPBEX.XLA!SAPBEXreadWorkbook", WBID_TEMPLATE)

...

this code is not working under 7.0 anymore. So after reading through SDN I took away the SAPBEX.XLA which is public now and does not need to be called anymore. This worked without error message but it also did not give any value back. sWBTemplate is always empty.

I solved the problem by adding a code line and reading the name of the active Workbook in the variable and this even works. But I still don't understand why I don't get a value back right away. Can somebody explain this behaviour to me?

<b>new code:</b>

Const WBID_TEMPLATE As String = "CQ00SA3O0OIMA70BN1HOPO6A7"

Dim sWbTemplate As String

...

sWbTemplate = Run("SAPBEXreadWorkbook", WBID_TEMPLATE)

sWBTemplate = ActiveWorkbook.Name

...

Any ideas, comments?

thanks!

christophe

View Entire Topic
klaus_buchner2
Explorer
0 Kudos

Do you still use the BEx-Analyzer for BW 3.X?

I guess you already use the new (BI 7.0) BEx Analyzer

SAP changed the Name of the BEx Excel Add-In. The new name is BExAnalyzer.xla

So the code to open a Workbook in BI 7.0 is like this:

a = Run("BExAnalyzer.xla!SetStart")

b = Run("BExAnalyzer.xla!runWorkbook", wbid)

the SAPBEX* Commands still seems work, but if you debug you'll find out that they will (should) post an error in the trace. Unfortunatelly you don't get a real error message!

If somebody has a hint where to find further documentation about the new BExAnalyzer.xla commands, please forward it to me!

Regards

Klaus