Professional Documents
Culture Documents
ABAB Assignment
ABAB Assignment
BCO3350
ERP PROGRAMMING CONCEPTS
: 0909D3VIS001
M.Sasireka
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'.
*-----------------------------------------------------------------------*
*Variable Declaration
M.Sasireka
5/12/2009
*-----------------------------------------------------------------------*
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: ' NO-GAP, (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 SFLIGHTFLDATE, 40 SFLIGHT-PRICE, 60 SFLIGHT-SEATSOCC, 75 AV_SEAT,
135 ' '.
ENDSELECT.
IF SY-SUBRC <> 0.
M.Sasireka
5/12/2009
OUTPUT
M.Sasireka
5/12/2009
M.Sasireka
5/12/2009
DOCUMENTATION
Purpose
M.Sasireka
5/12/2009
M.Sasireka
5/12/2009