Quick K.T. Table Control in Module Pool

Study the statement below:
 
CONTROLS tc_contrl TYPE TABLEVIEW USING SCREEN dynnr.
 
I guess you know that this statement is used to declare a table control in a module pool.
Because of this statement in your program,  at the UI level , you will simply notice a table control displayed on the screen.
Internally though, at the program level, this statement creates a deep structure with the name tc_contrl type CXTAB_CONTROL of the type group CXTAB.
 
This structure can be used to read and edit the attributes of the associated table control.
Here are the fields in this structure
ComponentMeaning
FIXED_COLSNumber of lead columns. The start value is taken from the definition of the table control in the dynpro dynnr.
LINESControls the vertical scroll bar of the table control. If the LOOP is executed in the dynpro flow logic without reference to an internal table, that start value of LINES is 0 and must be set in the program so that the scroll bar can be used. With reference to an internal table, LINES is set to the current number of rows in the internal table if the table control is being processed for the first time. However, since this time is not defined, the value of LINES should also be explicitly set to the number of rows of the internal table before the PBO processing in this case.
TOP_LINETop displayed row for next PBO. Set at time of PAI by the position of the vertical slider box.
CURRENT_LINECurrent row during a LOOP in the dynpro flow logic. If the addition FROM of the statement LOOP is not specified, the value of CURRENT_LINE corresponds to the result of sy-stepl + (TOP_LINE - 1).
LEFT_COLNumber of first horizontally scrollable column displayed after the lead columns. Is set at time of PAI by the position of the horizontal slider box.
LINE_SEL_MODERow selection mode: "0" if no rows can be selected , "1" if one row, "2" if multiple rows. The start value is taken from the definition of the table control in the dynpro dynnr.
COL_SEL_MODEColumn selection mode: "0" if no columns can be selected , "1" if one column, "2" if multiple columns. The start value is taken from the definition of the table control in the dynpro dynnr.
LINE_SELECTORFlag ("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_GRIDFlag ("X" or " ") whether there are horizontal separators. The start value is taken from the definition of the table control in the dynpro dynnr.
V_GRIDFlag ("X" or " ") whether there are vertical separators. The start value is taken from the definition of the table control in the dynpro dynnr.
COLSControl table for individual columns of structure CXTAB_COLUMN.
INVISIBLEFlag ("X" or " ") indicating whether the table control is visible in the GUI window.

Leave a Reply

Your email address will not be published. Required fields are marked *