You are on page 1of 10

ABAP Programming Projects Project Management and Documentation

General All project files should be saved on a regular basis in your project folder on the network. Normally you should have a project folder for the course with subfolders for each project. Use the download utility in ABAP workbench to download your work from SAP. All programs should have a program header similar to the following. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Project "" # Airplane $ata Programmer% &our Name $ate% '()*+),''Program% .fmln/0*A/hello/world $escription% 1his program generates a list of the data that is in the table SP203 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Note that all program names start with a .. 1he ne4t -!5 characters are your initials)dana account. Ne4t is the Project 3$. 0ast is some name that identifies the program function. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! $ocument major sections of your program with blocks similar to this &ou can use dash6 solid or other types of lines to form the block !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! &ou can use single comment lines like this and inline comments using 7 to document a statement or groups of statements. Submitting projects Submit a copy of the source code and e4amples of e4ecutions. 84amples of e4ecutions should demonstrate testing of more than one scenario. 1est both friendly and unfriendly use to the e4tent that you program for unfriendly scenarios. Network Drive Set up a folder for this course on your network drive. 1he folder name should have the course number in it. Save your source to this folder as backup.

ABAP Projects Project - L A !ello "orld


Project #bjectives% Become familiar with ABAP workbench6 SAP 8nvironment6 and the mechanics of building and testing a program. Project $e%uirements% *9 8nter the :ello ;orld program from <eller p,= ,9 1est and show the result.

Project - L B Airline Database


Project #bjectives& Become familiar with the tables6 data6 and table relationships used in the airline database. Project $e%uirements% *9 >apture a graphic that contains the 8? diagram for most of the entities in the airline database ,9 >apture data element definitions for sflight6 spfli and sbook. -9 ;rite a list program to obtain a listing of sflight. $ownload this list to a spreadsheet. 59 ;rite a list program to obtain a listing of spfli. $ownload this list to a spreadsheet. +9 ;rite a list program to obtain a listing of sbook. @ptional ! $ownload this list to a spreadsheet. 1his file is rather large. =9 0ook at the content of sbook using the list in the data dictionary. >apture a screen showing the initial rows. Notes& *9 Use $ata Aodeler on 1ools # ;orkbench # $evelopment. 0ook up models starting with B>. Put in B> and use the drop down to get a list. ,9 Use B>/1ravel and graphic 3>@N to view the entire model. -9 Use data dictionary in S8B' or S8B+ to look at specific tables6 structure and content. Note the icons for graphic6 list and definition. 59 Use )n to get back to initial menu or )nseB+ to go direct to S8B+

Project ' L(A Basics A


Project #bjectives% Practice basic ABAP statements Project $e%uirements& *9 Accept two decimal CB.,9 amounts and two integer amount from the screen. ,9 Accept two character fields C*+9 from the screen

-9 Accept a date from the screen 59 Add6 subtract6 multiply and divide some combination of numbers. +9 $isplay the results =9 >ompare two numbers6 display messages on D6 E 6 and F G9 Set up a $o loop to add numbers from * to one of the integer inputs. B9 $isplay the amount (9 @btain the starting position of where one string starts in another string. *'9 >oncatenate two strings and display **9 $etermine how old you are by using the input date and todayHs date *,9 $isplay in years Cdecimal9 and in days

Project ' L(B Basics B


Project #bjectives% Practice basic ABAP statements and the >AS8 statement Project $e%uirements& *9 >reate a calculator program. ,9 1he program accepts two numbersCB.,9 and an operator that is I6 !6 6 )6 J -9 $isplay the inputs and the result. 59 1est for input errors and display an appropriate message. +9 Use a >AS8 statement on the operator. =9 >heck what happens on large e4ponential results. G9 $ivide by KeroL

Project L)A ' #verview List Program using AL* +List *iewer,
Project #bjective& @btain an overview of the ABAP programming environment using screens6 list and objects. Project $e%uirements& *9 Study6 enter and run the program starting on page -* of <eller. ,9 @btain source listing6 screen shots and output Notes% *9 1his project is a little advanced6 but it will give you some perspective of some of the overall framework of ABAP programming.

Project ' L)B Processing Blocks


Project #bjectives% Become familiar with ABAP program structure and processing blocks. Project $e%uirements% *9 ;rite the program on p=G of the <eller book. ,9 Show an e4ample of dead code -9 >apture an e4ample of the processing blocks. 59 ;hat are the event blocksL

Project L-A ' Simple lists A.


Project #bjectives% 1his project will give you some background on using a logical database in SAP6 programming SM0 Nueries6 database loop processing6 and simple selections screens. Project $e%uirements& *9 8nter the Airline Ccarrid9 and flight connection O2< to S2@ on a selection screen. ,9 Use the 0$B 2*S on the program attributes window. -9 Select selection screen values using the drop downs on the selection screen. 59 0ist the bookings for that flight Cuse table sbook9 Booking data can include bookid6 customid and loccuram. 2light data can include carrid6 connid and fldate. +9 Process bookings within sflight. =9 $o the project two ways CUsing the 0$B and using a SM0 statement9.

Project L-B ' Simple lists B.


Project #bjectives% 1his project will give you some background on processing multiple $B tables using SM0. Project $e%uirements& *9 8nter the Airline Ccarrid9 on the selection screen. ,9 8nter a date range on the selection screen # See data for date ranges -9 Process the bookings Csbook9 for that carrid by flight number and date Csflight9. C, select loops9 59 $o not display detail sbook rows. +9 Sum and display the total amount of revenue and number of bookings by flight =9 $isplay using some color. G9 $isplay headings. Sample Solution% See solution for 05>.

Project L-/ ' Lists / using a table.


Project #bjectives% 1his project will give you some perspective of processing multiple $B 1ables using a Ooin with an internal table. Project $e%uirements% *9 Similar to 05B e4cept you use a SM0 Ooin to load an internal table ,9 8nter the Airline Ccarrid9 and flight date range on the selection screen. -9 0ist the bookings for that carrid by flight number Cconnid9 by processing the internal table. 59 Add and display the total amount of revenue and number of bookings by flight +9 0oop processing on table =9 Use @N change of on keys carrid6 connid and fldate G9 Save keys in work area to print the correct keys being processed when there is a change. 1his is a little tricky. $onHt print first change Ccount E Kero9. Print last set when the loop is complete. Printing is on a delay. B9 $isplay lines using some color. Sample Solution

Project L-D ' Lists D.


Project #bjectives% 1his project will give you some perspective of processing multiple $B 1ables producing a list using some control break features. Project $e%uirements% *9 8nter the Airline Ccarrid9 and date range on the selection screen. ,9 0ist the bookings for that carrid by flight number. -9 Add and display the total amount of revenue and bookings by flight 59 $isplay lines using some color. +9 &ou choose your SM0 approach. =9 Use the 1@P @2 PAP8 and A1 N8; events for control break processing. G9 Use option buttons on selection screen for select $etail or Summary reporting B9 $etail lists the detail lines and summary6 Summary lists only the totals by flight.

Project L-0 ' Lists 0.


Project #bjectives% 1his project gives you some perspective on programming interactive lists C0ists with drill down capability9. Project $e%uirements& *9 No Selection Screen. ,9 0ist all the airlines Cscar9. -9 ;rite lines with hotspot. 59 @n selection of an airline6 display the flights Csflight9. a. city from6 city to6 date6 seats ma46 seats occ6 payment sum +9 @n selection of a flight6 display summary of bookings a. Number and total of local currency amount. =9 Use :3$8 to save keys necessary for the ne4t SM0

Project L1A ' Basic 2ables A.


Project #bjectives% 1his project covers introductory use of internal tables. Project $e%uirements& *9 0oad a table with flight data Cspfli9. ,9 0oad a table with carrier data Cscar9. -9 0oop through the flight data table 59 2or each flight in the flight data table. a. ?ead the carrier data for the carrid on that flight. b. Print carrid6 carrier name6 distance6 city from and cityto c. Program an option to use a $B select instead of a ?ead.

Project L1B ' Basic 2ables B.


Project #bjectives% 1his project introduces the concept of constructing and using internal tables. Project $e%uirements& *. 0oad a table with carrier data Cscarr9 ,. 0oop through the carrier data table -. Print carrier data with headings and a uline separating carrid groups. 5. 2or each carrier in the carrier table% d. 0oad data pertaining to that carrier from the spfli $B table into an internal table. e. 0oop thru this internal table printing connid6 cityfrom and cityto

Project L3A ' More 2ables A.


Project #bjectives% 1his project covers the use of internal tables. Project $e%uirements& +9 0oad a table with flight data Csflight9 =9 0oop through the flight data table G9 2or each flight in the flight data table6 select a summary from the flight booking $B table using an aggregate select. B9 $isplay the summary data by flight. a. city from6 city to 6 flight date6 seats available6 number of bookings6 total amount.

Project L3B ' More 2ables B.


Project #bjectives% 1his project produces the same solution as 0=A through different approach of using another internal table instead of an aggregate select. Project $e%uirements% *9 0oad a table with flight data Csflight9 ,9 0oad a table with booking data Csbook9. -9 Sort the booking data table 59 0oop through the flight data table +9 2or each flight in the flight data table6 read the first booking using a key. =9 Process the remaining booking records for that key adding up the number and the total amount. G9 $isplay the summary data by flight. a. city from6 city to 6 flight date6 seats available6 number of bookings6 total amount. Notes% *9 Set up one version using a standard table for booking data ,9 Set up a second version using a sorted table for booking data

Project L4 ' 5unctions and Sub $outines


Program #bjectives& 1he purpose of this project is to give you some e4perience with setting up program flow through the use of internal and e4ternal sub routines Cfunctions9. Project $e%uirements& *9 ;rite an include program that defines a data structure based on spfli. a. carrid6 conid6 cityfrom6 cityto6 deptime6 arrtime6 fltime6 distance6 avgspeed ,9 ;rite a function using the function builder to return the speed per hour using distance and flight time. -9 ;rite a program that uses the function and the include and prints the data from the table.

59 Set up the print routine in the program as an internal subroutine that you perform.

Project L6A ' /reate Database 2able


Program #bjectives& 1he purpose of this project is to give you some e4perience with setting up a database table in SAP. Project $e%uirements& *9 >reate a database table including related domains data elements and fields for airplane data. ,9 Airplane data consists of plane3$C-9 6 planetypeC-9 6 first class Cint96 coach rows Cint96 coach seats per row Cint96 Pate siKeC-9. Pate siKe is Sm6 Aed6 0g. Planetype is O81 or 1B@.

Project L6B ' Populate Database 2able


Program #bjectives& 1he purpose of this project is to give you some e4perience with setting up an interface to upload data to the database table you created. Project $e%uirements& *9 Use Pui/upload function module to upload a file of data to the database table. ,9 Use the open/file/dialog method in the cl/gui/frontend/services class to pop up a file selection window on the value reNuest help event for the file name field on the selection screen.

Project L6/ ' Database 2able 7nteractive 8pdate


Program #bjectives& 1he purpose of this project is to give you some e4perience with interactive data maintenance on a database table. Project $e%uirements& *9 Set up a screen with option buttons for add6 Nuery6 modify6 delete. Add fields for all the fields in the database table. ,9 ;rite a program to add6 Nuery6 modify and delete data in the database table.

Project L6D ' 8pload 09cel Data to SAP


Program #bjectives& 1he purpose of this project is to give you some e4perience in uploading data to SAP from an 84cel spreadsheet using a function module. Project $e%uirements&

*9 ;rite a program to upload data from 84cel using function module A0SA/8">80/1@/3N18?NA0/1AB08 and the spreadsheet downloaded from sflight. ,9 >reate an internal table and load the data from the upload into the internal table by row. -9 Print the internal table.

Project L :A ' /reate an Airplane /lass


Program #bjectives& 1he purpose of this project is to give you some e4perience in building a class using ABAP objects. Project $e%uirements& *9 >reate an airplane class with the attributes airplane 3$6 airplane type and gate siKe. $efine methods constructor and display airplane. 1he constructor method increments the static variable no/of/airplanes and loads the instance attributes with values. ,9 >reate a database class with the attributes airplane 3$6 airplane type6 gate siKe6 first class seats6 coach rows and coach seats and the method get airplane. -9 >reate a test program with a selection screen that accepts an airplane 3$. 59 >reate an instance of the database class. +9 >reate an instance of the airplane class using the get airplane method based on the airplane 3$.

Project L :B ' /reate an Airplane Sub /lasses


Program #bjectives& 1he purpose of this project is to give you some e4perience in building sub classes using ABAP objects. 1he sub classes will demonstrate inheritance and polymorphism. Project $e%uirements& *9 >reate a 1urbo subclass that inherits from the airplane class. ,9 1he 1urbo subclass has one attribute passenger capacity. -9 1he 1urbo subclass has a constructor method and a display capacity method. 59 1he constructor method uses the super constructor in airplane and loads the turbo instance attributes. +9 >reate a Oet subclass that inherits from the airplane class. =9 1he Oet subclass has the attributes first class seats6 coach rows and coach seats. G9 1he Oet subclass has a constructor method and a display capacity method. >apacity for the jet is first class I C coach rows coach seats 9. B9 1he constructor method uses the super constructor in airplane and loads the Oet instance attributes.

You might also like