Show TOC

SAPMoveDimensionLocate this document in the navigation structure

With this API method, you can define the position of a dimension in the crosstab, swap the dimension with another one or position a dimension relative to another one.

To call the method, use Application.Run and specify the following input parameters:

  • Data Source Alias

    Enter the formula alias for the data source. You can set the alias when configuring the data source on the Components tab in the design panel.

  • Dimension Key

    Enter the technical name of the dimension.

  • PositionBy
    Enter one of the following constants:
    • ROWS to move a dimension to the rows.
    • COLUMNS to move a dimension to the columns.
    • FILTER to move a dimension to the background filter.
    • AFTER to move a dimension after a relative dimension.
    • BEFORE to move a dimension before a relative dimension.
    • SWAP to swap a dimension with a relative dimension.
  • Identifier

    If PositionBy is set to AFTER, BEFORE or SWAP, enter the technical name of the relative dimension.

    If PositionBy is set to ROWS, COLUMNS or FILTER, enter the position as an index. The index is 1-based and optional. If the index is not valid, the command will not be executed. If no index is specified, the dimension is added at the end.

The system returns one of the following output parameters for each function execution:
  • 0 = execution failed.
  • 1 = execution successful.

Example

Dim lResult As Long

lResult= Application.Run("SAPMoveDimension", "DS_1", "0COUNTRY", "AFTER", "0CALMONTH" )

If you you execute this command, dimension 0COUNTRY will be inserted in the crosstab to the position after dimension 0CALMONTH.

Example

Dim lResult As Long

lResult= Application.Run("SAPMoveDimension", "DS_1", "0COUNTRY", "ROWS", "2")

If you execute this command, dimension 0COUNTRY is added as second entry to the rows in the crosstab.