Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata

SAP BO BI Platform

You have multiple queries embedded and by using a simple macro enabled button you can refresh the queries independently for each work sheet.

Steps to do it

  1. Insert a Button from the Developer Tab to your work sheet.
  2. Right Click on that “button” and click “Assign Macro”.
  3. Create a “New Macro” and it will open VB editor*.*
  4. Type the following code

Dim click As Long

click= Application. Run("SAPExecuteCommand", "Refresh", "DataSource1")

                Here

SAP Execute Command is an API method.

Refresh is the Command

DataSource1 is the “formula alias” name for the cross tab and it can be found the Components tab in the Analysis Panel.

      5.Save the macro and the workbook .

     6. Open the workbook and test your macro.

You can use a SAPAddmessage  API  also along with this so that you get a message whenever you refresh the query . To refresh the entire workbook – Delete the *“formula alias “*segment in the code.

  • No labels