Entering content frame

Background documentation Size of ALV Output, Columns, and Cells  Locate the document in its SAP Library structure

By default, the size of the ALV output, columns, and rows depends on their content. In other words:

·        A column is at least as wide as its widest cell.

·        The ALV output is at least as wide as all its columns together.

·        A row is at least as high as its highest cell.

You can easily increase the width of the ALV output and columns by specifying the required width. However, to reduce the size, you firstly have to fix the layout of the ALV output. This assigns the same width to all columns. You can then specify the required column width. You can make the following settings for the size of the individual areas:

·        Change width

·        Fix table layout

Note

You can only control the height of the rows by content (for example, by using a particular graphic size or several lines of text).

Changing the Width

To change the width of an area, use the methods of the classes of the respective areas.

Methods for Changing the Width

Function

Class

Method

Set width of ALV output

IF_SALV_WD_TABLE_SETTINGS

SET_WIDTH

Set width of column

CL_SALV_WD_COLUMN

Set width of cell

Only with the following cell editors:

SET_WIDTH or SET_WIDTH_FIELDNAME

Button

CL_SALV_WD_UIE_BUTTON

Dropdown list box

CL_SALV_WD_UIE_DROPDOWN_

BY_KEY

Image

CL_SALV_WD_UIE_IMAGE

InputField

CL_SALV_WD_UIE_INPUT_FIELD

ProgressIndicator

CL_SALV_WD_UIE_PROGR_

INDICATOR

Toggle Button

CL_SALV_WD_UIE_TOGGLE_

BUTTON

Get width of ALV output

IF_SALV_WD_TABLE_SETTINGS

GET_WIDTH

Get width of the column

CL_SALV_WD_COLUMN

Get width of cell (only with cell editors listed above)

GET_WIDTH or GET_WIDTH_FIELDNAME

Fixing the Table Layout

Fixing the layout of the ALV output can be used to make columns narrower than their content dictates.

You use the methods of the interface class IF_SALV_WD_TABLE_SETTINGS for this (implementing class CL_SALV_WD_CONFIG_TABLE).

Methods for Fixing the Table Layout

Function

Method

Fix table layout

SET_FIXED_TABLE_LAYOUT

Check whether the table layout is fixed

GET_FIXED_TABLE_LAYOUT

 

 

Leaving content frame