. .
(event) , . , , , . :
Initialization
Start-of-selection
End-of-selection
. .
3. .
(driver program) , (, driven) . SAP R/3. (driven) .
, , , .. , , .
, , . :
:
initialization, , initialization. initialization ,
(selection screen) ( , parameter). ,
start-of-selection, , . start-of-selection ,
end-of-selection , , . end-of-selection,
(list)
, .
, . , , . ; :
Report ztx1702.
Data f1 type i value 1.
End-of-selection.
5 write: / '3. f1 =', f1.
Start-of-selection.
8 write: / '2. f1 =', f1.
9 f1 = 99.
Initialization.
12 write: / '1. f1 =', f1.
Add 1 to f1.
1. f1 = 1
2. f1 = 2
3. f1 = 99
ztx1702
initialization
, initialization ( 12 13). f1, 1.
|
|
. , start-of-selection. 7 8 ztx1702. 8 9,
end-of-selection. 4, 5 ztx1702. end-of-selection 5, ,
5. ABAP/4, .
ABAP/4 , , .
ABAP/4:
Events | |
Driver | initialization at selection-screen start-of-selection get end-of-selection |
User | at line-selection at pfn at user-command |
Program | top-of-page end-of-page |
, .
:
Exit
Check
Stop
check exit, . stop , .
:
check ( , )
stop end-of-selection. stop end-of-selection .
, start-of-selection:
exit check ( , )
start-of-selection , :
exit . top-of-page exit check
check ( , )
check, exit stop sy-subrc. , .
.
(subroutine) . , . , , . form , endform . 30 .
perform.
:
(Internal subroutines)
(External subroutines)
8. .
. form . .
|
|
form:
form s [tables t1 t2... ]
[using u1 value(u2)... ]
[changing c1 value(c2)... ].
---
Endform.
:
s
t1, t2, u1, u2, c1 c2
tables ,
value tables
value , using changing
---
form:
, , ..: tables, using, changing
tables
, , ,
( )
perform:
perform a) s
b) n of s1 s2 s3...
[tables t1 t2... ]
[using u1 u2... ]
[changing c1 c2... ].
:
s, s1, s2, s3
n
a) b)
tables, using changing a) b)
value() perform
b), , . n - . , n = 2, .