
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:
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.
Enter the technical name of the dimension.
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.
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.
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.