Chapter 08 - Multiple Line Selection
Chapter 08 - Multiple Line Selection
Dec-2008
Objectives
The participants will be able to :
Write check boxes in the screen.
Providing additional information on single record on the screen.
Use READ-LINE statement with SY-INDEX.
Dec-2008
Dec-2008
Dec-2008
Challenges
First we must learn techniques to
draw checkboxes on the screen.
Then we must learn techniques to loop through each of the lines on the
report and determine whether or not they were checked.
READ LINE 1.. checked? YES
or NO
or NO
Dec-2008
or NO
SELECT *
Create a single-character
variable.
START-OF-SELECTION.
SELECT * FROM LFA1 INTO WA_LFA1 WHERE TELF1 <> SPACE.
WRITE: / CHK1 AS CHECKBOX,
WA_LFA1-LIFNR, WA_LFA1-NAME1, WA_LFA1-ORT01.
SKIP.
Then WRITE it to the
ENDSELECT.
report as a checkbox.
CHECK
SY-SUBRC
Dec-2008
MEMORY
VAR1 = VEND021
A New
ABAP
Reserved Word
SYNTAX: READ LINE <#>.
Dec-2008
READ LINE 1
READ LINE 2
A New
ABAP
System Field
READ LINE 3
READ LINE n
Dec-2008
CHECK
SY-SUBRC
Dec-2008
..checked? YES
or NO
.. checked? YES
or NO
.. checked? YES
or NO
.. checked? YES
10
AT PF06.
WINDOW STARTING AT 10 4 ENDING AT 77 12.
DO.
CLEAR CHK1.
READ LINE SY-INDEX FIELD VALUE CHK1.
IF SY-SUBRC <> 0.
EXIT.
ELSE.
CHECK CHK1 = X.
WRITE: / WA_LFA1-NAME1, WA_LFA1-TELF1.
ENDIF.
ENDDO.
or NO
Dec-2008
11
Dec-2008
12
Dec-2008
13
Dec-2008
Demonstration
Writing checkboxes, use of READ LINE and MODIFY LINE statement
14
Dec-2008
Practice
Writing checkboxes, use of READ LINE and MODIFY LINE statement
15
Dec-2008
Summary
Checkboxes can be written to the list by using AS CHECKBOX addition with the
WRITE command.
READ LINE statement can be used to read the contents of a list. With this
statement, the contents of the line are populated in system field SY-LISEL.
MODIFY LINE statement can be used to modify the list even after it is displayed.
The format of the lines in the list can also be changed using MODIFY LINE ..
FORMAT addition.
16
Dec-2008
Questions
How do you draw checkboxes in the output list ?
How to read the contents of a list ?
How do you modify the contents of a list after it is displayed ?
17
Dec-2008