0% found this document useful (0 votes)
13 views15 pages

Chapter 16 - Screen Modifications and Screen Flow Events

The document outlines the objectives and methods for dynamic screen modification and flow events in IBM Global Services. It explains how to use a 'mirror image' table to prevent unnecessary updates and details the coding for 'PROCESS ON HELP-REQUEST' and 'PROCESS ON VALUE-REQUEST' events. Additionally, it provides examples and emphasizes the importance of the SCREEN internal table for modifying screen attributes during program execution.

Uploaded by

Aniruddha_Ghosh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views15 pages

Chapter 16 - Screen Modifications and Screen Flow Events

The document outlines the objectives and methods for dynamic screen modification and flow events in IBM Global Services. It explains how to use a 'mirror image' table to prevent unnecessary updates and details the coding for 'PROCESS ON HELP-REQUEST' and 'PROCESS ON VALUE-REQUEST' events. Additionally, it provides examples and emphasizes the importance of the SCREEN internal table for modifying screen attributes during program execution.

Uploaded by

Aniruddha_Ghosh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 15

IBM Global Services

Screen Modifications and Screen Flow Events

Screen Modifications and Screen Flow E Dec-2008 © 2005 IBM Corporation


vents |
IBM Global Services

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.

2 Screen Modifications and Screen Flow Events | Dec-2008 © 2008 IBM Corporation
IBM Global Services

Dynamic Screen Modification (1)

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

Dynamic Screen Modification (2)

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

Dynamic Screen Modification (3)

 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

Currently, if the user clicks on the


‘Update’ pushbutton, our program will
update the record even if the user did ** MZA12TOP - Top Include **
not make any changes to it. PROGRAM SAPMZA12 MESSAGE-ID
ZA.
TABLES: YMOVIE, *YMOVIE .

Exit Update
Change / Display
Academy Awards To avoid updating a record that did not
Year 1994 change, we can use a “mirror image”

Category PIC of the YMOVIE table work area.

Winner Forrest Gump


Notes Great movie !!!
Critic Ellen Enter Name

6 Screen Modifications and Screen Flow Events | Dec-2008 © 2008 IBM Corporation
IBM Global Services

Mirror Image Example

** MZA12I01 - PAI Modules ** ** MZA12I01 - PAI Modules **


MODULE SELECT_LISTING INPUT. MODULE UPDATE INPUT.
IF OKCODE = ‘EDIT’. IF OKCODE = ‘UPDA’.
* code to select YMOVIE record IF YMOVIE = *YMOVIE.
IF SY-SUBRC = 0. MESSAGE S005.
MOVE YMOVIE TO *YMOVIE. ELSE.
ENDIF. * code to update YMOVIE
ENDIF. ENDIF.
ENDMODULE. ENDIF.
ENDMODULE.

If a record is selected, it will If the record has not changed,


be placed in the “mirror image” a message will be issued and the
table work area. record will not be updated.

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

Trigger “PROCESS ON HELP-REQUEST” Flow Logic


event for the particular field. This event will display
the specified supplemental documentation (i.e., ‘0001’).

8 Screen Modifications and Screen Flow Events | Dec-2008 © 2008 IBM Corporation
IBM Global Services

Process on Help-Request (Contd.)

Screen 9000
Academy Awards
Year 1994 PROCESS BEFORE OUTPUT.
...
Category PIC PROCESS AFTER INPUT.
...
PROCESS ON HELP-REQUEST.
FIELD YMOVIE-AAYEAR WITH ‘0001’.

F1

Trigger “PROCESS ON HELP-REQUEST” Flow Logic


event for the particular field. This event will display
the specified supplemental documentation (i.e., ‘0001’).

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

Trigger “PROCESS ON VALUE-REQUEST” Flow Logic event


for the particular field. This event will execute the specified
module (i.e., “VALUE_LIST”).
10 Screen Modifications and Screen Flow Events | Dec-2008 © 2008 IBM Corporation
IBM Global Services

Process on Value-Request (Contd.)

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

 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 Screen Modifications and Screen Flow Events | Dec-2008 © 2008 IBM Corporation

You might also like