Vous êtes sur la page 1sur 9

VICTORIA UNIVERSITY

BACHELOR OF BUSINESS (INFORMATION TECHNOLOGY)

BCO3350
ERP PROGRAMMING CONCEPTS

Student Name : Manimarpan Sasireka


Student ID

: 0909D3VIS001

R/3 User Name: A-1010


Program Name : YA1010A3
Program Title : Airline Flights & Bookings Report

M.Sasireka

5/12/2009 5:44:00 AM

PSEUDOCODE
Print system information date and time.
Skip
underline
Print page number and airline name
Skip
underline
Print table headings
Skip
underline
Start of Selection
Select record from table: sflight where Carrier id = airline
and Airline Connection id = flight
order by Seats Sccupied descending
Seats available = Maximum capacity in economy class Occupied seats in economy
class
Skip
Print flight details
Endselect
Skip
end-of-selection
If no records found
Print error message
Stop
skip
Endif
Print total number of flights listed
Skip
Print total number of seats available
Skip

M.Sasireka

5/12/2009

Start of Selection
Select record from table: sflight where Carrier id = airline
and Airline Connection id = flight order by Seats Sccupied descending
Seats available = highest capability in economy class taken seats in economy class
Print flight details
Endselect
Skip
Print system information date and time, Print page number
Skip
Select record from table: scustom where Customer id = sbook Customer id
Endselect
Select record from table: sflight where Carrier id = sbook Carrier id
Endselect
Print booking details
Endselect
Print total number of passengers listed
At line selection
If sy-lsind = 1
window starting at 10 5
window ending at 60 10
Print flight details
Elseif sy-lsind = 2
window starting at 10 5
window ending at 60 10
Print plane details
Endif

M.Sasireka

5/12/2009

PROGRAM CODE
*&---------------------------------------------------------------------*
*& Report YA1010A3
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT YA1010A3.
*-----------------------------------------------------------------------*
*Constants Declaration
*-----------------------------------------------------------------------*
TOP-OF-PAGE.
format color col_negative intensified.
WRITE: 'List of Flights as at:', SY-UZEIT, SY-DATUM.
*-----------------------------------------------------------------------*
*Constants Declaration
*-----------------------------------------------------------------------*
CONSTANTS: EOL TYPE I VALUE 90.
*-----------------------------------------------------------------------*
*Table Declaration
*-----------------------------------------------------------------------*
TABLES: SFLIGHT, SBOOK, SCUSTOM,SCARR, SPFLI, SAPLANE.
*-----------------------------------------------------------------------*
*Parameters Declaration
*-----------------------------------------------------------------------*
PARAMETERS: AIRLINE LIKE SFLIGHT-CARRID DEFAULT 'SQ',
FLIGHT LIKE SFLIGHT-CONNID DEFAULT '0002'.
*-----------------------------------------------------------------------*
M.Sasireka

5/12/2009

*Variable Declaration
*-----------------------------------------------------------------------*
DATA: AV_SEAT TYPE I,
TOT_SEAT TYPE I,
A_NAME(20) TYPE C.
ULINE.
*-----------------------------------------------------------------------*
*Main Heading
*-----------------------------------------------------------------------*
FORMAT COLOR = 5.
SELECT SINGLE * FROM SCARR WHERE CARRID = AIRLINE.
WRITE: / 'Flights with Seat Availability for', 36 SCARR-CARRNAME, 120 'Page: ' NOGAP, (2)SY-PAGNO, 135 ' '.
ULINE.
format color col_heading.
WRITE: /'Carrier', 10'Connection', 25'Flight', 40'Ticket', 60'Seats', 80'Seats', 135 '
', AT EOL SPACE.
WRITE: /'Id', 10'Id',
25'Date', 40'Price', 60'Occupied', 80'Available', 135 ' ',
AT EOL SPACE.
ULINE.
SKIP.
*-----------------------------------------------------------------------*
*Table Selection
*-----------------------------------------------------------------------*
START-OF-SELECTION.
format color col_normal intensified off.
SELECT * FROM SFLIGHT WHERE CARRID = AIRLINE AND CONNID = FLIGHT.
AV_SEAT = SFLIGHT-SEATSMAX - SFLIGHT-SEATSOCC.
TOT_SEAT = TOT_SEAT + AV_SEAT.
WRITE: / SFLIGHT-CARRID, 10 SFLIGHT-CONNID, 30 SFLIGHT-FLDATE, 40 SFLIGHTPRICE, 60 SFLIGHT-SEATSOCC, 75 AV_SEAT, 135 ' '.
ENDSELECT.

M.Sasireka

5/12/2009

IF SY-SUBRC <> 0.
WRITE / 'No Record of Flight details Found.'.
EXIT.
ENDIF.
SKIP.
FORMAT COLOR = 7.
WRITE:/ SY-DBCNT, 'Flights Listed', 60 TOT_SEAT, 80 'seats available'.
SKIP.
*-----------------------------------------------------------------------*
*At Line-Selection
*-----------------------------------------------------------------------*
AT LINE-SELECTION.
IF SY-LSIND = 1.
WINDOW STARTING AT 10 5 ENDING AT 60 10.
SKIP.
WRITE: /12'Departure :', SPFLI-CITYFROM, 30 ' '.
SKIP.
WRITE: /12'Destination :', SPFLI-CITYTO.
SKIP 2.
WRITE: /12'Departure time :', SPFLI-DEPTIME.
ELSEIF SY-LSIND = 2.
WINDOW STARTING AT 10 5 ENDING AT 60 10.
skip.
WRITE: /12'Plane Type :', SAPLANE-PLANETYPE.
SKIP.
WRITE: /12'Plane Weight :', SAPLANE-WEIGHT.
SKIP.
WRITE: /12'Operation Speed :', SAPLANE-OP_SPEED.
ENDIF.

M.Sasireka

5/12/2009

OUTPUT

M.Sasireka

5/12/2009

M.Sasireka

5/12/2009

DOCUMENTATION
Purpose

To display information by user selected airline and flight number. Information that
will be displayed are airline carrier code, connection id, flight date, ticket price,
economy class occupied seats, economy class available seats, customer bookings,
flight details and plane details.
Features

Drill down using Function Keys and to display in new Window


Selection

Select from SFLIGHT, SCARR, SCUSTOM, SPFLI AND SBOOK.


Standard Variants

Parameters, Select, Case and If.


Output

Display information by user selected airline and flight number. Two new windows
are displaying the flight and plane details in that order.
Activities

Linking all four tables to display the required information as by user selected in
airline and flight number.

M.Sasireka

5/12/2009

Vous aimerez peut-être aussi