Professional Documents
Culture Documents
Screen Painter
Screen Painter
Menu bars
Define functions available to the user. Where the functions appear depend on
the dialog. If the dialog is modal, the functions appear at the bottom of the
interface as a row of buttons. In the primary window, the functions can appear
both as a row of menus and as buttons in a tool bar.
Menu list
Lists the items in a specific menu. For example, an edit menu might contain
items like copy, cut, and replace.
F-key settings
Define keyboard keys associated with a particular interface function.
Functions
Define individual functions such as cut, copy, and replace.
Titles
Define window titles for an interface.
Place the cursor on the development class and click in on Create icon on the
application toolbar.
From the Pop up dialog box, select Program Objects
Enter a description for the program and Click on the Save icon to save the
attributes.
Click on Back icon to come back to your development class initial screen.
From the Program list, double click on the program you created.
From the pop dialog box that you get, click the radionbutton Transaction and
enter a Four character transaction code in the adjacent field. And click on the
Create icon at the bottom of the screen.
For our example, we have create a Transaction Code by the name ZSHA.
Select the Transaction Type as Dialog Transaction and click on the Continue
icon.
Enter a meaningful description for the Transaction code (eg. Test Transaction
Code ), the program name (eg. SAPMZSC1) and the Starting Screen number (eg.
1000) of your dialog transaction
After entering the above inputs, click on the Save icon.
Click the Back icon.
Now should see the Transaction code created.
Click the Screen radionbutton and enter the screen number (eg. 1000).
Click on the Create icon at the bottom of the screen
You will taken to Screen Painter : Change Screen Attributes screen
Now the next step is to create the GUI statuses for the screen(s).
10
11
After the entering the short text, click on the Continue icon
Now you will get into Maintain Status (i.e. the Menu Painter) screen.
Scroll down to Freely Assigned Function Keys section.
Here you can assign functionality to some of the function / combination of
keys.
12
For example, as you you can see from the above screen that the propose icon
for our function key is glasses.
Click on the Create Link button. The icon gets associated with our function key
DISP. The icon will be displayed next to the function key.
You can
see the
icon here..
Similarly, you can add your functionality to the function keys. We will add more
later.
Once you define your function keys you can add them to the application toolbar
and Standard tool bar as per your requirement.
In our example we will add the functionality DISP to both the toolbars as also
to the Menu option.
13
Now Scroll up the Standard Tool Bar and Application Tool bar to specify which
all options / functionality, you would like to form as part of your GUI status (in
our case GUI1000).
14
15
To add the options to the Menus, double click on each one of them and enter
the function key codes that you want to be part of the menus.
In our example, we have included the function code DISP, that we created as
part on the Menu Flight Data.
After you have finished with the task of creating and assigning the function
codes, Save and Generate your entries.
Press the Back icon to come back to the Development class intial screen.
Now you should see the GUI Status that you created as part of the objects list
under your program.
16
Click on the radiobutton GUI Title and enter GUI Title code in the field adjacent
to it.
Click on the Create icon.
Enter a meaningful title and click on the Save icon on the screen.
17
18
19
Click on Yes
The system will ask you for creating the PBO module
20
21
Change the lines SET PF-STATUS 'xxxxxxxx' and SET TITLEBAR 'xxx', by
replacing the xxxxxxxxx and xxx with your corresponding GUI STATUS and
GUI TITLE. (In our example, GUI1000 and ZSH) respectively under MODULE
STATUS_1000 OUTPUT.
22
Now click on Fullscreen button on the application toolbar to enter into the
Screen Painter Screen.
After you click the button, the screen painter will be launched.
If the screen is in the display mode, click on the Change icon to switch to
change mode.
23
You can add elements such as Text Boxes, Push buttons, Radio buttons, fields
from the dictionary etc.
To add text boxes, push buttons, radio buttons etc., click on the corresponding
button on the icons panel on the left side of the screen and drag it on the
screen and in the Text Name are, you can enter the name for the object.
For example right now, we have included a Text Box and entered the text SAP
IDES INTERNATIONAL AIRLINES.
24
You can also add fields from the ABAP/4 Dictionary tables.
Click on the Dict/Prog fields button on the toolbar
Enter a table name and select the fields from that table to be placed on your
screen.
These fields will be used to display the data from the table.
25
Press the Enter icon and then drag and place the fields on the screen.
26
To change the display attribute of the field, select the field and click on the
Attribute button on the toolbar.
Click on the Program tab under attributes section and the uncheck the Input
field check box.
Now the field Flgt date becomes a display field.
After the setting is done, simply close the attributes window.
Repeat the process for remaining fields.
27
28
If you get back to the development class initial screen then double click on the
Screen number and then Change the screen to Change mode.
To add the special fields OK-CODE, click on the Field List button on the
application toolbar.
29
30
On the above screen, keep the defaults and click on the Continue icon.
You will get a Warning box.
31
You have to write your processing logic / code here now under MODULE
USER_COMMAND_<SCREEN
NUMBER>
INPUT
(eg.
MODULE
USER_COMMAND_1000 INPUT)
We will write the following code, we will retrieve one record at a time for a given
input of Flight Connection Id and Flight Number.
Case OK-CODE.
WHEN DISP.
CLEAR OK-CODE.
SELECT SINGLE * FROM SPFLI WHERE CARRID = SPFLI-CARRID
AND CONNID = SPFLI-CONNID.
WHEN SPACE.
WHEN OTHERS.
CLEAR OK-CODE.
SET SCREEN 0.
LEAVE SCREEN.
EndCase .
32
You will get some error message since you have not completed the data
declaration part.
You have to do the Data Declaration in the TOP INCLUDE part.
33
Click on YES.
34
35
36
Select the Direct (the defalut) radiobutton and click on the Continue icon
37
Now you get the screen that you designed with the fields which you had
included in the screen.
You also check the Application Toolbar where you will find only the icon which
you had associated with your function code DISP. You have only one icon there
because you had entered only one entry in the Application Toolbar area of your
GUI STATUS.
Also check the Menu Bars and the Window Title (i.e. the GUI Title).
38
If everything is okay then the data for the other fields will be retrieved from the
table and displayed.
THIS IS WAS A SIMPLE USE OF THE SCREEN PAINTER AND MENU PAINTER.
In the following sections we will make some enhancements to the screen and
menu that we created by adding some other objects on the screen.
39
Click on the
40