Chapter 16 - Screen Modifications and Screen Flow Events
Chapter 16 - Screen Modifications and Screen Flow Events
Objectives
2 Screen Modifications and Screen Flow Events | Dec-2008 © 2008 IBM Corporation
IBM Global Services
Exit Update
Change / Display
Academy Awards
Year 1994
Category PIC
Winner Forrest Gump
Notes Great movie !!!
Critic Ellen Enter Name
Exit Update
Change / Display
Academy Awards
Year 1994
You can dynamically modify a screen.
Category PIC
Field attributes can be temporarily
Winner Forrest Gump
modified.
Notes Great movie !!!
Critic Ellen Enter Name
3 Screen Modifications and Screen Flow Events | Dec-2008 © 2008 IBM Corporation
IBM Global Services
Screen 9001
You must use a PBO module to
PROCESS BEFORE OUTPUT. dynamically modify a screen.
MODULE INITIALIZE.
** MZA11O01 - PBO Modules **
MODULE MODIFY_SCREEN.
MODULE MODIFY_SCREEN OUTPUT.
* to change to display mode
LOOP AT SCREEN.
Use the system’s “SCREEN”
IF SCREEN-NAME = ‘YMOVIE-
internal table.
WINNER’ OR
SCREEN-NAME = ‘YMOVIE-
Turn the input attribute NOTES’.
“off” for display mode. SCREEN-INPUT = 0.
MODIFY SCREEN.
Don’t forget to update the ENDIF.
changes to the “SCREEN” ENDLOOP.
internal table. ENDMODULE.
4 Screen Modifications and Screen Flow Events | Dec-2008 © 2008 IBM Corporation
IBM Global Services
Each field on a
screen has a set of
attributes that are
fixed when you
define the screen in
the Screen Painter.
When an ABAP
program is running,
a subset of the
attributes of each
screen field can be
addressed using the
system table
SCREEN.
5 Screen Modifications and Screen Flow Events | Dec-2008 © 2008 IBM Corporation
IBM Global Services
Mirror Image
Exit Update
Change / Display
Academy Awards To avoid updating a record that did not
Year 1994 change, we can use a “mirror image”
6 Screen Modifications and Screen Flow Events | Dec-2008 © 2008 IBM Corporation
IBM Global Services
7 Screen Modifications and Screen Flow Events | Dec-2008 © 2008 IBM Corporation
IBM Global Services
Process on Help-Request
Screen 9000
Academy Awards
Year 1994 PROCESS BEFORE OUTPUT.
...
Category PIC PROCESS AFTER INPUT.
...
PROCESS ON HELP-REQUEST.
FIELD YMOVIE-AAYEAR WITH ‘0001’.
F1
8 Screen Modifications and Screen Flow Events | Dec-2008 © 2008 IBM Corporation
IBM Global Services
Screen 9000
Academy Awards
Year 1994 PROCESS BEFORE OUTPUT.
...
Category PIC PROCESS AFTER INPUT.
...
PROCESS ON HELP-REQUEST.
FIELD YMOVIE-AAYEAR WITH ‘0001’.
F1
9 Screen Modifications and Screen Flow Events | Dec-2008 © 2008 IBM Corporation
IBM Global Services
Process on Value-Request
Screen 9000
Academy Awards
PROCESS BEFORE OUTPUT.
Year 1994
...
Category PIC PROCESS AFTER INPUT.
...
PROCESS ON VALUE-REQUEST.
FIELD YMOVIE-AAYEAR
MODULE VALUE_LIST.
F4
11 Screen Modifications and Screen Flow Events | Dec-2008 © 2008 IBM Corporation
IBM Global Services
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 Screen Modifications and Screen Flow Events | Dec-2008 © 2008 IBM Corporation
IBM Global Services
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 Screen Modifications and Screen Flow Events | Dec-2008 © 2008 IBM Corporation
IBM Global Services
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 Screen Modifications and Screen Flow Events | Dec-2008 © 2008 IBM Corporation
IBM Global Services
Questions
15 Screen Modifications and Screen Flow Events | Dec-2008 © 2008 IBM Corporation