LeverX SAP ABAP Basics - Creating Custom Screen Via Screen Painter
1. Essential
SAP Tutorial
SAP ABAP Basics:
Creating a Custom Screen
with Screen Painter
By Robert Tomlinson
SAP Technical Consultant
1 Copyrighted 2012 by LeverX, Inc.
2. Tutorial Goal
Create a new custom screen using SAP screen painter
Look at elements available in screen builder
i.e. labels, text inputs, radio buttons, etc.
Saving and Testing the screen
2 Copyrighted 2012 by LeverX, Inc.
3. Open Transaction SE38
Transaction SE38 is where
you can create custom
programs
3 Copyrighted 2012 by LeverX, Inc.
4. Creating Program to Run Screen
To create a program you
must give it a name.
Custom programs must
start with a ‘z’ or ‘y’.
For this example we will
use the name ‘zrt_test’
Click ‘Create’ and on the
popup screen fill in title,
type and status as shown
Click ‘Save’
4 Copyrighted 2012 by LeverX, Inc.
5. Creating Program to Run Screen (cont.)
Next popup screen
you will just click local
object
In the program write ‘CALL
SCREEN 0100 STARTING AT 10
10.’ and save
Double click the ‘0100’ and click
‘Yes’ when prompted
21 July 2012 5 Copyrighted 2012 by LeverX, Inc.
6. Screen Painter
Once the screen painter opens,
enter short description and click
‘Layout’
This will open up the actual
screen painter to add
elements
6 Copyrighted 2012 by LeverX, Inc.
7. Screen Painter (cont.)
1. Click to make
screen editable
2. Add a text field by
clicking icon and
clicking anywhere
on light grey area
3. Type in name ‘hello
world’ and same for
text. (system places
‘_’ automatically for
spaces)
7 Copyrighted 2012 by LeverX, Inc.
8. Screen Painter (cont.)
1. Add a button by
clicking icon and
clicking anywhere
on light grey area
2. Type in name ‘close
button’ and ‘close’
for text
8 Copyrighted 2012 by LeverX, Inc.
9. Element Icons
Though we won’t be using them
for this example, you can see
the list of elements on the left
side edge of the painter screen.
Hover your mouse over each
item and the name of them will
appear.
9 Copyrighted 2012 by LeverX, Inc.
10. Field Attributes
If you need to view additional
information about an element.
There are two options
1. Double click on the element
itself
2. Click Icon to open attributes
screen and then click on the
element you desire to view
information about.
21 July 2012 10 Copyrighted 2011 by LeverX, Inc.
11. Program Close Function
IMPORTANT!!! We need the close
button or when we run our code we
will be stuck viewing our screen with
no way to close it
In order for the button to operate we
need to fill in the field FctCode. Fill
this field with ‘CANCEL’. Also
Change FctType to ‘E’.
I also added the Icon Name
‘ICON_CANCEL’ to include the red X
on my button
21 July 2012 11 Copyrighted 2011 by LeverX, Inc.
12. Program Close Function (cont.)
Close the screen painter Layout
window
Click on the ‘Flow Logic’ tab and
uncomment the
‘user_command_0100’ line and
double click it
Click yes when prompted and
click
Choose Main Program and click
green checkmark
21 July 2012 12 Copyrighted 2011 by LeverX, Inc.
13. Program Close Function (cont.)
Insert this code
21 July 2012 13 Copyrighted 2011 by LeverX, Inc.
14. Saving and Activating
Now you can save and activate you
screen and program we created earlier.
Do this by clicking the disc icon and the
light icon. (in that order)
When the inactive objects screen pops
up, ensure both your program and
screen are highlighted to activate both at
the same time. To do this click the box
next to the row that contains your items
that you created to highlight it.
Click the green checkmark to confirm
activation.
14 Copyrighted 2012 by LeverX, Inc.
15. Testing the Screen
Next to your report name, it should say
‘Active’. If it doesn’t you need to redo
previous step.
To test your work, click the wrench icon
next to the activate icon. Your code will
run and it will call your screen.
15 Copyrighted 2012 by LeverX, Inc.
16. Conclusion
You have now created a basic custom screen
There are many other elements that we didn’t discuss in this example. Take
time to review them to satisfy varying needs you may encounter.
Be sure to include the way to exit the screen or you will be forced to use
your computers task manager to close SAP
16 Copyrighted 2012 by LeverX, Inc.
17. Contact Information
Please contact us for more information about our services or solutions available.
LeverX, Inc.
800 West El Camino Real, Suite 180
Mountain View, CA 94040 USA
Tel: (650) 625 – 8347
Web Site: www.LeverX.com
17 Copyrighted 2012 by LeverX, Inc.