dynnr .
LINE_SELECTOR Flag ("X" or " ") whether there is a selection
column. The start value is taken from the definition of the table
control in the dynpro dynnr .
H_GRID Flag ("X" or " ") whether there are horizontal
separators. The start value is taken from the definition of the table
control in the dynpro dynnr .
V_GRID Flag ("X" or " ") whether there are vertical
separators. The start value is taken from the definition of the table
control in the dynpro dynnr .
COLS Control table for individual columns of structure
CXTAB_COLUMN .
INVISIBLE Flag ("X" or " ") whether or not the table control
is visible in the window or not.
The Structure CXTAB_COLUMN
Component Meaning
SCREEN Structure for the attributes of the screen element of
the current column. The components can be set for the values described
there either directly or using MODIFY SCREEN
. MODIFY SCREEN overwrites a direct assignment.
INDEX Current position of the column in the table control. The
start value is taken from the definition of the table control in the
dynpro dynnr . Is set to current value at time of
PAI .
SELECTED Flag ("X" or " ") whether or not column is selected.
Is set to current value at time of PAI .
VISLENGTH Visible length of the column.
Start value is taken from the definition
of the table control in dynpro dynnr .
INVISIBLE Flag ("X" or " ") whether or not the column is
visible in the table control.
Latest notes: In a table control, you can scroll vertically using a
scroll bar if the component LINES of the structure
CXTAB_CONTROL was set to the correct row number before the
PBO processing of the table control. Every time
you scroll with the scroll bar, the event PAI is
triggered with an empty function code and the component TOP_LINE
of the structure CXTAB_CONTROL is automatically set to the new
topmost row before the time of PBO.
For program-driven scrolling, it is sufficient to assign a value to
the component TOP_LINE of the structure CXTAB_CONTROL
during PBO processing. For page by page scrolling, the number of pages
to be scrolled can be obtained from the system field sy-loopc
during the loop processing . sy-loopc contains
the number of currently displayed rows, while the component LINES
of the structure CXTAB_CONTROL contains the number of rows in
the entire table control.
Example ABAP Coding If a table control is defined on the dynpro with the
number 100, whose rows are defined with reference to the database table
SPFLI in ABAP Dictionary, the corresponding programming of the
ABAP program can look as follows. In a PBO module prepare_tab , an
internal table spfli_tab is filled with data from the database
table. The number of rows of spfli_tab is assigned to the
component lines of the structure flight_tab created using
CONTROLS ; this is done to activate the scroll bar of the table
control. In a PAI module modify_tab , the row of the internal
table is modified whose primary table key matches that of the
interface work area spfli
defined using TABLES . The PAI module modify_tab is called
for every displayed row of the table control. The corresponding dynpro
flow logic can be seen in the example for LOOP .
CONTROLS flight_tab TYPE TABLEVIEW USING SCREEN '0100'.
TABLES spfli.
DATA spfli_tab TYPE SORTED TABLE OF spfli
WITH UNIQUE KEY carrid connid.
...
MODULE prepare_tab OUTPUT.
IF spfli_tab IS INITIAL.
SELECT *
FROM spfli
INTO TABLE spfli_tab.
flight_tab-lines = lines( spfli_tab ).
ENDIF.
ENDMODULE.
MODULE modify_tab INPUT.
MODIFY TABLE spfli_tab FROM spfli.
ENDMODULE.
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved