Ter 16 - Screen Modifications and Screen Flow Events
Ter 16 - Screen Modifications and Screen Flow Events
Dec-2008
Objectives
The participants will be able to:
Recognize Dynamic screen modification.
Use a mirror image table work area to avoid updating a record that did not change.
Code the PROCESS ON HELP-REQUEST Flow Logic event.
Code the PROCESS ON VALUE-REQUEST Flow Logic event.
Dec-2008
Update
Academy Awards
Change / Display
Year
1994
Category
PIC
Winner
Forrest Gump
Notes
Critic
Ellen
Enter Name
Exit
Update
Academy Awards
You can dynamically modify a screen.
Field attributes can be temporarily
modified.
Change / Display
Year
1994
Category
PIC
Winner
Forrest Gump
Notes
Critic
Ellen
Dec-2008
Enter Name
2008 IBM Corporation
LOOP AT SCREEN.
IF SCREEN-NAME = YMOVIEWINNER OR
SCREEN-NAME = YMOVIENOTES.
SCREEN-INPUT = 0.
MODIFY SCREEN.
Dont forget to update the
ENDIF.
ENDLOOP.
internal table.
ENDMODULE.
Dec-2008
Dec-2008
Mirror Image
Currently, if the user clicks on the
Update pushbutton, our program will
update the record even if the user did
not make any changes to it.
Exit
Update
Academy Awards
Change / Display
Year
1994
Category
PIC
Winner
Forrest Gump
Notes
Critic
Ellen
Enter Name
Dec-2008
IF OKCODE = EDIT.
*
IF OKCODE = UPDA.
IF YMOVIE = *YMOVIE.
IF SY-SUBRC = 0.
MESSAGE S005.
ELSE.
*
ENDIF.
ENDIF.
ENDMODULE.
ENDIF.
ENDMODULE.
Dec-2008
Process on Help-Request
Academy Awards
Year
1994
Category
PIC
Screen 9000
PROCESS BEFORE OUTPUT.
...
PROCESS AFTER INPUT.
...
PROCESS ON HELP-REQUEST.
FIELD YMOVIE-AAYEAR WITH 0001.
F1
Dec-2008
Academy Awards
Year
1994
Category
PIC
Screen 9000
PROCESS BEFORE OUTPUT.
...
PROCESS AFTER INPUT.
...
PROCESS ON HELP-REQUEST.
FIELD YMOVIE-AAYEAR WITH 0001.
F1
Dec-2008
Process on Value-Request
Screen 9000
Academy Awards
Year
1994
Category
PIC
F4
MODULE VALUE_LIST.
10
Dec-2008
11
Dec-2008
Demonstration
Creating a module pool program and coding the Process on Help-Request and
the Process on Value-Request events in the program to display F1 and the F4
helps.
12
Dec-2008
Practice
Creating a module pool program and coding the Process on Help-Request and
the Process on Value-Request events in the program to display F1 and the F4
helps.
13
Dec-2008
Summary
You can dynamically modify a screen. More specifically, screen field attributes
can be temporarily modified during the execution of an online program.
To dynamically modify field attributes, use the SCREEN internal table
maintained by the system for each screen.
A mirror image is created with the ABAP statement: TABLES *<database
table>. The work area created with this statement is identical in structure to the
one created with the TABLES <database table> statement.
The Process on Help-Request event is triggered when the user presses the F1
key.
The Process on Value-Request event is triggered when the user presses the F4
key.
14
Dec-2008
Questions
What is the event required for displaying F1 help ?
What is the event required for displaying F4 help ?
What is the system internal table required to be modified for dynamic screen
modifications ?
15
Dec-2008