Upload
raul-thomas
View
223
Download
0
Embed Size (px)
Citation preview
8/12/2019 Chapter 15_Table Control
1/20
IBM Global Services
2005 IBM CorporationTable Control | 6.15 March-2005
Table Control
8/12/2019 Chapter 15_Table Control
2/20
IBM Global Services
2005 IBM Corporation2 March-2005Table Control | 6.15
Objectives
The participants will be able to:
Know the advantages of using a table control
Create a table control in the Graphical Screen painter
Setting attributes of the Table Control
Paint fields for the table control
Adding title to a table control
Discuss about field selection column of a table control
Program the processing of a table control
Understand the field transport mechanism in the table control
Create table control variants
8/12/2019 Chapter 15_Table Control
3/20
IBM Global Services
2005 IBM Corporation3 March-2005Table Control | 6.15
Table Control
Display data in tabular form.
User configurable.
Change multiple lines of a table
together.
Vertical/horizontal scrollbars.
Choose any number of key(leading) columns to be fixed.
Cell attributes can be modified
during runtime.
Storing and loading of user-
specific column layout.
Fixed Leading
Columns
Automatic horizontal/vertical scrolling
Change/save table settings
Change column width
Mark columns/rows
8/12/2019 Chapter 15_Table Control
4/20
IBM Global Services
2005 IBM Corporation4 March-2005Table Control | 6.15
Table Control (Contd.)
Display data in tabular form.
User configurable.
Change multiple lines of a table
together.
Vertical/horizontal scrollbars.
Choose any number of key(leading) columns to be fixed.
Cell attributes can be modified
during runtime.
Storing and loading of user-
specific column layout.
Fixed Leading
Columns
Automatic horizontal/vertical scrolling
Change/save table settings
Change column width
Mark columns/rows
8/12/2019 Chapter 15_Table Control
5/20
IBM Global Services
2005 IBM Corporation5 March-2005Table Control | 6.15
Creating a Table Control
8/12/2019 Chapter 15_Table Control
6/20
IBM Global Services
2005 IBM Corporation6 March-2005Table Control | 6.15
Creating a Table Control
In the Screen Element Attributes window, assign aname to the table control and set initial (static)
attributes.
Some attributes are With column headers, Resizing,
Separators, With title, Line selection column, No offixed columns etc.
8/12/2019 Chapter 15_Table Control
7/20
IBM Global Services
2005 IBM Corporation7 March-2005Table Control | 6.15
Creating Table Control Fields
8/12/2019 Chapter 15_Table Control
8/20
IBM Global Services
2005 IBM Corporation8 March-2005Table Control | 6.15
Creating Table Control Fields (Contd.)
8/12/2019 Chapter 15_Table Control
9/20
IBM Global Services
2005 IBM Corporation9 March-2005Table Control | 6.15
Adding a table title
8/12/2019 Chapter 15_Table Control
10/20
IBM Global Services
2005 IBM Corporation10 March-2005Table Control | 6.15
When creating a table control, the
system automatically proposes a
selection column.
A selection column allows users to
choose a line of the table control. The selection column elements
behave like a checkbox.
The field name must be entered in the
attributes of the table control.
Creating Table Control: Fields Selection Column
8/12/2019 Chapter 15_Table Control
11/20
IBM Global Services
2005 IBM Corporation11 March-2005Table Control | 6.15
Creating Table Control
Declare CONTROLS statementwith type TABLEVIEW.
The user can modify the Table
Control attributes at runtime.
Use REFRESH
CONTROL FROM SCREEN to
reset a table control to its initial
attributes.
Type TABLEVIEW has a complex structure containing
individual fields and an internal table
*********************************
* INCLUDE SAPMZxxxTOP *
*********************************
CONTROLS: ITEMS TYPE TABLEVIEW
USING SCREEN '9005'.
8/12/2019 Chapter 15_Table Control
12/20
IBM Global Services
2005 IBM Corporation12 March-2005Table Control | 6.15
Processing Table Control
Database
Screen
A Table control can be processed with or without an internal table:
*Processing without an internal table*
PROCESS BEFORE OUTPUT.LOOP WITH CONTROL items.
MODULE ctrl_pbo.
ENDLOOP.
PROCESS AFTER INPUT.
LOOP WITH CONTROL items.
MODULE ctrl_pai.ENDLOOP.
8/12/2019 Chapter 15_Table Control
13/20
IBM Global Services
2005 IBM Corporation13 March-2005Table Control | 6.15
Processing Table Control (Contd.)
*Processing with an internal table*
PROCESS BEFORE OUTPUT.
LOOP AT itab WITH CONTROL items CURSOR items-CURRENT_LINE.
ENDLOOP.
PROCESS AFTER INPUT.LOOP AT itab WITH CONTROL items.
MODULE ctrl_pai.
ENDLOOP.
The fields in the table control and the internal table work area needs to have the
same structure and names for automatic transport of data between the ABAP
program and the screen.
8/12/2019 Chapter 15_Table Control
14/20
IBM Global Services
2005 IBM Corporation14 March-2005Table Control | 6.15
Field Transport in Table Controls
PBO
Transport ABAP table control
fields to screen fields
Transport remaining ABAP fields
to screen fields
PAI
Transport all fields except table
control and FIELD statement fields
Transport table control fields
Transport fields in FIELD
statements
8/12/2019 Chapter 15_Table Control
15/20
IBM Global Services
2005 IBM Corporation15 March-2005Table Control | 6.15
Creating Table Control Variants
8/12/2019 Chapter 15_Table Control
16/20
IBM Global Services
2005 IBM Corporation16 March-2005Table Control | 6.15
Demonstration
Creating a program to display the data in the YMOVIE table using a table control.
8/12/2019 Chapter 15_Table Control
17/20
IBM Global Services
2005 IBM Corporation17 March-2005Table Control | 6.15
Practice
Creating a program to display the data in the YMOVIE table using a table control.
8/12/2019 Chapter 15_Table Control
18/20
IBM Global Services
2005 IBM Corporation18 March-2005Table Control | 6.15
Summary
A table control is an area on the screen where the system displays data in atabular form. It is processed using a loop.
Lines in a table control may contain dictionary table fields, keywords, input/output
fields, radio buttons, checkboxes, radio button groups, and pushbuttons.A line
can be up to 255 columns wide. Each column may have a title.
When creating a table control, the system automatically proposes a selectioncolumn.
A selection column allows users to choose a line of the table control.
When processing a table control in the program, you will also need to declare a
CONTROLS statement with type TABLEVIEW (in the TOP INCLUDE of your
program).
8/12/2019 Chapter 15_Table Control
19/20
IBM Global Services
2005 IBM Corporation19 March-2005Table Control | 6.15
Summary (Contd.)
A Table control can be processed with or without an internal table.
You can use the Customizing button (in the top right corner) to save the
current setting (column widths and column positions) and use it as the initial
value for the next call.
IBM Gl b l S i
8/12/2019 Chapter 15_Table Control
20/20
IBM Global Services
2005 IBM Corporation20 March-2005Table Control | 6.15
Questions
What is a table control ?
Is it mandatory to use an internal table for processing a table control ?
What are the primary advantages of using table control ?