cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to activate BEx-conditions per VBA script / macro

pvschu
Explorer
0 Likes
1,845

Dear guys,

I would like to add a button in the workbook to activate the BEx-condition. I did record the macro but it does not work. Not knowing the syntax of the VBA-script to activate BEx-conditions. Problem is that due to customer specific UI all standard menu entries will be hided. So there is no chance to use "Filter..." out of the standard menu.

The BEx condition for itself works fine. But how could I add an on/off button - as it was possible in former BEx-Analyzer version (we use AfO 2.8 actually).

Thanks for your help.

Regards,

Peter

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Likes

Step 1: Create the condition in the BEx Query

Step 2:

Use the BEx Query as a data source in Analysis Office

Use the Filter Menu as shown below

mynynachau
Community Manager
Community Manager
0 Likes

Thank you for visiting SAP Community providing answers to questions. Since you're new I recommend reading our rules of engagement: https://community.sap.com/resources/rules-of-engagement I have removed a link in your answer.

Finally, if you're hoping to connect with readers, please consider adding a picture to your profile. Here's how you do it: https://www.youtube.com/watch?v=F5JdUbyjfMA&list=PLpQebylHrdh5s3gwy-h6RtymfDpoz3vDS . By personalizing your profile with a photo of you, you encourage readers to respond.

Best regards

Mynyna

SAP Community moderator

former_member186338
Active Contributor
0 Likes

Use "Insert Image" button to add screenshot!

pvschu
Explorer
0 Likes

Hi Maria, thanks for your reply. Don´t see the mentioned "Filter Menu as shown below". Did you forget to add a screenshot? Regards, Peter

former_member186338
Active Contributor
0 Likes

"I did record the macro but it does not work." - forget about the idea to use macro recording!

Read about VBA API:

https://help.sap.com/viewer/ca9c58444d64420d99d6c136a3207632/2.8.4.0/en-US/f270fd456c9b1014bf2c9a7eb...

pvschu
Explorer
0 Likes

Dear Vadim, thanks for your reply and the link. I checked it but miss a description of using BEx-conditions defined in the query. Or could that be done in a different way - not using standard context menu of a cell (as the custom UI hides these entries)? Regards, Peter

former_member186338
Active Contributor
0 Likes

pvschu

Can you provide some screenshots?

pvschu
Explorer
0 Likes

Hi Vadim, here is a screenshot where you can see an active BEx-condition out of the query. I would like to do the activation/deactivation of the BEx condition via a VBA makro. I checked the VBA API but did not find any hint how to do that. There seems to be no program name for that.

Regards,

Peter

former_member186338
Active Contributor
0 Likes

pvschu

Look on your post result:

"here is a screenshot" - no screenshot!

Use "Insert Image" button to add screenshot

pvschu
Explorer
0 Likes

Hi Vadim, now you should see it. Regards, Peter

former_member186338
Active Contributor
0 Likes

pvschu

Now it's more or less clear (in future use English version of products for screenshots)

In theory it's related to VBA SAPSetFilter, but I don't know the proper syntax. It's better to call SAP Support.