Escolar Documentos
Profissional Documentos
Cultura Documentos
Dec-2008
Objectives
The participants will be able to:
Use SET PF-STATUS syntax and be able to create a GUI Status.
Assign Function Codes to Function Keys.
Add an Icon to a Function Code.
Create Pushbuttons on the Application Toolbar.
Use The SY-PFKEY System Field.
Dec-2008
Coding Example
Using SET PF-STATUS and Creating a GUI Status
DATA:WA_LFA1 TYPE LFA1.
SELECT *
CHECK
SY-SUBRC
START-OF-SELECTION.
SELECT * FROM LFA1 INTO WA_LFA1.
WRITE: / WA_LFA1-LIFNR, 30 WA_LFA1-NAME1.
ENDSELECT.
SET PF-STATUS TEST1.
A New
ABAP
Reserved Word
Dec-2008
SELECT *
CHECK
SY-SUBRC
Double-click on the
word TEST1.
START-OF-SELECTION.
SELECT * FROM LFA1 INTO WA_LFA1.
WRITE: / WA_LFA1-LIFNR, 30 WA_LFA1-NAME1.
ENDSELECT.
SET PF-STATUS TEST1.
Dec-2008
Choose YES
Dec-2008
Enter Some
Descriptive text
Choose Normal
Screen as Status
Type
Dec-2008
Function Key
assignments
for all buttons
are shown
here
Dec-2008
Application Toolbar
in the Menu Painter
Standard Toolbar in
the Menu Painter
Standard Toolbar
of your program
Application Toolbar
of your program
Dec-2008
2nd.
To create a function code with an
icon associated to it, double-click
on the function code, then choose
an icon.
Dec-2008
10
Dec-2008
11
Dec-2008
12
Dec-2008
Adding a Menu
13
Dec-2008
14
Dec-2008
15
Dec-2008
Demonstration
Creation of a GUI status with pushbuttons on application toolbar and customized
menu.
16
Dec-2008
Practice
Creation of a GUI status with pushbuttons on application toolbar and customized
menu.
17
Dec-2008
AT USER-COMMAND.
CASE SY-UCOMM.
WHEN RUNX.
WINDOW STARTING AT 10 4
ENDING AT 77 12.
WRITE: / The user chose X.
WHEN RUNY.
WINDOW STARTING AT 10 4
ENDING AT 77 12.
WRITE: / The user chose Y.
ENDCASE.
18
Dec-2008
19
Dec-2008
Problem:
How does the user exit this window?
There should be a button on the bottom of this window
that allows the user to go back.
For now just use the control menu box to
close this window.
20
Dec-2008
21
Dec-2008
Demonstration
Creation of Dialog boxes with Exit button.
22
Dec-2008
Practice
Creation of Dialog boxes with Exit button.
23
Dec-2008
24
Dec-2008
25
Dec-2008
A Report that Uses More than One GUI Status - Menu Painter
26
Dec-2008
Functionality
Associated
function key
BACK
Back
F3
RW
Cancel
F12
%EX
End
F15
P--
Scroll to beginning
F21
P-
F22
P+
F23
P++
Scroll to end
F24
27
Dec-2008
Button on
Toolbar
28
Dec-2008
A New
ABAP
System Field
SY-PFKEY = TEST1
SY-PFKEY = TEST3
29
Dec-2008
Demonstration
Use of more than one GUI Status in a program.
30
Dec-2008
Practice
Use of more than one GUI Status in a program.
31
Dec-2008
A New
ABAP
Reserved Word
32
Dec-2008
First
Choose Yes.
Second
Type in the text that you
want to appear on the titlebar
of your GUI Status. Use
ampersands (&) if you want to use
variables. Then choose Save.
33
Dec-2008
Status 1
Status 2
RUNX
RUNY
RUNZ
RUNX
Function Codes
for Entire GUI
RUNA
RUNB
RUNC
RUNX
RUNY
RUNZ
RUNA
Status 3
Status 4
RUNC
RUNB
RUNY
34
Dec-2008
Summary
GUI status name can be up to 20 characters and must be in Capital letters.
SY-PFKEY contains the name of current GUI status.
Dialog Box status does not have Menu or a Standard Toolbar.
GUI Title names can be up to 20 characters and must be in Capital letters.
Whenever we create a new window or dialog box, the exit button from the control
menu must be used. Options to exit must be provided to the user.
A program can have any number of GUI statuses defined.
Function Codes can be defined with a maximum four characters long.
35
Dec-2008
Questions
What are the naming restrictions for a PF status ?
What are the naming restrictions for a GUI title ?
What is the difference between a Normal Screen and a Dialog Box status ?
What is the problem if the no buttons or Function codes are not included from the
control menu in a dialog box ?
How many GUI status can be defined for a program ?
Can we pass parameters to GUI title ?
36
Dec-2008