Entering content frame

Background documentation Position of Columns Locate the document in its SAP Library structure

By default, all columns are arranged in the same order as the attributes in the context node of your application. You can change the sequence of the columns. You can do this in the following ways:

·        Change the position number

·        Fix the column

For information on the sequence of hierarchy columns, see Table as Hierarchy.

Changing the Position Number

Every column is automatically assigned the position number 0 initially. You can change the position of a column by changing this position number. The position number does not have to be unique.

Note

Columns with the position number 0 are always left-justified. This means that if you want to align a column to the left, you must give all other columns a higher position number the column in question.

You can also use negative numbers for position numbers. This means that you can give a single column an appropriate position number without changing the 0 of all the other columns.

To change the position number of a column, use the methods of the class CL_SALV_WD_COLUMN.

Methods for Changing the Position Number

Function

Method

Set position number

SET_POSITION

Get position number

GET_POSITION

Fixing a Column

You can fix columns. This has the following effects:

·        You move the column in question to the edge of the ALV output.

·        The column can then no longer be moved when scrolling sideways with the horizontal paginators.

When fixing a column, you specify whether the column is to be fixed to the left-hand side or the right-hand side. This allows you to generate up to three blocks of columns: The left-justified columns, the unfixed columns, and the right-justified columns.

You can also change the position number of a column to fix its position (see above). This allows you to arrange all columns in a block according to their position numbers.

To fix columns, use the methods of the class CL_SALV_WD_COLUMN.

Methods for Fixing Columns

Function

Method

Fix column

SET_FIXED_POSITION

Check whether a column is fixed and where it is fixed

GET_FIXED_POSITION

 

 

Leaving content frame