cancel
Showing results for 
Search instead for 
Did you mean: 

Adding values into Variable screen of Bex Analyzer

Former Member
0 Kudos

Hi,

I am automating Opening a report through Bex analyzer using VBA macro.

I am facing issues while adding some values in the variable screen. In some blogs i had seen that this can be achieved by creating some range in the excel sheet

and calling this range through Bex built-in functions. Tried this approach but not able to as i am not aware of how to create a range.

Request you to let me know if any anyone has used VBA to add values in variable screen.

Thanks,

Farnaz

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Suman,

Thanks for the answer but my query was adding values in Variable screen of bex analyzer not saving a macro.

Regards,

Farnaz

former_member182470
Active Contributor
0 Kudos

Try this:-----

Former Member
0 Kudos

Hi Suman,

Sorry this doesn't help me... anyways thanks a lot

Regards,

Farnaz

Former Member
0 Kudos

Hi Farnaz,

Did you find a solution? I have the same problem.

Tom

Former Member
0 Kudos

Hi Tom,

Yes, was able to automate this scenario to some extent using SAP Bex built-in function

"SAPBEXsetFilterValue" and Excel macro. Let me know if any info on this is required.

Regards,

Farnaz

Former Member
0 Kudos

Hi Farnaz,

Thanks for letting me know. Could you give me more info, perhaps an example?

I've tried using "SAPBEXsetFilterValue" before but didn't manage to actually get the filter values to change. I think because I wasn't using it right and can't find much info on it.

Thanks,

Tom

Former Member
0 Kudos

Hi Tom,

Assuming you are aware of connecting to the Bex Report using Excel macro below are the Steps for adding value in the filter section of the report for "Business Unit" field.

Here strReportName is the variable name of Bex Report being launched.

Set rFnd = Selection.Find(What:="Business Unit", After:=ActiveCell, LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False)

Set ORange = Workbooks(strReportName & ".xls").Worksheets("Sheet1").Range("D" & CInt(rFnd.Row))

BExAnalyzer.SAPBEXsetFilterValue “MH000001” "0HIER_NODE", Orange

SAPBEXsetFilterValue syntax :

  • First Argument – the value to be entered in the Business unit field or technical name of node
  • Second Argument – Object name. Can get from Table /BIC/HZMB_PROF
  • Third Argument - corresponding worksheet cell for the info object

Hope this is helpfull.

Regards,

Farnaz

former_member199935
Participant
0 Kudos

Hi Farnaz,

Can you share your entire code showing how to connect to BEx report using excel macro? I'm trying to convert my 3.x BEx workbook with macros to 7.4 BEx workbook but unable to get macros work even for BEx refresh. I'm specifically looking for how to connect to 7.4 BEx workbook via excel macro for refresh and setting variables. Any help is greatly appreciated.

former_member182470
Active Contributor
0 Kudos
RamanKorrapati
Active Contributor
0 Kudos
Former Member
0 Kudos

Hi Chowthary,

Thanks for the information. The links shared by you are for BEX 3.5. Current version used in  my project is 7.2. Request you to let me know how to proceed with this.

Any idea on how to create a variant would be very helpful.

Thanks,

Farnaz