Sie sind auf Seite 1von 8

ABAP Programming Projects Project Management and Documentation General All project files should be saved on a regular basis

in your project folder on t he network. Normally you should have a project folder for the course with subfo lders 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 XX Airplane Data *Programmer: Your Name *Date: 09/15/2003 *Program: Zfmln_L1A_hello_world *Description: This program generates a list of the data that is in the table SP FLI *-----------------------------------------------------------------------------------------------* Note that all program names start with a Z. The next 3-4 characters are your in itials/dana account. Next is the Project ID. Last is some name that identifies the program function. *----------------------------------------------------------------------------------------------* * Document major sections of your program with blocks similar to this * You can use dash, solid or other types of lines to form the block *----------------------------------------------------------------------------------------------* * You can use single comment lines like this and inline comments using * to document a statement or groups of statements. Submitting projects Submit a copy of the source code and examples of executions. Examples of execut ions should demonstrate testing of more than one scenario. Test both friendly a nd unfriendly use to the extent that you program for unfriendly scenarios. Network Drive Set up a folder for this course on your network drive. The folder name should h ave the course number in it. Save your source to this folder as backup. ABAP Projects Project - L1A Hello World Project Objectives: Become familiar with ABAP workbench, SAP Environment, and t he mechanics of building and testing a program. Project Requirements: 1) Enter the Hello World program from Keller p26 2) Test and show the result. Project - L1B Airline Database

Project Objectives: Become familiar with the tables, data, and table relationsh ips used in the airline database. Project Requirements: 1) Capture a graphic that contains the ER diagram for most of the entities in the airline database 2) Capture data element definitions for sflight, spfli and sbook. 3) Write a list program to obtain a listing of sflight. Download this list to a spreadsheet. 4) Write a list program to obtain a listing of spfli. Download this list t o a spreadsheet. 5) Write a list program to obtain a listing of sbook. Optional - Download this list to a spreadsheet. This file is rather large. 6) Look at the content of sbook using the list in the data dictionary. Cap ture a screen showing the initial rows. Notes: 1) Use Data Modeler on Tools Workbench Development. Look up models startin g with BC. Put in BC* and use the drop down to get a list. 2) Use BC_Travel and graphic ICON to view the entire model. 3) Use data dictionary in SE80 or SE85 to look at specific tables, structur e and content. Note the icons for graphic, list and definition. 4) Use /n to get back to initial menu or /nse85 to go direct to SE85 Project L2A Basics A

Project Objectives: Practice basic ABAP statements Project 1) 2) 3) 4) 5) 6) 7) 8) 9) g. 10) 11) 12) Project Requirements: Accept two decimal (8.2) amounts and two integer amount from the screen. Accept two character fields (15) from the screen Accept a date from the screen Add, subtract, multiply and divide some combination of numbers. Display the results Compare two numbers, display messages on >, = , and < Set up a Do loop to add numbers from 1 to one of the integer inputs. Display the amount Obtain the starting position of where one string starts in another strin Concatenate two strings and display Determine how old you are by using the input date and today s date Display in years (decimal) and in days L2B Basics B

Project Objectives: Practice basic ABAP statements and the CASE statement Project 1) 2) ^ 3) 4) 5) 6) 7) Requirements: Create a calculator program. The program accepts two numbers(8.2) and an operator that is +, -, *, /, Display the inputs and the result. Test for input errors and display an appropriate message. Use a CASE statement on the operator. Check what happens on large exponential results. Divide by zero?

Project L3A

Overview List Program using ALV (List Viewer)

Project Objective: Obtain an overview of the ABAP programming environment using screens, list and objects. Project Requirements: 1) Study, enter and run the program starting on page 31 of Keller. 2) Obtain source listing, screen shots and output Notes: 1) This project is a little advanced, but it will give you some perspective of some of the overall framework of ABAP programming. Project L3B Processing Blocks

Project Objectives: Become familiar with ABAP program structure and processing blocks. Project 1) 2) 3) 4) Requirements: Write the program on p67 of the Keller book. Show an example of dead code Capture an example of the processing blocks. What are the event blocks? Simple lists A.

Project L4A

Project Objectives: This project will give you some background on using a logic al database in SAP, programming SQL queries, database loop processing, and simpl e selections screens. Project Requirements: 1) Enter the Airline (carrid) and flight connection JFK to SFO on a selecti on screen. 2) Use the LDB F1S on the program attributes window. 3) Select selection screen values using the drop downs on the selection scr een. 4) List the bookings for that flight (use table sbook) Booking data can in clude bookid, customid and loccuram. Flight data can include carrid, connid and fldate. 5) Process bookings within sflight. 6) Do the project two ways (Using the LDB and using a SQL statement). Project L4B Simple lists B.

Project Objectives: This project will give you some background on processing mu ltiple DB tables using SQL. Project Requirements: 1) Enter the Airline (carrid) on the selection screen. 2) Enter a date range on the selection screen See data for date ranges 3) Process the bookings (sbook) for that carrid by flight number and date ( sflight). (2 select loops) 4) Do not display detail sbook rows. 5) Sum and display the total amount of revenue and number of bookings by fl ight 6) Display using some color. 7) Display headings.

Sample Solution: See solution for L4C.

Project L4C

Lists C using a table.

Project Objectives: This project will give you some perspective of processing m ultiple DB Tables using a Join with an internal table. Project Requirements: 1) Similar to L4B except you use a SQL Join to load an internal table 2) Enter the Airline (carrid) and flight date range on the selection screen . 3) List the bookings for that carrid by flight number (connid) by processin g the internal table. 4) Add and display the total amount of revenue and number of bookings by fl ight 5) Loop processing on table 6) Use ON change of on keys carrid, connid and fldate 7) Save keys in work area to print the correct keys being processed when th ere is a change. This is a little tricky. Don t print first change (count = zero ). Print last set when the loop is complete. Printing is on a delay. 8) Display lines using some color. Sample Solution

Project L4D

Lists D.

Project Objectives: This project will give you some perspective of processing m ultiple DB Tables producing a list using some control break features. Project Requirements: 1) Enter the Airline (carrid) and date range on the selection screen. 2) List the bookings for that carrid by flight number. 3) Add and display the total amount of revenue and bookings by flight 4) Display lines using some color. 5) You choose your SQL approach. 6) Use the TOP OF PAGE and AT NEW events for control break processing. 7) Use option buttons on selection screen for select Detail or Summary repo rting 8) Detail lists the detail lines and summary, Summary lists only the totals by flight. Project L4E Lists E.

Project Objectives: This project gives you some perspective on programming inte ractive lists (Lists with drill down capability). Project 1) 2) 3) 4) a. 5) a. 6) Requirements: No Selection Screen. List all the airlines (scar). Write lines with hotspot. On selection of an airline, display the flights (sflight). city from, city to, date, seats max, seats occ, payment sum On selection of a flight, display summary of bookings Number and total of local currency amount. Use HIDE to save keys necessary for the next SQL

Project L5A

Basic Tables A.

Project Objectives: This project covers introductory use of internal tables. Project 1) 2) 3) 4) a. b. c. Requirements: Load a table with flight data (spfli). Load a table with carrier data (scar). Loop through the flight data table For each flight in the flight data table. Read the carrier data for the carrid on that flight. Print carrid, carrier name, distance, city from and cityto Program an option to use a DB select instead of a Read. Basic Tables B.

Project L5B

Project Objectives: This project introduces the concept of constructing and usi ng internal tables. Project Requirements: 1. Load a table with carrier data (scarr) 2. Loop through the carrier data table 3. Print carrier data with headings and a uline separating carrid groups. 4. For each carrier in the carrier table: d. Load data pertaining to that carrier from the spfli DB table into an int ernal table. e. Loop thru this internal table printing connid, cityfrom and cityto

Project L6A

More Tables A.

Project Objectives: This project covers the use of internal tables. Project Requirements: 5) Load a table with flight data (sflight) 6) Loop through the flight data table 7) For each flight in the flight data table, select a summary from the flig ht booking DB table using an aggregate select. 8) Display the summary data by flight. a. city from, city to , flight date, seats available, number of bookings, t otal amount. Project L6B More Tables B.

Project Objectives: This project produces the same solution as L6A through diff erent approach of using another internal table instead of an aggregate select. Project 1) 2) 3) 4) 5) key. 6) and the 7) Requirements: Load a table with flight data (sflight) Load a table with booking data (sbook). Sort the booking data table Loop through the flight data table For each flight in the flight data table, read the first booking using a Process the remaining booking records for that key adding up the number total amount. Display the summary data by flight.

a. city from, city to , flight date, seats available, number of bookings, t otal amount. Notes: 1) Set up one version using a standard table for booking data 2) Set up a second version using a sorted table for booking data Project L8 Functions and Sub Routines

Program Objectives: The purpose of this project is to give you some experience with setting up program flow through the use of internal and external sub routin es (functions). Project Requirements: 1) Write an include program that defines a data structure based on spfli. a. carrid, conid, cityfrom, cityto, deptime, arrtime, fltime, distance, avg speed 2) Write a function using the function builder to return the speed per hour using distance and flight time. 3) Write a program that uses the function and the include and prints the d ata from the table. 4) Set up the print routine in the program as an internal subroutine that y ou perform. Project L9A Create Database Table

Program Objectives: The purpose of this project is to give you some experience with setting up a database table in SAP. Project Requirements: 1) Create a database table including related domains data elements and fiel ds for airplane data. 2) Airplane data consists of planeID(3) , planetype(3) , first class (int), coach rows (int), coach seats per row (int), Gate size(3). Gate size is Sm, M ed, Lg. Planetype is JET or TBO. Project L9B Populate Database Table

Program Objectives: The purpose of this project is to give you some experience with setting up an interface to upload data to the database table you created. Project Requirements: 1) Use Gui_upload function module to upload a file of data to the database table. 2) Use the open_file_dialog method in the cl_gui_frontend_services class t o pop up a file selection window on the value request help event for the file na me field on the selection screen.

Project L9C

Database Table Interactive Update

Program Objectives: The purpose of this project is to give you some experience with interactive data maintenance on a database table. Project 1) fields 2) ble. Requirements: Set up a screen with option buttons for add, query, modify, delete. Add for all the fields in the database table. Write a program to add, query, modify and delete data in the database ta

Project L9D

Upload Excel Data to SAP

Program Objectives: The purpose of this project is to give you some experience in uploading data to SAP from an Excel spreadsheet using a function module. Project Requirements: 1) Write a program to upload data from Excel using function module ALSM_EXC EL_TO_INTERNAL_TABLE and the spreadsheet downloaded from sflight. 2) Create an internal table and load the data from the upload into the inte rnal table by row. 3) Print the internal table. Project L10A Create an Airplane Class

Program Objectives: The purpose of this project is to give you some experience in building a class using ABAP objects. Project Requirements: 1) Create an airplane class with the attributes airplane ID, airplane type and gate size. Define methods constructor and display airplane. The constructor method increments the static variable no_of_airplanes and loads the instance att ributes with values. 2) Create a database class with the attributes airplane ID, airplane type, gate size, first class seats, coach rows and coach seats and the method get airp lane. 3) Create a test program with a selection screen that accepts an airplane I D. 4) Create an instance of the database class. 5) Create an instance of the airplane class using the get airplane method b ased on the airplane ID. Project L10B Create an Airplane Sub Classes

Program Objectives: The purpose of this project is to give you some experience in building sub classes using ABAP objects. The sub classes will demonstrate in heritance and polymorphism. Project Requirements: 1) Create a Turbo subclass that inherits from the airplane class. 2) The Turbo subclass has one attribute passenger capacity. 3) The Turbo subclass has a constructor method and a display capacity metho d. 4) The constructor method uses the super constructor in airplane and loads the turbo instance attributes. 5) Create a Jet subclass that inherits from the airplane class. 6) The Jet subclass has the attributes first class seats, coach rows and co ach seats. 7) The Jet subclass has a constructor method and a display capacity method. Capacity for the jet is first class + ( coach rows * coach seats ). 8) The constructor method uses the super constructor in airplane and loads the Jet instance attributes.

Das könnte Ihnen auch gefallen