6546379 Table Controls
Transcript of 6546379 Table Controls
-
8/6/2019 6546379 Table Controls
1/14
Table Controls
-
8/6/2019 6546379 Table Controls
2/14
Table Controls & Step Loops
Table controls and step loops are objects for
screen table display that you add to a screenin the Screen Painter. From a programming
standpoint, table controls and step loops arealmost exactly the same. Table controls are
simply enhanced step loops that display datawith the Look and Feel of a table widget in adesktop application.
-
8/6/2019 6546379 Table Controls
3/14
Screen tables
A table can be created in transaction. These
tables, when designed on the screen are calledas SCREEN TABLES.
These are of two types.
Table Controls and
Step loops
These tables are treated as Loops.
-
8/6/2019 6546379 Table Controls
4/14
Features of Table Controls
Data is displayed in the form of table.
Table control gives user the feeling of anactual table.
You can scroll through the table vertically as
well as horizontally.
You can select rows and columns.
You can resize the with of columns.
-
8/6/2019 6546379 Table Controls
5/14
Features contd.
You can have separator lines between rows
and columns.
Automatic resizing of the table when the user
resizes the window.
You can update information in the table
control and it can be updated in the databasetable by writing code for it.
-
8/6/2019 6546379 Table Controls
6/14
Steps for creating table control
Declaration of table control in module pool
program.
Designing of table controls on the screen.
Passing data to table control in flow logic.
-
8/6/2019 6546379 Table Controls
7/14
Declaration of TC in MPP
syntax:
controls typetableview using screen .
-
8/6/2019 6546379 Table Controls
8/14
Tableview Structure
A tableview structure contains the following fields
FIXED_COLS
LINES TOP_LINE
CURRENT_LINE
LEFT_COL
H_GRID
V_GRID LINE_SEL_MODE
COL_SEL_MODE
LINE_SELECTOR
-
8/6/2019 6546379 Table Controls
9/14
D
esigning Table control on screen
Click on Table in Control bar and place it onthe screen. You can adjust the length and
width of the Table Control. Name the table control.(same name as given
in data declaration).
From dictionary object OR from programfields select the fields and place them in thetable control.
-
8/6/2019 6546379 Table Controls
10/14
Passing data to table control
Usually transfer of data from program toscreen is automatic.
In case of TC, you need to explicitlytransfer the data to table control.
ABAP/4 provides Loop statement, which
is associated with flow logic to transfer thedata.
-
8/6/2019 6546379 Table Controls
11/14
Passing of data contd.
PBO.
Loop at withcontrol cursor
.
module.
Endloop.
PAI.
Loop at < name of internal table>.Endloop.
-
8/6/2019 6546379 Table Controls
12/14
Scroll variables
Top_line : the row of table where the screen
display starts.
Current_line : the row currently being
processed inside a loop.
-
8/6/2019 6546379 Table Controls
13/14
Transfer of data from prg to TC.
With Loop at statement, the first row is
placed in the header of internal table.
If any module is specified between Loop and
End loop, it will be executed. In this module,generally we will be assigning this internal
table fields to table control screen fields.
-
8/6/2019 6546379 Table Controls
14/14
Transfer of data contd.
The row in internal table is transferred to the
TC as stated in the Loop at.. statement.
The system encounters the Endloop
statement and control is passed back to thenext line of internal table.
In the same way all the records of the internaltable are passed to the TC.