cancel
Showing results for 
Search instead for 
Did you mean: 

Set BEx workbook variables using VBA (BI 7.X)

Former Member
0 Kudos

Hi gurus,

I want to set variable values in my workbook and refresh it using VBA. I am using this code:

Sub LoadData()

Sheets("Apkrovimai").Select

Run "BExAnalyzer.xla!SAPBEXsetVariables", Range("valRange")

Run "BExAnalyzer.xla!SAPBEXrefresh", True

End Sub

valRange range stucture:

ZCOMP_CODE_AUTH4600
ZSVM_FISCPER_EX003.2012

I tried this structure too:

    

ZCOMP_CODE_AUTH14600
ZSVM_FISCPER_EX1003.2012

Problem: Code just don't work no error no nothing.

Details: I tried debugging it: 

Run "BExAnalyzer.xla!SAPBEXsetVariables", Range("valRange")

goes to

         Function SAPBEXsetVariables(varValues As Range) As Integer

                    Call pAddin.SetVariables(varValues.Value2, varValues.Application.ActiveWorkbook.Name)

                End Function

and varValues.Value2 is with values:

               But this gives me no clue why variables is not set.

Can someone help me with this problem?

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Values should be place on one line.

No need for header.

Structure can be found in CustomXML part of the Excel file in under Excel 2010.

Answers (2)

Answers (2)

Former Member
0 Kudos

Question is dublicated: http://scn.sap.com/thread/3347923

Former Member
0 Kudos

Hi Sarunas,

I am fairly new to BEX and struggling to find a solution to this same issue. Did you come up with a solution or are you using the Button workaround? I'm trying to avoid going that direction in favor of a simpler routine.