Start of Content Area

Object documentation Button  Locate the document in its SAP Library structure

Definition

The Button design item enables you to execute a customized command against the query results.

Use

Use the Button design item to customize a specific command or sequence of commands. In the syntax, based on the Web API Reference, all data provider-specific commands and parameters are accepted, except functions to export to Microsoft Excel.

Using a button, you can customize any steps you take when you manually navigate a query using the context menu. When you choose the button, you execute the command or commands and the query results are updated accordingly in the analysis grid.

Structure

Configure properties for the button using the Properties of Button dialog box. (For information about inserting the button and accessing its properties, see Inserting Design Items.)

Caution

To add a button to the workbook, you must enable Microsoft Excel’s Trust access to visual basic project setting (in Tools  ® Macro  ® Security  ® Trusted Sources). If you omit this step, an Access to Visual Basic project failed error is displayed when you attempt to insert the button.

Button Properties

Property

Description

Button Name

Displays the name of the button, which is generated automatically and is unique. This name is used in the BEx Analyzer  ® Design Toolbar menu to refer to a particular instance of the button.

Range

Manipulate coordinates for a cell or cells in this field to move or resize the button.

See Moving and Resizing Design Items.

Button Text

The text (caption) you want to display on the button. You can use this to describe the command the button executes.

Command Range

(Optional) Specify a three-column range of cells in the worksheet that contains the command parameters. In these cells, you provide the same parameters (Name, Index, and Value) as you do for Static Parameters (see below). But in the worksheet these can be variable; they can change during navigation based on query results or on a value you manually specify. 

When the button is chosen to initiate the command, all values in Static Parameters are evaluated first. Then all the parameters in the Command Range are appended.

Static Parameters

Configure the command or commands to execute by supplying name-value pairs to send to the server. A command can consist of multiple name-value pairs; configure one for each row in this table. Any data provider-specific command in the Web API Reference (except functions to export to Microsoft Excel) is accepted. 

      Name: The name of the command.

      Index: The sequence in which the command is to be executed. The start command begins with 0. You can configure as many commands as you want.

      Value: The value for the command.

 

Example

        Example: You want to create a button that removes the currently configured filter. Enter Remove Filter in the Button Text field and configure the following three rows in the Static Parameters section.

        Name = DATA_PROVIDER; Index = 0; Value = [name of data provider]

        Name = CMD, Index = 0; Value=REMOVE_FILTER

        Name = FILTER_IOBJNM, Index = 0; Value = [name of dimension]

        If you want to filter by product, but specify which product while you are navigating in analysis mode, use the Command Range field to specify the three-column range in the worksheet in which to look for the parameters. For example, you could configure it in the worksheet as follows:

 

Column E

Column F

Column G

Column H

 

 

 

Filter to the following product:

Row 8

FILTER_VALUE

0

PROD0001

 

Set Command Range to F8:H8. You can now provide dynamic input for the value in column H, labeled Filter to following product: in the worksheet. You can also hide columns F and G so that the static parameters of the command remain hidden.

        Buttons can be useful within the context of planning functions, which are not executed in the context of a data provider, but within a workbook. For example, in a re-evaluation scenario, you have created a planning function on the back end in which you get a raise and make your calculations increase by 1%. You can add a button to the worksheet to execute this planning function.

Although planning functions are modeled on the back end, they can have variables – which you can also supply in the worksheet using the Command Range field. 

See also:

      Inserting Design Items

      Creating Planning Applications in the BEx Analyzer 

      Functions for Manual Planning

 

End of Content Area