5 - online programming ex_v1
TRANSCRIPT
-
7/30/2019 5 - Online Programming Ex_V1
1/30
SAP R/3 Release 4.6CExercises: OnLine Programming SAP Development ABAP Training
The following exercises are designed to help you understand online programming. Remember
that an online program can also be called a module pool program, a dialog program, or atransaction.
For many of the online programs you create, you will be using the YMOVIE database table thatcontains Academy Award information. We created this table for the purpose of demonstratingonline programming techniques. Keep in mind that the concepts you learn using the YMOVIEtable can be applied to any online program using any ABAP Dictionary table(s).
Each of the exercises contains a testing section. This is nota comprehensive test plan. Thequestions asked in this section for each program should be used to make sure the basics in yourprogram are functioning properly. If you can think of any other important testing conditions, feel
free to list them.
The solutions for the programming section can be found in development class Y220 . Ifyou are having trouble figuring out how an online program should work, execute the solutiononline program. Written solutions can be found in your ABAP manuals.
Before you begin EACH Online Programming exercises, you must create a newDevelopment Class and a new Change Request, so your work is stored as it might be on aclient project.To do this, find the sheet used for your first Development Class and Change Request Exercise anduse this if you need it to help you through creating the Development Class and Change Requestwith each exercise
May 2013
Page 1
-
7/30/2019 5 - Online Programming Ex_V1
2/30
SAP R/3 Release 4.6CExercises: OnLine Programming SAP Development ABAP Training
Chapter 2
Programming Section
Development Class: YXX1 (ensure you also create a new change request for this)Online program name:SAPMZxx1 (where xx is the last two digits of your logon id)Transaction code: Zxx1Initial screen: 9000Screen 9000: next screen = 9001Screen 9001: next screen = 9000
The purpose of this exercise is for you to create a simple online program to become familiar with
the basic components of an online program. As you are creating this online program, try toidentify each component you are creating: screen attributes, screen layout, field attributes, flowlogic, PBO modules, PAI modules, and global data.
This online program will act as an adding machine. On the initial screen (9000), the user willenter two integers. After pressing the Enter key, the user should be taken to the next screen(9001).
On this second screen, the two integers from the first screen will be displayed along with theresult of the addition operation. These three fields should be display fields only (i.e. the usershould not be able to enter values in these three fields). After pressing the Enter key, the user
should be taken back to the initial screen. The previous values should be cleared out when theuser returns to the initial screen.
All three integer fields should be eight bytes long.
An example of these two screens can be seen on the next page.
Dont forget you need to create a transaction code to execute this online program. Because youhave not learned how to code an exit in an online program, the easiest way to execute theprogram is to use a /o in the command field of the standard toolbar. By opening up anew session with your transaction, you can exit the transaction by closing the session. If you donot open a new session for your transaction, you can exit the transaction by using a /n or
/n in the command field of your transaction (e.g. a /nse80 will exit the transaction andtake you to the Object Browser).
Tip: Pressing the CTRL and TAB keys will move the cursor to the command field.
May 2013
Page 2
-
7/30/2019 5 - Online Programming Ex_V1
3/30
SAP R/3 Release 4.6CExercises: OnLine Programming SAP Development ABAP Training
Screen 9000
Screen 9001
May 2013
Page 3
-
7/30/2019 5 - Online Programming Ex_V1
4/30
SAP R/3 Release 4.6CExercises: OnLine Programming SAP Development ABAP Training
Testing Section
(1) Can you enter a number with decimals on the initial screen? (expected = no)
(2) Is the result being calculated correctly? (expected = yes)
(3) Are all three values displayed on the second screen? (expected = yes)
(4) Can you enter values on the second screen? (expected = no)
(5) Are the values cleared out when you return to the initial screen? (expected = yes)
(6) Does the program loop from screen 9000 to 9001 and back to 9000 as you press Enter?(expected = yes)
May 2013
Page 4
-
7/30/2019 5 - Online Programming Ex_V1
5/30
SAP R/3 Release 4.6CExercises: OnLine Programming SAP Development ABAP Training
Chapter 3
Programming Section
Development Class: YXX2 (ensure you also create a new change request for this)Online program name:SAPMZxx2 (where xx is the last two digits of your logon id)Transaction code: Zxx2Initial screen: 9000Screen 9000: next screen = 9001
The purpose of this exercise is for you to learn how to create the various graphical elements on ascreen: radio buttons, check boxes, frames, and pushbuttons. You will not code any logic into
this program. You should not spend more than 45 minutes on this program.
The Instructor input/output template should be 30-length character field. The Evaluationinput/output template should be a scrollable field with a defined length of 60 characters and avisible length of 30 characters. The Submit Evaluation pushbutton should have an icon and beassigned the function code EVAL.
May 2013
Page 5
-
7/30/2019 5 - Online Programming Ex_V1
6/30
SAP R/3 Release 4.6CExercises: OnLine Programming SAP Development ABAP Training
Testing Section
(1) Are the radio buttons mutually exclusive? (expected = yes)
(2) Is the Evaluation template scrollable? (expected = yes)
May 2013
Page 6
-
7/30/2019 5 - Online Programming Ex_V1
7/30
SAP R/3 Release 4.6CExercises: OnLine Programming SAP Development ABAP Training
Chapters 4-5
Programming Section
Development Class: YXX3 (ensure you also create a new change request for this)Online program name:SAPMZxx3 (where xx is the last two digits of your logon id)Transaction code: Zxx3Initial screen: 9000Screen 9000: next screen = 9001Screen 9001: next screen = 9000
The purpose of this exercise is for you to learn how to use ABAP Dictionary fields in an online
program. You will build upon this program in future exercises.
Screen 9000
On this initial screen, the user will enter a year and category. These fields (both the templatesand text labels) should be painted from the YMOVIE table. The year template should be arequired field. After pressing the Enter key, the user should be taken to the next screen (9001).
Screen 9001
On this second screen, the two values from the first screen will be displayed. These two fields
should be display fields only. Also on this screen, the winner, the five nominees, and the notesshould be displayed for the specified year and category. These fields (both the templates and textlabels) should be painted from the YMOVIE table. These fields should be both input andoutput fields. After pressing the Enter key, the user should be taken back to the initial screen.The previous values should be cleared out when the user returns to the initial screen.
An example of these two screens can be seen on the next page.
May 2013
Page 7
-
7/30/2019 5 - Online Programming Ex_V1
8/30
SAP R/3 Release 4.6CExercises: OnLine Programming SAP Development ABAP Training
Screen 9000
Screen 9001
May 2013
Page 8
-
7/30/2019 5 - Online Programming Ex_V1
9/30
SAP R/3 Release 4.6CExercises: OnLine Programming SAP Development ABAP Training
Testing Section
(1) Are PIC, MAL, and FEM the only acceptable entries for the category template on theinitial screen? (expected = yes)
(2) Is the year field required on the initial screen? (expected = yes)
(3) Is the proper record being selected from YMOVIE? (expected = yes) [note: look at the
table contents in the ABAP Dictionary (SE11) or Data Browser (SE16)]
(4) Are the winner, nominees, and notes fields open for input on the second screen? (expected =yes)
(5) Are the year and category fields display only on the second screen? (expected = yes)
(6) If you enter a non-existing record (e.g. 1910, PIC) on the initial screen, are the winner,nominees, and notes fields blank on the second screen? (expected = yes)
(7) Are the values cleared out when you return to the initial screen? (expected = yes)
(8) Does the program loop from screen 9000 to 9001 and back to 9000 as you press Enter?
(expected = yes)
May 2013
Page 9
-
7/30/2019 5 - Online Programming Ex_V1
10/30
SAP R/3 Release 4.6CExercises: OnLine Programming SAP Development ABAP Training
Chapters 6-8
Programming Section
Development Class: YXX4 (ensure you also create a new change request for this)Online program name:SAPMZxx4 (where xx is the last two digits of your logon id)Transaction code: Zxx4Initial screen: 9000Screen 9000: next screen = 9001Screen 9001: next screen = 9000
The purpose of this exercise is for you to learn how to use messages in an online program, flag
fields as open for input, and set default values and cursor positioning.
You should copy your SAPMZxx3 program to create program SAPMZxx4. First create thenew Development class, then select program SAPMZxx3 in the Object Browser and click on thecopy pushbutton (or use the Development object > Copy menu path). Make sure you select allthe components to copy (documentation, variants, GUI status, screens, includes). You will beprompted to create new include programs -- just click on the Copy pushbutton or press theEnter key. The Development Class screen should appear enter the new Development Classhere, and ensure the new Change Request is used.
The appearance of the screens will not change in this program. Add the following functionality:
Screen 9000
You need to code two checks into this screen. First, if the user enters an invalid year, anappropriate message (e.g. Invalid year) should force the user to make a change before movingon to the next screen. A year is invalid if it is before 1927 or after the current year. This currentyear should not be hard-coded (i.e. this year should be current for the time the transaction isexecuted). If the message is issued, the year and category fields should be open for input.
Second, if the user enters a record that does not exist, an appropriate message (e.g. No recordexists) should force the user to make a change before moving on to the next screen. If themessage is issued, the year and category fields should be open for input. The invalid year check
should occur before this one -- there is no reason to attempt to select the record if an invalid yearwas entered.
To issue these messages, you should create your own messages in your own message class (ID).See the table below for your assigned message classes.Screen 9000 (cont.)
May 2013
Page 10
-
7/30/2019 5 - Online Programming Ex_V1
11/30
SAP R/3 Release 4.6CExercises: OnLine Programming SAP Development ABAP Training
Default values should appear in the year and category fields on the initial screen. Use parameter
IDs to accomplish this task.
Screen 9001
The cursor should be positioned in the notes field.
Message Classes (IDs)
User Message ID* User Message ID*
ABAP01 Y1 ABAP21 YB
ABAP02 Y2 ABAP22 YDABAP03 Y3 ABAP23 YE
ABAP04 Y4 ABAP24 YF
ABAP05 Y5 ABAP25 YG
ABAP06 Y6 ABAP26 YH
ABAP07 Y7 ABAP27 YI
ABAP08 Y8 ABAP28 YJ
ABAP09 Y9 ABAP29 YK
ABAP10 Y0 ABAP30 YL
ABAP11 Z1 ABAP31 ZE
ABAP12 Z2 ABAP32 ZF
ABAP13 Z3 ABAP33 ZG
ABAP14 Z4 ABAP34 ZH
ABAP15 Z5 ABAP35 ZI
ABAP16 Z6 ABAP36 ZK
ABAP17 Z7 ABAP37 ZL
ABAP18 Z8 ABAP38 ZM
ABAP19 Z9 ABAP39 ZN
ABAP20 Z0 ABAP40 ZO
* If the message class you try to create already exists, just pick another one that is not on this list.
May 2013
Page 11
-
7/30/2019 5 - Online Programming Ex_V1
12/30
SAP R/3 Release 4.6CExercises: OnLine Programming SAP Development ABAP Training
Testing Section
* this section will only test for new functionality
(1) If an invalid year is entered, is an appropriate error message displayed and the year andcategory fields left open for input? (expected = yes)
[Dont forget to test the boundaries here. 1927 should pass the year check, but 1926should not. Likewise, 1997 should pass the year check, but 1998 should not.]
(2) If a record does not exist, is an appropriate error message displayed and the year and
category fields left open for input? (expected = yes)
(3) When either check fails, does the user have to make a change to move on to the next screen?(expected = yes)
(4) Do default values appear in the year and category fields? (expected = yes)
(5) On the second screen, is the cursor positioned on the notes field? (expected = yes)
May 2013
Page 12
-
7/30/2019 5 - Online Programming Ex_V1
13/30
SAP R/3 Release 4.6CExercises: OnLine Programming SAP Development ABAP Training
Chapters 9-10
Programming Section
Development Class: YXX5 (ensure you also create a new change request for this)Online program name:SAPMZxx5 (where xx is the last two digits of your logon id)Transaction code: Zxx5Initial screen: 9000Screen 9000: next screen = 9000Screen 9001: next screen = 9001Screen 9002 (dialog box): next screen = 9002
The purpose of this exercise is for you to learn how to use a Graphical User Interface (GUI) in anonline program and how to dynamically determine the screen sequence based on the usersactions.
You should copy your SAPMZxx4 program to create program SAPMZxx5. First create thenew development class, then select program SAPMZxx4 in the Object Browser and click on thecopy pushbutton (or use the Development object > Copy menu path). Make sure you select allthe components to copy (documentation, variants, GUI status, screens, includes). You will beprompted to create new include programs -- just click on the Copy pushbutton or press theEnter key. The Development Class screen should appear - enter the new Development Classhere, and ensure the new Change Request is used.
The GUI for this program will include the following function codes:
Function Code Description Function Type
ADD Add Record
EDIT Edit Record
EXIT Exit E
INIT Initial Screen E
MODI Modify Record
RET Return to Calling Screen
The screen descriptions and screen prints below will help you determine which of these functioncodes is used on what GUI status. Remember the GUI status type depends on the screen type.
The titlebar of each screen should be: Academy Awards.
The next screen attribute for each screen should be itself.
Do not use SY-UCOMM in this program.
May 2013
Page 13
-
7/30/2019 5 - Online Programming Ex_V1
14/30
SAP R/3 Release 4.6CExercises: OnLine Programming SAP Development ABAP Training
Screen 9000
This screen should use the GUI status FIRST with the following function codes: EXIT, EDIT,and ADD.
With the Edit Record and Add Record pushbuttons, the user determines whether to insert anew record or update an existing record based on the specified year and category. If the userclicks on the Edit Record pushbutton (which invokes the EDIT function code), an errormessage should be issued if the record does not exist. If the user clicks on the Add Recordpushbutton (which invokes the ADD function code), an error message should be displayed if therecord already exists. Once this check is passed, and the invalid year check from the previous
example, the user should be taken to screen 9001. It is on screen 9001 where the user will add oredit the record.
If the user clicks on the Exit pushbutton (which invokes the EXIT function code), thetransaction should be terminated.
If the user presses the Enter key, the user should not be taken to the next screen.
May 2013
Page 14
-
7/30/2019 5 - Online Programming Ex_V1
15/30
SAP R/3 Release 4.6CExercises: OnLine Programming SAP Development ABAP Training
Screen 9001
This screen should use the GUI status SECOND with the following function codes: EXIT,INIT, and MODI.
On this screen, the user will ultimately be able to insert or update a record with the ModifyRecord pushbutton. You will not add this functionality to the MODI function code until thenext example.
If the user clicks on the Exit pushbutton (which invokes the EXIT function code), thetransaction should be terminated. If the user clicks on the Initial Screen pushbutton (whichinvokes the INIT function code), the user should be taken back to screen 9000. If the user
presses the Enter key, the user should not be taken back to screen 9000.
You will need to add two new fields to this screen. First, the critic template should be paintedfrom the YMOVIE table (only the template should be painted, not the key word). This fieldshould be a display only field. Second, you should create the Enter Critic pushbutton and assignit the function code NAME. If the user clicks on the Enter Critic pushbutton (which invokesthe NAME function code), the user should be taken to screen 9002 (a dialog box).
May 2013
Page 15
-
7/30/2019 5 - Online Programming Ex_V1
16/30
SAP R/3 Release 4.6CExercises: OnLine Programming SAP Development ABAP Training
Screen 9002
You will have to create this new screen. It is a dialog box that will be called from screen 9001.The only two fields on this screen should be painted from the YMOVIE table. You wantboth the critic template and critic key word.
This screen should use the GUI status THIRD with the function code RET. This functioncode should be assigned to the Enter key.
If the user presses the Enter key (which invokes the RET function code), the user should betaken back to the calling screen.
DO NOT FORGET TO CODE A WAY OUT OF THIS DIALOG BOX!!!
May 2013
Page 16
-
7/30/2019 5 - Online Programming Ex_V1
17/30
SAP R/3 Release 4.6CExercises: OnLine Programming SAP Development ABAP Training
Testing Section
* this section will only test for new functionality
(1) If the user clicks on the Exit pushbutton on screen 9000 or 9001, is the transactionterminated? (expected = yes)
(2) If the user clicks on the Initial Screen pushbutton on screen 9001, is the user returned toscreen 9000? (expected = yes)
(3) If the user clicks on the Edit Record pushbutton on screen 9000 and the record does notexist, is an appropriate error message displayed and the year and category fields left open forinput? (expected = yes)
(4) If the user clicks on the Add Record pushbutton on screen 9000 and the record alreadyexists, is an appropriate error message displayed and the year and category fields left open forinput? (expected = yes)
(5) If the user clicks on the Add Record pushbutton on screen 9000 and the record does notexist, is the user taken to screen 9001 with all the fields (except the year and category) blank?(expected = yes)
[A good way to test this one completely is to try to add an existing record (e.g. 1994,PIC). You should get an error message. Then, change the year and category to one thatdoes not exist and click on Add again. All the fields (except the year and category)should be blank on screen 9001.]
(5) Is the critic field display only on screen 9001? (expected = yes)
May 2013
Page 17
-
7/30/2019 5 - Online Programming Ex_V1
18/30
SAP R/3 Release 4.6CExercises: OnLine Programming SAP Development ABAP Training
(6) If the user clicks on the Enter Name pushbutton on screen 9001, is the user taken to the
dialog box screen 9002? (expected = yes)
(7) If the user hits the Enter key on screen 9002, is the user taken back to screen 9001 with theappropriate critic displayed? (expected = yes)
May 2013
Page 18
-
7/30/2019 5 - Online Programming Ex_V1
19/30
SAP R/3 Release 4.6CExercises: OnLine Programming SAP Development ABAP Training
Chapters 12-14
Programming Section
Development Class: YXX6 (ensure you also create a new change request for this)Online program name:SAPMZxx6 (where xx is the last two digits of your logon id)Transaction code: Zxx6Initial screen: 9000Screen 9000: next screen = 9000Screen 9001: next screen = 9001Screen 9002 (dialog box): next screen = 9002
The purpose of this exercise is for you to learn how to conditionally execute modules, update orinsert a record in the database, and use the logical locking mechanism.
You should copy your SAPMZxx5 program to create program SAPMZxx6. First create thenew Development Class, then select program SAPMZxx5 in the Object Browser and click on thecopy pushbutton (or use the Development object > Copy menu path). Make sure you select allthe components to copy (documentation, variants, GUI status, screens, includes). You will beprompted to create new include programs -- just click on the Copy pushbutton or press theEnter key. The Development Class screen should appear enter the new Development Classhere, and ensure the new Change Request is used.
The appearance of the screens will not change in this program. Make sure that the EXIT andINIT function codes on your GUI are defined as type E function codes.
To use the logical locking mechanism, you can use the existing lock object EZ_MOVIEXX oryou can create your own. If you create your own lock object, it should be namedEZ_MOVIExx (where xx is the last two digits of your logon id). Remember that a lock objectis an ABAP Dictionary object.
Add the following functionality to the program:
Screen 9000
If the user clicks on the Exit pushbutton (which invokes the EXIT function code of type E),the transaction should be terminated even before the automatic screen field checks occur.
If the user clicks on the Edit Record or Add Record pushbutton and the record is currentlylocked, an error message should be issued (e.g. This record is currently locked). If this errormessage is displayed, the year and category fields should be open for input.
Screen 9001
May 2013
Page 19
-
7/30/2019 5 - Online Programming Ex_V1
20/30
SAP R/3 Release 4.6CExercises: OnLine Programming SAP Development ABAP Training
If the user clicks on the Modify Record pushbutton (which invokes the MODI function code):
(1) the record will be updated in the database if the user had clicked on the Edit Recordpushbutton (EDIT function code) on the initial screen
or
(2) the record will be insertedinto the database if the user had clicked on the AddRecord pushbutton (ADD function code) on the initial screen.
If the update/insert is successful, the changes should be confirmed to the database and the user
should be taken back to screen 9000. If the update/insert is not successful, the changes should becanceled and the user should be taken back to screen 9000. You can display appropriatemessages for each scenario, but make sure that the user can return to the initial screen (i.e. do notuse an error or abend message).
If the user clicks on the Exit pushbutton (which invokes the EXIT function code of type E),the transaction should be terminated even before the automatic screen field checks occur.
If the user clicks on the Initial Screen pushbutton (which invokes the INIT function code oftype E), the user should be taken back to screen 9000 even before the automatic screen fieldchecks occur.
Before the user returns to screen 9000, the record should be unlocked. Remember that you willhave more than one way back to the initial screen.
May 2013
Page 20
-
7/30/2019 5 - Online Programming Ex_V1
21/30
SAP R/3 Release 4.6CExercises: OnLine Programming SAP Development ABAP Training
Testing Section
* this section will only test for new functionality
(1) If the user clicks on the Exit pushbutton on screen 9000 or 9001, is the transactionterminated before any automatic screen field checks occur? (expected = yes)
(2) If the user clicks on the Initial Screen pushbutton on screen 9001, is the user returned toscreen 9000 before any automatic screen field checks occur? (expected = yes)
(3) Are records being locked and unlocked correctly? (expected = yes)[A good way to test this one is to have multiple sessions running the transaction. Withmultiple transactions, you can try to edit/add a record that is currently locked. Once youdetermine that the locking is working, make sure that the records are being unlocked.]
(4) Is the record being updated/inserted? (expected = yes)
May 2013
Page 21
-
7/30/2019 5 - Online Programming Ex_V1
22/30
SAP R/3 Release 4.6CExercises: OnLine Programming SAP Development ABAP Training
Chapter 15
Programming Section
Development Class: YXX7 (ensure you also create a new change request for this)Online program name:SAPMZxx7 (where xx is the last two digits of your logon id)Transaction code: Zxx7Initial screen: 9000Screen 9000: next screen = 9000Screen 9001: next screen = 9001Screen 9002 (dialog box): next screen = 9002Screen 9003: next screen = 9000
The purpose of this exercise is for you to learn how to create and use a step-loop block. Youshould not code this program until you have caught up on your other exercises. However,you should understand the concept of step-loops before going back to your other exercises.
You should copy your SAPMZxx6 program to create program SAPMZxx7. First create thenew Development Class, then select program SAPMZxx6 in the Object Browser and click on thecopy pushbutton (or use the Development object > Copy menu path). Make sure you select allthe components to copy (documentation, variants, GUI status, screens, includes). You will beprompted to create new include programs -- just click on the Copy pushbutton or press theEnter key. The new Development Class screen should appear enter the new Development
Class here, and ensure the new Change Request is used.
Screen 9000
Add the Winners for Year pushbutton to the GUI. This pushbutton should be assigned theLOOP function code. If the user clicks on the Winners for Year pushbutton, the user shouldbe taken to screen 9003 to display all the winners for the specified year. If no winners exist forthe specified year, an appropriate error message should be issued.
Screen 9003
You will have to create this new screen. It is a normal type screen and its next screenattribute should be 9000.
May 2013
Page 22
-
7/30/2019 5 - Online Programming Ex_V1
23/30
SAP R/3 Release 4.6CExercises: OnLine Programming SAP Development ABAP Training
This screen should use the GUI status FOURTH with the function code INIT.
The text label and template for the year should be painted from the YMOVIE table. Thecategory/winner block should be created as a fixedstep loop block. The values in the step-loopblock are the winners in each category for the year specified on the initial screen. No processingtakes place on this screen. The appropriate values are just displayed to the user. All fields on thisscreen are display only fields.
If the user presses the Enter key, the user should be taken back to screen 9000. If the userclicks on Initial Screen pushbutton, the user should be taken back to screen 9000.
May 2013
Page 23
-
7/30/2019 5 - Online Programming Ex_V1
24/30
SAP R/3 Release 4.6CExercises: OnLine Programming SAP Development ABAP Training
Testing Section
* this section will only test for new functionality
(1) If the user clicks on the Winners for Year pushbutton on screen 9000 and at least onerecord exists for the specified year, is the user taken to screen 9003? (expected = yes)
(2) If the user clicks on the Winners for Year pushbutton on screen 9000 and no records existfor the specified year, is the appropriate error message issued? (expected = yes)
(3) Are the correct values being placed in the step-loop fields? (expected = yes)
(4) If the user presses the Enter key on screen 9003, is the user taken back to screen 9000?(expected = yes)
Chapter 16
May 2013
Page 24
-
7/30/2019 5 - Online Programming Ex_V1
25/30
SAP R/3 Release 4.6CExercises: OnLine Programming SAP Development ABAP Training
Programming Section
Development Class: YXX8 (ensure you also create a new change request for this)Online program name:SAPMZxx8 (where xx is the last two digits of your logon id)Transaction code: Zxx8Initial screen: 9000Screen 9000: next screen = 9000Screen 9001: next screen = 9001Screen 9100 (Subscreen): next screen = 9100
In this exercise, you will create and program which uses a tabstrip control that changes with theapplication server. Your tabstrip control will return fields from the YMOVIE table based on a
year that the user enters in screen 9000 and which tab is selected in screen 9001. All your tabswill display the same fields in subscreen 9100.
Screen 9000
Screen 9001
May 2013
Page 25
-
7/30/2019 5 - Online Programming Ex_V1
26/30
SAP R/3 Release 4.6CExercises: OnLine Programming SAP Development ABAP Training
Chapter 16
Programming Section
May 2013
Page 26
-
7/30/2019 5 - Online Programming Ex_V1
27/30
SAP R/3 Release 4.6CExercises: OnLine Programming SAP Development ABAP Training
Development Class: YXX9 (ensure you also create a new change request for this)Online program name:SAPMZxx9 (where xx is the last two digits of your logon id)Transaction code: Zxx9Initial screen: 9000Screen 9000: next screen = 9000Screen 9001: next screen = 9001Screen 9100 (Subscreen):Screen 9101 (Subscreen):
In this exercise, you will create and program which uses a tabstrip control that changes withoutthe application server. Your tabstrip control will return fields from the YMOVIE table based on
the year and category that the user enters in screen 9000. Remember, all field held within thetabstrip must be populated before the tabstrip screen is displayed. In your tabstrip, you will havetwo tabs. One will hold the information of a winner for a specific category, while the other holdsnominee information.
9000
9001 (Winner)
May 2013
Page 27
-
7/30/2019 5 - Online Programming Ex_V1
28/30
SAP R/3 Release 4.6CExercises: OnLine Programming SAP Development ABAP Training
9001 (Nominees)
Chapter 17 (Table Control)
Programming Section
May 2013
Page 28
-
7/30/2019 5 - Online Programming Ex_V1
29/30
SAP R/3 Release 4.6CExercises: OnLine Programming SAP Development ABAP Training
Development Class: YXX10 (ensure you also create a new change request for this)
Online program name:SAPMZxx10 (where xx is the last two digits of your logon id)Transaction code: Zxx10Initial screen: 9000Screen 9000: next screen = 9001Screen 9001: next screen = 9001
In this exercise, you will create a program which uses a table control. Your table control willdisplay (in screen 9001), fields from the YMOVIE table based on a year that the user enters inscreen 9000. The YMOVIE fields to display in screen 9001 are: AAYEAR, CATEGORY,WINNER, NAME1, NAME2, NAME3, NAME4 and NAME5. The year and category columnsare fixed columns, while the others are scrollable.
9000
For this screens PAI, you should select records for the chosen year and put those records in aninternal table.
May 2013
Page 29
-
7/30/2019 5 - Online Programming Ex_V1
30/30
SAP R/3 Release 4.6CExercises: OnLine Programming SAP Development ABAP Training
9001
Choose the table control size so that it can show two records. In the PBO for this screen, youshould loop through the internal table containing the records and display them in the table control.