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

Ter 16 - Screen Modifications and Screen Flow Events

The document discusses dynamic screen modifications in ABAP including modifying field attributes using the SCREEN internal table. It also covers using a mirror image work area to avoid updating unchanged records and coding the PROCESS ON HELP-REQUEST and PROCESS ON VALUE-REQUEST events to display F1 and F4 help for fields.

Uploaded by

nivas
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)
63 views15 pages

Ter 16 - Screen Modifications and Screen Flow Events

The document discusses dynamic screen modifications in ABAP including modifying field attributes using the SCREEN internal table. It also covers using a mirror image work area to avoid updating unchanged records and coding the PROCESS ON HELP-REQUEST and PROCESS ON VALUE-REQUEST events to display F1 and F4 help for fields.

Uploaded by

nivas
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 Ev


ents |

Dec-2008

2005 IBM Corporation

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.

Screen Modifications and Screen Fl

Dec-2008

2008 IBM Corporation

IBM Global Services

Dynamic Screen Modification (1)


Exit

Update

Academy Awards

Change / Display

Year

1994

Category

PIC

Winner

Forrest Gump

Notes

Great movie !!!

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

Great movie !!!

Critic

Ellen

Screen Modifications and Screen Fl

Dec-2008

Enter Name
2008 IBM Corporation

IBM Global Services

Dynamic Screen Modification (2)


Screen 9001
PROCESS BEFORE OUTPUT.
MODULE INITIALIZE.
MODULE MODIFY_SCREEN.

You must use a PBO module to


dynamically modify a screen.
** MZA11O01 - PBO Modules **
MODULE MODIFY_SCREEN OUTPUT.
* to change to display mode

Use the systems SCREEN


internal table.
Turn the input attribute

LOOP AT SCREEN.
IF SCREEN-NAME = YMOVIEWINNER OR
SCREEN-NAME = YMOVIENOTES.
SCREEN-INPUT = 0.

off for display mode.

MODIFY SCREEN.
Dont forget to update the

ENDIF.

changes to the SCREEN

ENDLOOP.

internal table.

ENDMODULE.

Screen Modifications and Screen Fl

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.

Screen Modifications and Screen Fl

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
not make any changes to it.

** MZA12TOP - Top Include **


PROGRAM SAPMZA12 MESSAGE-ID
ZA.
TABLES: YMOVIE, *YMOVIE .

Exit

Update

Academy Awards

Change / Display

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

Screen Modifications and Screen Fl

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.


ENDIF.

ELSE.
*

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.

Screen Modifications and Screen Fl

Dec-2008

2008 IBM Corporation

IBM Global Services

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

Trigger PROCESS ON HELP-REQUEST Flow Logic


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

Screen Modifications and Screen Fl

Dec-2008

2008 IBM Corporation

IBM Global Services

Process on Help-Request (Contd.)

Academy Awards
Year

1994

Category

PIC

Screen 9000
PROCESS BEFORE OUTPUT.
...
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).

Screen Modifications and Screen Fl

Dec-2008

2008 IBM Corporation

IBM Global Services

Process on Value-Request
Screen 9000

Academy Awards
Year

1994

Category

PIC

PROCESS BEFORE OUTPUT.


...
PROCESS AFTER INPUT.
...
PROCESS ON VALUE-REQUEST.
FIELD YMOVIE-AAYEAR

F4

MODULE VALUE_LIST.

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 Fl

Dec-2008

2008 IBM Corporation

IBM Global Services

Process on Value-Request (Contd.)

11

Screen Modifications and Screen Fl

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 Fl

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 Fl

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 Fl

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 Fl

Dec-2008

2008 IBM Corporation

You might also like