Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 2

Table Controls in ABAP Programs

Components of CXTAB_CONTROL
The structure CXTAB_CONTROL has the following components:

Component Type (Length) Meaning In the Screen


Painter:
FIXED_COLS INT4 Number of lead columns. Transferred Fixed columns
from Screen Painter. Can be changed
in the ABAP program.
LINES INT4 Controls the scroll bar of the table
control. At LOOP without internal table,
LINES has the initial value zero and
must be set in the program so that the
scroll bar can be used. At LOOP AT
itab the system sets this component
to the number of rows of the internal
table, whenever the table control is
processed for the first time. The
initialization event of a table control is
not determined uniquely. If the
corresponding internal table is not fully
created at this event, then the LINES
variable receives an incorrect value. If
LINES in the LOOPloop is smaller as
the number of rows of the internal table,
then the table control contains blank
rows at the end.
Therefore you should always set the
LINES component explicitly in the
ABAP program, including at LOOP AT
itab. In this way you have full control
over the dimensions of the vertical
scroll bar and so can control the
number of rows that are ready for input.
Initialization should usually occur at
PBO directly before
the LOOP statement for the table
control.
TOP_LINE INT4 Top row at next PBO. Set at PAI by
position of the vertical slider box. Can
be changed in the ABAP program.
CURRENT_LINE INT4 Current line in the loop. Set
automatically in the LOOP loop to the
value sy-stepl +(TOP_LINE-1). N
ochanges allowed in the ABAP
program.
LEFT_COL INT4 First displayed horizontal scrollable
column after the lead column. Set at
PAI by position of the horizontal slider
box. LEFT_COL contains the absolute
number of the column independent of
any column shift by the user. Can be
changed in the ABAP program.
LINE_SEL_MODE INT4 Row selection mode: 0, 1, 2 for none, Row selection
one or multiple rows can be selected.
Transferred from Screen Painter. Can
be changed in the ABAP program.
COL_SEL_MODE INT4 Column selection mode: 0, 1, 2 for Column selection
none, one or multiple rows can be
selected. Transferred from Screen
Painter. Can be changed in the ABAP
program.
LINE_SELECTOR CHAR(1) Flag (X or blank) for selection column. Selection column
Transferred from Screen Painter. Can
be changed in the ABAP program.
H_GRID CHAR(1) Flag (X or blank) for horizontal Separators
separators. Transferred from Screen
Painter. Can be changed in the ABAP
program.
V_GRID CHAR(1) Flag (X or blank) for vertical separators. Separators
Transferred from Screen Painter. Can
be changed in the ABAP program.
COLS CXTAB_COLUMN Control table for single columns (see
below).
INVISIBLE CHAR(1) Flag (X or blank) for visibility of entire
table control.
Internal table CXTAB_COLUMN is a component of the structure CXTAB_CONTROL.

Components of CXTAB_COLUMN
Each column of the table control corresponds to a row of the table CXTAB_COLUMN. The internal table
CXTAB_COLUMN has no header line and the following columns:

Component Type (Length) Meaning


SCREEN SCREEN Structure for the attributes of screen elements of the column
(see below).
INDEX INT4 Current position of the column in the table control. Transfered
with initial value from Screen Painter. At PAI the current
column configuration of the table control is withdrawn. Can
be changed in the ABAP program.
SELECTED CHAR(1) Flag (X or blank) whether column is selected or not. At PAI
the current status of the table control is withdrawn. Can be
changed in the ABAP program.
VISLENGTH INT4 Visible length of the column. Transferred from Screen Painter.
Can be changed in the ABAP program.
INVISIBLE CHAR(1) Flag (X or blank) whether column is visible. Transferred from
Screen Painter. Can be changed in the ABAP program.

You might also like