Upload
leverx
View
2.547
Download
8
Tags:
Embed Size (px)
DESCRIPTION
Create a new custom screen using SAP screen painter and review option available.
Citation preview
1
Essential SAP Tutorial
SAP ABAP Basics:Creating a Custom Screen
with Screen PainterBy Robert Tomlinson
SAP Technical ConsultantCopyrighted 2012 by LeverX, Inc.
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.
Open Transaction SE38
3 Copyrighted 2012 by LeverX, Inc.
Transaction SE38 is where you can create custom programs
Creating Program to Run Screen
4 Copyrighted 2012 by LeverX, Inc.
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’
5
Next popup screen you will just click local object
Creating Program to Run Screen (cont.)
21 July 2012 Copyrighted 2012 by LeverX, Inc.
In the program write ‘CALL SCREEN 0100 STARTING AT 10 10.’ and save
Double click the ‘0100’ and click ‘Yes’ when prompted
6
Once the screen painter opens, enter short description and click ‘Layout’
This will open up the actual screen painter to add elements
Screen Painter
Copyrighted 2012 by LeverX, Inc.
Screen Painter (cont.)
7
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)
Copyrighted 2012 by LeverX, Inc.
Screen Painter (cont.)
8
1. Add a button by clicking icon and clicking anywhere on light grey area
2. Type in name ‘close button’ and ‘close’ for text
Copyrighted 2012 by LeverX, Inc.
9
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.
Element Icons
Copyrighted 2012 by LeverX, Inc.
10 Copyrighted 2011 by LeverX, Inc.
Field Attributes
21 July 2012
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.
11 Copyrighted 2011 by LeverX, Inc.
Program Close Function
21 July 2012
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
12 Copyrighted 2011 by LeverX, Inc.
Program Close Function (cont.)
21 July 2012
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
13 Copyrighted 2011 by LeverX, Inc.
Program Close Function (cont.)
21 July 2012
Insert this code
14
Saving and Activating
Copyrighted 2012 by LeverX, Inc.
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.
15
Testing the Screen
Copyrighted 2012 by LeverX, Inc.
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.
Conclusion
16 Copyrighted 2012 by LeverX, Inc.
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
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 USATel: (650) 625 – 8347
Web Site: www.LeverX.com17 Copyrighted 2012 by LeverX, Inc.