SlideShare una empresa de Scribd logo
1 de 13
Descargar para leer sin conexión
ASSESSMENT DECLARATION
This form must be completed, signed, dated and attached to each assessment task that you submit for marking.
FACULTY OF BUSINESS AND LAW
1. ADMINISTRATIVE DETAILS
STUDENT NAME: Marlon Capuno STUDENT ID NUMBER
UNIT OF STUDY: BCO5647 Application Programming Techniques
TITLE OF ASSESSMENT: Assignment 3
DATE DUE: 21 Aug 2009 DATE SUBMITTED: : 21 Aug 2009
LECTURER’S NAME (HIGHER EDUCATION ONLY): Brendan
TEACHER/TUTORS NAME: Jaya TUTORIAL/CLASS TIME:
2. COMPULSORY STUDENT DECLARATION
Plagiarism means using another person’s intellectual output and presenting it (without appropriate acknowledgement of the
author or source) as one’s own.
Plagiarism constitutes academic misconduct. Where there are reasonable grounds for believing that this has occurred,
disciplinary procedures as outlined in the Policy for Academic Honesty and Preventing Plagiarism will be instituted.
PLEASE TICK TO INDICATE THAT YOU HAVE SATISFIED THESE REQUIREMENTS-
□ I have read the policy on Academic Honesty and Preventing Plagiarism and the relevant referencing guides (or
have had this explained to me by my teachers) and understand the consequences of committing academic
misconduct as outlined in the policy.
□ This assignment is my own work, I have not participated in collusion, nor have I previously submitted this or a
version of it for assessment in any other Unit of Study at the University or any other institution without having
obtained the approval of the teacher.
□ I have taken proper and reasonable care to prevent this work from being copied by another student.
□ So that the assessor can properly assess my work, I give this person permission to act according to University
policy and practice to reproduce this work and provide a copy to another member of staff for the purpose of cross
checking and moderation and to take steps to authenticate the assessment, including submitting a copy to a
checking/detection system that in turn may retain a copy of this work on a database for future checking.
□ I have carefully read the assessment criteria that will be used to evaluate my work as given below -
ASSESSMENT CRITERIA
You have been given the link to an online news article.
La Poste
http://fscavo.blogspot.com/2009/02/big-win-for-open-source-erp-project.html
You are to assume the role of CIO/IT Manager for the organization in the article.
1. Why do you think that the organization wants this project (what are the expected benefits)? Include those that
are stated in the article, plus any others that you can think of.
2. What is the current state of the IS at the organization, and how may this influence the project?
3. What things will you need to do to ensure success of both the project and the ongoing use of the new system.
You are encouraged to make assumptions where needed as long as you make it clear that you have done so. All
answers must be supported by evidence (e.g. references from literature).
Each group member must contribute 500 – 1000 words each. Indicate at the top of each section who has written
it.
I certify that the statements I have attested to above have been made in good faith and are true and correct. I also certify
that this is my work and that I have not plagiarized the work of others and not participated in collusion.
STUDENT SIGNATURE: ________________________________________________ DATE: ____/____/____
BCO5647
Application Programming Techniques
Assignment 3
Program Name: YA1545A3
Username : A-1514
Submitted by:
Marlon Capuno (S3826942)
Aug 21, 2009
School of Management & Information Systems
I. PROGRAM NAME : YA1545A3
II. USERNAME : A-1545
III. HARD COPY OF PROGRAM CODE
*&---------------------------------------------------------------------*
*& Report YA1545A3
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT YA1545A3 no STANDARD PAGE HEADING line-size 100.
tables: sflight, scarr, spfli, saplane, sbook, scustom.
PARAMETERS: carrid like sflight-carrid,
flightno like sflight-connid.
*----------------------------------------------------------------------*
* Data Type Declaration
*----------------------------------------------------------------------*
*Variable Declaration
DATA: line_size TYPE i VALUE 100,
totalSeatsMax TYPE i VALUE 0,
totalSeatsOcc TYPE i VALUE 0,
availableSeats TYPE i VALUE 0,
totalAvailableSeats TYPE i VALUE 0,
totalFlight TYPE i VALUE 0,
airline TYPE string,
datetime TYPE string,
seatsleft TYPE i value 0,
ans type string,
classname type string,
classcode type c,
iflag type i value 0,
icount type i VALUE 0,
str1 type string,
str2 type string.
concatenate sy-uzeit ' ' sy-datum into datetime.
START-OF-SELECTION.
SET PF-STATUS 'LIST'.
SET TITLEBAR '100' WITH sy-uzeit sy-datum.
*Define the itab for Booking Details
DATA: BEGIN OF itabBooking occurs 0,
carrid LIKE sbook-carrid,
connid LIKE sbook-connid,
fldate LIKE sbook-fldate,
bookid LIKE sbook-bookid,
customid LIKE sbook-customid,
name LIKE scustom-name,
class LIKE sbook-class,
loccuram LIKE sbook-loccuram,
END OF itabBooking.
SELECT sbook~carrid sbook~connid sbook~fldate sbook~bookid sbook~customid scus
tom~name sbook~class sbook~loccuram
FROM sbook INNER JOIN scustom ON sbook~customid = scustom~id into table itab
Booking.
*Define the itab for Flight Details
DATA: BEGIN OF itabFlightDet occurs 0,
carrid like spfli-carrid,
connid like spfli-connid,
cityto LIKE spfli-cityto,
cityfrom LIKE spfli-cityto,
deptime like spfli-deptime,
END OF itabFlightDet.
select carrid connid cityto cityfrom deptime from spfli INTO table itabFlightD
et.
*Define the itab for Plane Details
DATA: BEGIN OF itabPlaneDet OCCURS 0,
planetype LIKE saplane-planetype,
weight LIKE saplane-weight,
op_speed LIKE saplane-op_speed,
speed_unit LIKE saplane-speed_unit,
wei_unit LIKE saplane-wei_unit,
END of itabPlaneDet.
SELECT planetype weight op_speed speed_unit wei_unit from saplane INTO TABLE
itabPlaneDet.
*Define the itab for Flight List
DATA: begin of itabFlight occurs 0,
carrid LIKE sflight-carrid,
connid LIKE sflight-connid,
fldate LIKE sflight-fldate,
price LIKE sflight-price,
seatsocc LIKE sflight-seatsocc,
seatsmax LIKE sflight-seatsmax,
seatsocc_f LIKE sflight-seatsocc_f,
carrname LIKE scarr-carrname,
planetype LIKE sflight-planetype,
END OF itabFlight.
SELECT sflight~carrid sflight~connid sflight~fldate sflight~price sflight~seat
socc
sflight~seatsmax sflight~seatsocc_f scarr~carrname sflight~planetype
from sflight inner join scarr on sflight~carrid = scarr~carrid into table it
abFlight where sflight~carrid = carrid and
sflight~connid = flightno.
"Use to check fo a record
totalFlight = sy-dbcnt.
"Get the country
READ table itabFlight index 5.
airline = itabFlight-carrname.
*----------------------------------------------------------------------*
* Print Report Heading
*----------------------------------------------------------------------*
ULINE.
WRITE: / sy-
vline, 'Flights with Seat Availability for : ', airline,
75 'Page : ', sy-pagno, at line_size sy-vline.
ULINE.
FORMAT COLOR 1 INTENSIFIED ON.
WRITE: / sy-
vline, 'Carrier Connection Flight Ticket Seats
Seats', at line_size sy-vline.
WRITE: / sy-
vline, 'Id Id Date Price Occupied
Available', at line_size sy-vline.
FORMAT COLOR OFF.
ULINE.
"Check if there is a record
if sy-subrc <> 0.
"Display this message if there's no flight details
write: / sy-
vline, 'There is no flight detail for airline selected', at line_size sy-
vline.
uline.
else.
"This loop is for the purpose of sorting the internal
LOOP AT itabFlight.
PERFORM ALTER_itabFlight.
"APPEND itabFlight.
ENDLOOP.
"Sort itab bia number of available seats
sort itabFlight by seatsocc_f.
LOOP AT itabFlight.
"availableSeats = itabFlight-seatsmax - itabFlight-seatsocc.
WRITE : / sy-vline, itabFlight-carrid, at line_size sy-vline,
13 itabFlight-connid, at line_size sy-vline,
30 itabFlight-fldate, at line_size sy-vline,
40 itabFlight-price, at line_size sy-vline,
55 itabFlight-seatsocc, at line_size sy-vline,
71 itabFlight-seatsocc_f, at line_size sy-vline.
totalAvailableSeats = totalAvailableSeats + itabFlight-seatsocc_f.
HIDE: itabFlight-carrid, itabFlight-connid, itabFlight-planetype, itabFlight-
fldate.
ENDLOOP.
WRITE: / sy-vline, at line_size sy-vline.
ULINE.
ENDIF.
"This is to prevent displaying anything when a wrong field is selected
end-of-SELECTION.
clear : itabFlight-carrid,
itabFlight-connid,
itabFlight-planetype,
itabFlight-fldate.
AT user-COMMAND.
CASE SY-UCOMM.
WHEN 'FDET'.
"Set the Menu and title bar for Flight Details
SET PF-STATUS 'DIAL'.
SET TITLEBAR '102' WITH itabFlight-carrid itabFlight-connid.
"Initialize a window dialogue box
WINDOW STARTING AT 5 3
ENDING AT 40 10.
"Select Single, to get the value from Flight details
READ TABLE itabFlightDet
with key carrid = carrid
connid = flightno.
WRITE : / 'Departure :'.
FORMAT COLOR 3 INTENSIFIED ON.
WRITE 18 itabFlightDet-cityfrom HOTSPOT ON.
FORMAT COLOR OFF.
WRITE : / 'Destination :'.
FORMAT COLOR 3 INTENSIFIED ON.
WRITE 18 itabFlightDet-cityto HOTSPOT ON.
FORMAT COLOR OFF.
WRITE : / 'Time :'.
FORMAT COLOR 3 INTENSIFIED ON.
WRITE 18 itabFlightDet-deptime HOTSPOT ON.
FORMAT COLOR OFF.
WHEN 'PDET'.
"Set the Menu and title bar for Plane Details
SET PF-STATUS 'DIAL3'.
SET TITLEBAR '103' with itabFlight-carrid itabFlight-
connid 'Departing' itabFlight-fldate.
"Initialize a window dialogue box
WINDOW STARTING AT 5 3
ENDING AT 60 10.
"Read single itab for plane detail
READ TABLE itabPlaneDet
with key planetype = itabFlight-planetype.
WRITE : / 'Plane Type : '.
FORMAT COLOR 3 INTENSIFIED ON.
write: itabPlaneDet-planetype HOTSPOT ON.
FORMAT COLOR OFF.
WRITE : / 'Plane Weight : '.
FORMAT COLOR 3 INTENSIFIED ON.
write itabPlaneDet-weight.
FORMAT COLOR OFF.
write: ' ', itabPlaneDet-wei_unit.
WRITE : / 'Operation Speed: '.
FORMAT COLOR 3 INTENSIFIED ON.
write itabPlaneDet-op_speed.
FORMAT COLOR OFF.
write: ' ', itabPlaneDet-speed_unit.
WHEN 'BOOK'.
"call subroutine Bookings ans pass a value 0
PERFORM BOOKINGS using 0.
ENDCASE.
"Check for user menu selection
AT USER-COMMAND.
CASE sy-ucomm.
WHEN 'SORTN'. "for sorting via Name
sort itabBooking by name.
PERFORM BOOKINGS using 0.
WHEN 'SORTB'. "for sorting via booking number
sort itabBooking by bookid.
PERFORM BOOKINGS using 0.
WHEN 'ECON'. "to filter all the Economy flight
sort itabBooking by name.
PERFORM BOOKINGS using 1.
endcase.
AT LINE-SELECTION.
"This subrouting loops through the internal table to check for the carrid, con
nid and flightdate based
"on the selected criteria of the user
FORM BOOKINGS using iflag.
"Set the Menu and title bar for Booking Details
SET PF-STATUS 'DIAL4'.
set TITLEBAR '104' with sy-uzeit sy-datum.
"Call a subroutine to format the header
PERFORM HEADING.
"This flag is used to check which itab procedure to be executed
"0 = for sorting ; 1 = for filtering to show only economy
if iflag = 0.
LOOP at itabBooking
where carrid = itabFlight-carrid and
connid = itabFlight-connid and
fldate = itabFlight-fldate.
"This subroutine returns the class description
PERFORM getClassName using itabBooking-class CHANGING classname.
write: / sy-vline, itabBooking-bookid, at line_size sy-vline,
15 itabBooking-customid, at line_size sy-vline,
32 itabBooking-name, at line_size sy-vline,
55 classname,at line_size sy-vline,
67 itabBooking-loccuram,at line_size sy-vline.
icount = icount + 1.
ENDLOOP.
else.
LOOP at itabBooking
where carrid = itabFlight-carrid and
connid = itabFlight-connid and
fldate = itabFlight-fldate AND
class = 'Y'.
PERFORM getClassName using itabBooking-class CHANGING classname.
write: / sy-vline, itabBooking-bookid, at line_size sy-vline,
15 itabBooking-customid, at line_size sy-vline,
32 itabBooking-name, at line_size sy-vline,
55 classname,at line_size sy-vline,
67 itabBooking-loccuram,at line_size sy-vline.
icount = icount + 1.
ENDLOOP.
endif.
WRITE: / sy-vline, at line_size sy-vline.
WRITE: / sy-vline, icount, ' passengers listed', at line_size sy-vline.
"Display the message if there is no booking for the passenger
if icount = 0.
Write : / sy-
vline, 'Sorry there is no Booking available for this passenger.'.
else.
icount = 0.
endif.
ULINE.
ENDFORM.
FORM HEADING.
*----------------------------------------------------------------------*
* Print Report Heading
*----------------------------------------------------------------------*
ULINE.
WRITE: / sy-vline, 'Booking Report', 75 'Page : ', sy-pagno, at line_size sy-
vline.
ULINE.
FORMAT COLOR 2 INTENSIFIED ON.
WRITE: / sy-vline, 'Flight Conection : ', 25 itabFlight-carrid, 29 itabFlight-
connid, at line_size sy-vline.
WRITE: / sy-vline, 'Departure Date :', 25 itabFlight-
fldate, at line_size sy-vline.
FORMAT COLOR OFF.
ULINE.
FORMAT COLOR 1 INTENSIFIED ON.
WRITE: / sy-
vline, 'Booking No Customer No Customer Name Class Tick
et Price', at line_size sy-vline.
FORMAT COLOR OFF.
ULINE.
ENDFORM.
"This subroutine is use to calculate the available seat and modify one column
in itabFlight to contain
"the computed value of available seats
FORM ALTER_itabFlight.
seatsleft = itabFlight-seatsmax - itabFlight-seatsocc.
READ TABLE itabFlight.
MOVE seatsleft to itabFlight-seatsocc_f.
MODIFY itabFlight INDEX sy-tabix.
CLEAR itabFlight.
seatsleft = 0.
ENDFORM.
"FORM CHECK_CLASS using sclass type string changing classname.
FORM GETCLASSNAME using classcode CHANGING classname.
case itabBooking-class.
when 'Y'.
classname = 'Economy'.
when 'F'.
classname = 'First'.
when 'C'.
classname = 'Business'.
ENDCASE.
ENDFORM.
IV. OUTPUT REPORT
BASIC LIST
BOOKINGS
FLIGHT DETAILS
PLANE DETAILS
V. PROGRAM DOCUMENTATION
Purpose
The program display the Airline Flight Details based on the Airline Carrier and Flight Number that
the user selected. More information is given if user will click on the menu provided like Booking,
Flight Detail and Plane Detail.
Integration
N/A
Prerequisites
sflight, scarr, spfli, saplane, sbook, scustom.
Features
The program provides an easy way of drilling down using button and function keys. Internal
tables are use to improve the performance.
Selection
At the point of loading the internal table, a criteria was added to only load records based on the
airline carrier and flight number the user selected
Standard Variants
N/A
Output
The output of the program displays the airline carrier and details like ticket price, departure date,
seats available which is a computed field. Besides the basic list, the program drills down to
booking, flight and plane details by using customized buttons.
Activities
Calculated for the number of seats and uses several sub routine to perform task that are
repeated to reduce programming codes.
Example
*Not the whole list
VI. PSEUDOCODE
START PROGRRAM
READ CARRIER ID AND FLIGHT NUMBER
INITIALIZE VARIABLES
INITIALIZE INTERNAL TABLES
LOAD TABLES INTO INTERNAL TABLES
FORMAT HEADING
FORMAT FLIGHT DETAIL MENU
SET TITLEBAR
REPEAT
READ RECORD FROM AIRLINE FLIGHT DETAIL INTERNAL TABLE SORT BY SEATS AVAILABLE
COMPUTE FOR THE SEATS AVAILABLE
IF NO RECORD
DISPLAY ‘THERE IS NO FLIGHT DETAILS FOR THE COUNTRY SELECTED’
ELSE
DISPLAY CARRIER ID, CONNECION ID, FLIGT DATE, TICKET PRICE, SEATS OCCUPIED, SEATS AVAILABLE
ENDIF
UNTIL END OF FILE
AT USER BUTTON SELECTION
CASE BUTTON SELECTION
BOOKING:
FORMAT BOOKING MENU
SET TITLEBAR
REPEAT
READ FROM BOOKING TABLE WHERE CARRID = FLIGHT DETAIL CARRIER ID AND
CONNID = FLIGHT DETAIL CONNID AND
FLDATE = FLIGHT DETAIL FLDATE
DISPLAY BOOKING NO, CUSTOMER NO, CUSTOMER NAME, CLASS, TICKET PRICE
DO UNTIL END OF FILE
AT USER BUTTON SELECTION
CASE BUTTON SELECTION
SORT BY NAME
SORT BOOKING INTERNAL TABLE BY NAME
DISPLAY BOOKING NO, CUSTOMER NO, CUSTOMER NAME, CLASS, TICKET PRICE
SORT BY BOOKING NO
SORT BOOKING INTERNAL TABLE BY BOOKIN NUMBER
DISPLAY BOOKING NO, CUSTOMER NO, CUSTOMER NAME, CLASS, TICKET PRICE
FILTER ECONOMY CLASS
READ INTERNAL TABLE WHERE CLASS IS EQUAL TO ECONOMY
DISPLAY BOOKING NO, CUSTOMER NO, CUSTOMER NAME, CLASS, TICKET PRICE
END CASE
PLANE DETAILS:
FORMAT PLANE DETAIL MENU
SET TITLEBAR
OPEN WINDOWS DIALOGUE
DISPLAY PLANE TYPE, PLANE WEIGHT, OPERATION SPEED
FLIGHT DETAILS
FORMAT FLIGHT DETAIL MENU
SET TITLEBAR
OPEN WINDOWS DIALOGUE
DISPLAY DEPARTURE, DESTINATION, DEPARTURE TIME
END CASE

Más contenido relacionado

Destacado

Breakfast@Bright - Productgarantie en productaansprakelijkheid
Breakfast@Bright - Productgarantie en productaansprakelijkheidBreakfast@Bright - Productgarantie en productaansprakelijkheid
Breakfast@Bright - Productgarantie en productaansprakelijkheid
Bright Advocaten
 
EASE T1D Awareness Flyer 2
EASE T1D Awareness Flyer 2EASE T1D Awareness Flyer 2
EASE T1D Awareness Flyer 2
Debbie George
 
визуализация
визуализациявизуализация
визуализация
vilka81
 
P1 e1 internet
P1 e1 internetP1 e1 internet
P1 e1 internet
rajon14
 
Problem solving 5x5 grid
Problem solving   5x5 gridProblem solving   5x5 grid
Problem solving 5x5 grid
grade4biss
 

Destacado (12)

Breakfast@Bright - Productgarantie en productaansprakelijkheid
Breakfast@Bright - Productgarantie en productaansprakelijkheidBreakfast@Bright - Productgarantie en productaansprakelijkheid
Breakfast@Bright - Productgarantie en productaansprakelijkheid
 
M,arc
M,arcM,arc
M,arc
 
EASE T1D Awareness Flyer 2
EASE T1D Awareness Flyer 2EASE T1D Awareness Flyer 2
EASE T1D Awareness Flyer 2
 
Test
TestTest
Test
 
EXAMEN PRÁCTICO DE COMPUTACION 2DO BIM
EXAMEN PRÁCTICO DE COMPUTACION 2DO BIMEXAMEN PRÁCTICO DE COMPUTACION 2DO BIM
EXAMEN PRÁCTICO DE COMPUTACION 2DO BIM
 
визуализация
визуализациявизуализация
визуализация
 
P1 e1 internet
P1 e1 internetP1 e1 internet
P1 e1 internet
 
Problem solving 5x5 grid
Problem solving   5x5 gridProblem solving   5x5 grid
Problem solving 5x5 grid
 
Proyecto de vida
Proyecto de vidaProyecto de vida
Proyecto de vida
 
Packed Lunch
Packed LunchPacked Lunch
Packed Lunch
 
Caso de éxito: Enhanced Ecommerce en el Sector Educación
Caso de éxito: Enhanced Ecommerce en el Sector EducaciónCaso de éxito: Enhanced Ecommerce en el Sector Educación
Caso de éxito: Enhanced Ecommerce en el Sector Educación
 
Examen practico de computacion 2DO BIM
Examen practico de computacion 2DO BIM Examen practico de computacion 2DO BIM
Examen practico de computacion 2DO BIM
 

Similar a s3826943_Assignment3_BCO56471

The California Supreme Court ruled that an employer will be liable.docx
The California Supreme Court ruled that an employer will be liable.docxThe California Supreme Court ruled that an employer will be liable.docx
The California Supreme Court ruled that an employer will be liable.docx
mehek4
 
Aviation ProgramsAMT 460 Aircraft Dispatch Practical Cours.docx
Aviation ProgramsAMT 460 Aircraft Dispatch Practical Cours.docxAviation ProgramsAMT 460 Aircraft Dispatch Practical Cours.docx
Aviation ProgramsAMT 460 Aircraft Dispatch Practical Cours.docx
celenarouzie
 
Student Lab Activity A. Lab # CIS CIS170A-A1B. Lab.docx
Student Lab Activity A. Lab # CIS CIS170A-A1B. Lab.docxStudent Lab Activity A. Lab # CIS CIS170A-A1B. Lab.docx
Student Lab Activity A. Lab # CIS CIS170A-A1B. Lab.docx
emelyvalg9
 
TitleABC123 Version X1Macroeconomic TermsECO372 Ve.docx
TitleABC123 Version X1Macroeconomic TermsECO372 Ve.docxTitleABC123 Version X1Macroeconomic TermsECO372 Ve.docx
TitleABC123 Version X1Macroeconomic TermsECO372 Ve.docx
edwardmarivel
 
DocumentationJH
DocumentationJHDocumentationJH
DocumentationJH
Jamie Hamm
 

Similar a s3826943_Assignment3_BCO56471 (20)

Automate sap security user audit
Automate sap security user auditAutomate sap security user audit
Automate sap security user audit
 
The California Supreme Court ruled that an employer will be liable.docx
The California Supreme Court ruled that an employer will be liable.docxThe California Supreme Court ruled that an employer will be liable.docx
The California Supreme Court ruled that an employer will be liable.docx
 
Analysis
AnalysisAnalysis
Analysis
 
Learning & using new technology
Learning & using new technologyLearning & using new technology
Learning & using new technology
 
Learning & using new technology
Learning & using new technologyLearning & using new technology
Learning & using new technology
 
Ip bus Akshay
Ip bus AkshayIp bus Akshay
Ip bus Akshay
 
Analysis
AnalysisAnalysis
Analysis
 
Cmps 260, fall 2021 programming assignment #3 (125 points)
Cmps 260, fall 2021 programming assignment #3 (125 points)Cmps 260, fall 2021 programming assignment #3 (125 points)
Cmps 260, fall 2021 programming assignment #3 (125 points)
 
Bco1102 case study project report
Bco1102 case study project reportBco1102 case study project report
Bco1102 case study project report
 
Amp 434 Exceptional Education / snaptutorial.com
Amp 434  Exceptional Education / snaptutorial.comAmp 434  Exceptional Education / snaptutorial.com
Amp 434 Exceptional Education / snaptutorial.com
 
Aviation ProgramsAMT 460 Aircraft Dispatch Practical Cours.docx
Aviation ProgramsAMT 460 Aircraft Dispatch Practical Cours.docxAviation ProgramsAMT 460 Aircraft Dispatch Practical Cours.docx
Aviation ProgramsAMT 460 Aircraft Dispatch Practical Cours.docx
 
Software engineering srs library management assignment
Software engineering srs library management assignmentSoftware engineering srs library management assignment
Software engineering srs library management assignment
 
Budgeting in SCRUM by Divante
Budgeting in SCRUM by DivanteBudgeting in SCRUM by Divante
Budgeting in SCRUM by Divante
 
Student Lab Activity A. Lab # CIS CIS170A-A1B. Lab.docx
Student Lab Activity A. Lab # CIS CIS170A-A1B. Lab.docxStudent Lab Activity A. Lab # CIS CIS170A-A1B. Lab.docx
Student Lab Activity A. Lab # CIS CIS170A-A1B. Lab.docx
 
TitleABC123 Version X1Macroeconomic TermsECO372 Ve.docx
TitleABC123 Version X1Macroeconomic TermsECO372 Ve.docxTitleABC123 Version X1Macroeconomic TermsECO372 Ve.docx
TitleABC123 Version X1Macroeconomic TermsECO372 Ve.docx
 
Cmgt 410 cmgt410 cmgt 410 education for service uopstudy.com
Cmgt 410 cmgt410 cmgt 410 education for service   uopstudy.comCmgt 410 cmgt410 cmgt 410 education for service   uopstudy.com
Cmgt 410 cmgt410 cmgt 410 education for service uopstudy.com
 
Comp 220 lab 3
Comp 220 lab 3Comp 220 lab 3
Comp 220 lab 3
 
DocumentationJH
DocumentationJHDocumentationJH
DocumentationJH
 
Loading cost in primavera schedule using resources and expenses r01
Loading cost in primavera schedule using resources and expenses r01Loading cost in primavera schedule using resources and expenses r01
Loading cost in primavera schedule using resources and expenses r01
 
IRJET- Career Counselling Chatbot
IRJET-  	  Career Counselling ChatbotIRJET-  	  Career Counselling Chatbot
IRJET- Career Counselling Chatbot
 

s3826943_Assignment3_BCO56471

  • 1. ASSESSMENT DECLARATION This form must be completed, signed, dated and attached to each assessment task that you submit for marking. FACULTY OF BUSINESS AND LAW 1. ADMINISTRATIVE DETAILS STUDENT NAME: Marlon Capuno STUDENT ID NUMBER UNIT OF STUDY: BCO5647 Application Programming Techniques TITLE OF ASSESSMENT: Assignment 3 DATE DUE: 21 Aug 2009 DATE SUBMITTED: : 21 Aug 2009 LECTURER’S NAME (HIGHER EDUCATION ONLY): Brendan TEACHER/TUTORS NAME: Jaya TUTORIAL/CLASS TIME: 2. COMPULSORY STUDENT DECLARATION Plagiarism means using another person’s intellectual output and presenting it (without appropriate acknowledgement of the author or source) as one’s own. Plagiarism constitutes academic misconduct. Where there are reasonable grounds for believing that this has occurred, disciplinary procedures as outlined in the Policy for Academic Honesty and Preventing Plagiarism will be instituted. PLEASE TICK TO INDICATE THAT YOU HAVE SATISFIED THESE REQUIREMENTS- □ I have read the policy on Academic Honesty and Preventing Plagiarism and the relevant referencing guides (or have had this explained to me by my teachers) and understand the consequences of committing academic misconduct as outlined in the policy. □ This assignment is my own work, I have not participated in collusion, nor have I previously submitted this or a version of it for assessment in any other Unit of Study at the University or any other institution without having obtained the approval of the teacher. □ I have taken proper and reasonable care to prevent this work from being copied by another student. □ So that the assessor can properly assess my work, I give this person permission to act according to University policy and practice to reproduce this work and provide a copy to another member of staff for the purpose of cross checking and moderation and to take steps to authenticate the assessment, including submitting a copy to a checking/detection system that in turn may retain a copy of this work on a database for future checking. □ I have carefully read the assessment criteria that will be used to evaluate my work as given below - ASSESSMENT CRITERIA You have been given the link to an online news article. La Poste http://fscavo.blogspot.com/2009/02/big-win-for-open-source-erp-project.html You are to assume the role of CIO/IT Manager for the organization in the article. 1. Why do you think that the organization wants this project (what are the expected benefits)? Include those that are stated in the article, plus any others that you can think of. 2. What is the current state of the IS at the organization, and how may this influence the project? 3. What things will you need to do to ensure success of both the project and the ongoing use of the new system. You are encouraged to make assumptions where needed as long as you make it clear that you have done so. All answers must be supported by evidence (e.g. references from literature). Each group member must contribute 500 – 1000 words each. Indicate at the top of each section who has written it. I certify that the statements I have attested to above have been made in good faith and are true and correct. I also certify that this is my work and that I have not plagiarized the work of others and not participated in collusion. STUDENT SIGNATURE: ________________________________________________ DATE: ____/____/____
  • 2. BCO5647 Application Programming Techniques Assignment 3 Program Name: YA1545A3 Username : A-1514 Submitted by: Marlon Capuno (S3826942) Aug 21, 2009 School of Management & Information Systems
  • 3. I. PROGRAM NAME : YA1545A3 II. USERNAME : A-1545 III. HARD COPY OF PROGRAM CODE *&---------------------------------------------------------------------* *& Report YA1545A3 *& *&---------------------------------------------------------------------* *& *& *&---------------------------------------------------------------------* REPORT YA1545A3 no STANDARD PAGE HEADING line-size 100. tables: sflight, scarr, spfli, saplane, sbook, scustom. PARAMETERS: carrid like sflight-carrid, flightno like sflight-connid. *----------------------------------------------------------------------* * Data Type Declaration *----------------------------------------------------------------------* *Variable Declaration DATA: line_size TYPE i VALUE 100, totalSeatsMax TYPE i VALUE 0, totalSeatsOcc TYPE i VALUE 0, availableSeats TYPE i VALUE 0, totalAvailableSeats TYPE i VALUE 0, totalFlight TYPE i VALUE 0, airline TYPE string, datetime TYPE string, seatsleft TYPE i value 0, ans type string, classname type string, classcode type c, iflag type i value 0, icount type i VALUE 0, str1 type string, str2 type string. concatenate sy-uzeit ' ' sy-datum into datetime. START-OF-SELECTION. SET PF-STATUS 'LIST'. SET TITLEBAR '100' WITH sy-uzeit sy-datum. *Define the itab for Booking Details DATA: BEGIN OF itabBooking occurs 0, carrid LIKE sbook-carrid, connid LIKE sbook-connid, fldate LIKE sbook-fldate, bookid LIKE sbook-bookid, customid LIKE sbook-customid,
  • 4. name LIKE scustom-name, class LIKE sbook-class, loccuram LIKE sbook-loccuram, END OF itabBooking. SELECT sbook~carrid sbook~connid sbook~fldate sbook~bookid sbook~customid scus tom~name sbook~class sbook~loccuram FROM sbook INNER JOIN scustom ON sbook~customid = scustom~id into table itab Booking. *Define the itab for Flight Details DATA: BEGIN OF itabFlightDet occurs 0, carrid like spfli-carrid, connid like spfli-connid, cityto LIKE spfli-cityto, cityfrom LIKE spfli-cityto, deptime like spfli-deptime, END OF itabFlightDet. select carrid connid cityto cityfrom deptime from spfli INTO table itabFlightD et. *Define the itab for Plane Details DATA: BEGIN OF itabPlaneDet OCCURS 0, planetype LIKE saplane-planetype, weight LIKE saplane-weight, op_speed LIKE saplane-op_speed, speed_unit LIKE saplane-speed_unit, wei_unit LIKE saplane-wei_unit, END of itabPlaneDet. SELECT planetype weight op_speed speed_unit wei_unit from saplane INTO TABLE itabPlaneDet. *Define the itab for Flight List DATA: begin of itabFlight occurs 0, carrid LIKE sflight-carrid, connid LIKE sflight-connid, fldate LIKE sflight-fldate, price LIKE sflight-price, seatsocc LIKE sflight-seatsocc, seatsmax LIKE sflight-seatsmax, seatsocc_f LIKE sflight-seatsocc_f, carrname LIKE scarr-carrname, planetype LIKE sflight-planetype, END OF itabFlight. SELECT sflight~carrid sflight~connid sflight~fldate sflight~price sflight~seat socc sflight~seatsmax sflight~seatsocc_f scarr~carrname sflight~planetype from sflight inner join scarr on sflight~carrid = scarr~carrid into table it abFlight where sflight~carrid = carrid and sflight~connid = flightno.
  • 5. "Use to check fo a record totalFlight = sy-dbcnt. "Get the country READ table itabFlight index 5. airline = itabFlight-carrname. *----------------------------------------------------------------------* * Print Report Heading *----------------------------------------------------------------------* ULINE. WRITE: / sy- vline, 'Flights with Seat Availability for : ', airline, 75 'Page : ', sy-pagno, at line_size sy-vline. ULINE. FORMAT COLOR 1 INTENSIFIED ON. WRITE: / sy- vline, 'Carrier Connection Flight Ticket Seats Seats', at line_size sy-vline. WRITE: / sy- vline, 'Id Id Date Price Occupied Available', at line_size sy-vline. FORMAT COLOR OFF. ULINE. "Check if there is a record if sy-subrc <> 0. "Display this message if there's no flight details write: / sy- vline, 'There is no flight detail for airline selected', at line_size sy- vline. uline. else. "This loop is for the purpose of sorting the internal LOOP AT itabFlight. PERFORM ALTER_itabFlight. "APPEND itabFlight. ENDLOOP. "Sort itab bia number of available seats sort itabFlight by seatsocc_f. LOOP AT itabFlight. "availableSeats = itabFlight-seatsmax - itabFlight-seatsocc. WRITE : / sy-vline, itabFlight-carrid, at line_size sy-vline, 13 itabFlight-connid, at line_size sy-vline, 30 itabFlight-fldate, at line_size sy-vline, 40 itabFlight-price, at line_size sy-vline, 55 itabFlight-seatsocc, at line_size sy-vline, 71 itabFlight-seatsocc_f, at line_size sy-vline. totalAvailableSeats = totalAvailableSeats + itabFlight-seatsocc_f. HIDE: itabFlight-carrid, itabFlight-connid, itabFlight-planetype, itabFlight- fldate.
  • 6. ENDLOOP. WRITE: / sy-vline, at line_size sy-vline. ULINE. ENDIF. "This is to prevent displaying anything when a wrong field is selected end-of-SELECTION. clear : itabFlight-carrid, itabFlight-connid, itabFlight-planetype, itabFlight-fldate. AT user-COMMAND. CASE SY-UCOMM. WHEN 'FDET'. "Set the Menu and title bar for Flight Details SET PF-STATUS 'DIAL'. SET TITLEBAR '102' WITH itabFlight-carrid itabFlight-connid. "Initialize a window dialogue box WINDOW STARTING AT 5 3 ENDING AT 40 10. "Select Single, to get the value from Flight details READ TABLE itabFlightDet with key carrid = carrid connid = flightno. WRITE : / 'Departure :'. FORMAT COLOR 3 INTENSIFIED ON. WRITE 18 itabFlightDet-cityfrom HOTSPOT ON. FORMAT COLOR OFF. WRITE : / 'Destination :'. FORMAT COLOR 3 INTENSIFIED ON. WRITE 18 itabFlightDet-cityto HOTSPOT ON. FORMAT COLOR OFF. WRITE : / 'Time :'. FORMAT COLOR 3 INTENSIFIED ON. WRITE 18 itabFlightDet-deptime HOTSPOT ON. FORMAT COLOR OFF. WHEN 'PDET'. "Set the Menu and title bar for Plane Details SET PF-STATUS 'DIAL3'. SET TITLEBAR '103' with itabFlight-carrid itabFlight- connid 'Departing' itabFlight-fldate. "Initialize a window dialogue box WINDOW STARTING AT 5 3 ENDING AT 60 10. "Read single itab for plane detail READ TABLE itabPlaneDet with key planetype = itabFlight-planetype. WRITE : / 'Plane Type : '. FORMAT COLOR 3 INTENSIFIED ON. write: itabPlaneDet-planetype HOTSPOT ON.
  • 7. FORMAT COLOR OFF. WRITE : / 'Plane Weight : '. FORMAT COLOR 3 INTENSIFIED ON. write itabPlaneDet-weight. FORMAT COLOR OFF. write: ' ', itabPlaneDet-wei_unit. WRITE : / 'Operation Speed: '. FORMAT COLOR 3 INTENSIFIED ON. write itabPlaneDet-op_speed. FORMAT COLOR OFF. write: ' ', itabPlaneDet-speed_unit. WHEN 'BOOK'. "call subroutine Bookings ans pass a value 0 PERFORM BOOKINGS using 0. ENDCASE. "Check for user menu selection AT USER-COMMAND. CASE sy-ucomm. WHEN 'SORTN'. "for sorting via Name sort itabBooking by name. PERFORM BOOKINGS using 0. WHEN 'SORTB'. "for sorting via booking number sort itabBooking by bookid. PERFORM BOOKINGS using 0. WHEN 'ECON'. "to filter all the Economy flight sort itabBooking by name. PERFORM BOOKINGS using 1. endcase. AT LINE-SELECTION. "This subrouting loops through the internal table to check for the carrid, con nid and flightdate based "on the selected criteria of the user FORM BOOKINGS using iflag. "Set the Menu and title bar for Booking Details SET PF-STATUS 'DIAL4'. set TITLEBAR '104' with sy-uzeit sy-datum. "Call a subroutine to format the header PERFORM HEADING. "This flag is used to check which itab procedure to be executed "0 = for sorting ; 1 = for filtering to show only economy if iflag = 0. LOOP at itabBooking where carrid = itabFlight-carrid and connid = itabFlight-connid and fldate = itabFlight-fldate. "This subroutine returns the class description PERFORM getClassName using itabBooking-class CHANGING classname. write: / sy-vline, itabBooking-bookid, at line_size sy-vline,
  • 8. 15 itabBooking-customid, at line_size sy-vline, 32 itabBooking-name, at line_size sy-vline, 55 classname,at line_size sy-vline, 67 itabBooking-loccuram,at line_size sy-vline. icount = icount + 1. ENDLOOP. else. LOOP at itabBooking where carrid = itabFlight-carrid and connid = itabFlight-connid and fldate = itabFlight-fldate AND class = 'Y'. PERFORM getClassName using itabBooking-class CHANGING classname. write: / sy-vline, itabBooking-bookid, at line_size sy-vline, 15 itabBooking-customid, at line_size sy-vline, 32 itabBooking-name, at line_size sy-vline, 55 classname,at line_size sy-vline, 67 itabBooking-loccuram,at line_size sy-vline. icount = icount + 1. ENDLOOP. endif. WRITE: / sy-vline, at line_size sy-vline. WRITE: / sy-vline, icount, ' passengers listed', at line_size sy-vline. "Display the message if there is no booking for the passenger if icount = 0. Write : / sy- vline, 'Sorry there is no Booking available for this passenger.'. else. icount = 0. endif. ULINE. ENDFORM. FORM HEADING. *----------------------------------------------------------------------* * Print Report Heading *----------------------------------------------------------------------* ULINE. WRITE: / sy-vline, 'Booking Report', 75 'Page : ', sy-pagno, at line_size sy- vline. ULINE. FORMAT COLOR 2 INTENSIFIED ON. WRITE: / sy-vline, 'Flight Conection : ', 25 itabFlight-carrid, 29 itabFlight- connid, at line_size sy-vline. WRITE: / sy-vline, 'Departure Date :', 25 itabFlight- fldate, at line_size sy-vline. FORMAT COLOR OFF. ULINE. FORMAT COLOR 1 INTENSIFIED ON. WRITE: / sy- vline, 'Booking No Customer No Customer Name Class Tick et Price', at line_size sy-vline.
  • 9. FORMAT COLOR OFF. ULINE. ENDFORM. "This subroutine is use to calculate the available seat and modify one column in itabFlight to contain "the computed value of available seats FORM ALTER_itabFlight. seatsleft = itabFlight-seatsmax - itabFlight-seatsocc. READ TABLE itabFlight. MOVE seatsleft to itabFlight-seatsocc_f. MODIFY itabFlight INDEX sy-tabix. CLEAR itabFlight. seatsleft = 0. ENDFORM. "FORM CHECK_CLASS using sclass type string changing classname. FORM GETCLASSNAME using classcode CHANGING classname. case itabBooking-class. when 'Y'. classname = 'Economy'. when 'F'. classname = 'First'. when 'C'. classname = 'Business'. ENDCASE. ENDFORM.
  • 10. IV. OUTPUT REPORT BASIC LIST BOOKINGS
  • 12. V. PROGRAM DOCUMENTATION Purpose The program display the Airline Flight Details based on the Airline Carrier and Flight Number that the user selected. More information is given if user will click on the menu provided like Booking, Flight Detail and Plane Detail. Integration N/A Prerequisites sflight, scarr, spfli, saplane, sbook, scustom. Features The program provides an easy way of drilling down using button and function keys. Internal tables are use to improve the performance. Selection At the point of loading the internal table, a criteria was added to only load records based on the airline carrier and flight number the user selected Standard Variants N/A Output The output of the program displays the airline carrier and details like ticket price, departure date, seats available which is a computed field. Besides the basic list, the program drills down to booking, flight and plane details by using customized buttons. Activities Calculated for the number of seats and uses several sub routine to perform task that are repeated to reduce programming codes. Example *Not the whole list
  • 13. VI. PSEUDOCODE START PROGRRAM READ CARRIER ID AND FLIGHT NUMBER INITIALIZE VARIABLES INITIALIZE INTERNAL TABLES LOAD TABLES INTO INTERNAL TABLES FORMAT HEADING FORMAT FLIGHT DETAIL MENU SET TITLEBAR REPEAT READ RECORD FROM AIRLINE FLIGHT DETAIL INTERNAL TABLE SORT BY SEATS AVAILABLE COMPUTE FOR THE SEATS AVAILABLE IF NO RECORD DISPLAY ‘THERE IS NO FLIGHT DETAILS FOR THE COUNTRY SELECTED’ ELSE DISPLAY CARRIER ID, CONNECION ID, FLIGT DATE, TICKET PRICE, SEATS OCCUPIED, SEATS AVAILABLE ENDIF UNTIL END OF FILE AT USER BUTTON SELECTION CASE BUTTON SELECTION BOOKING: FORMAT BOOKING MENU SET TITLEBAR REPEAT READ FROM BOOKING TABLE WHERE CARRID = FLIGHT DETAIL CARRIER ID AND CONNID = FLIGHT DETAIL CONNID AND FLDATE = FLIGHT DETAIL FLDATE DISPLAY BOOKING NO, CUSTOMER NO, CUSTOMER NAME, CLASS, TICKET PRICE DO UNTIL END OF FILE AT USER BUTTON SELECTION CASE BUTTON SELECTION SORT BY NAME SORT BOOKING INTERNAL TABLE BY NAME DISPLAY BOOKING NO, CUSTOMER NO, CUSTOMER NAME, CLASS, TICKET PRICE SORT BY BOOKING NO SORT BOOKING INTERNAL TABLE BY BOOKIN NUMBER DISPLAY BOOKING NO, CUSTOMER NO, CUSTOMER NAME, CLASS, TICKET PRICE FILTER ECONOMY CLASS READ INTERNAL TABLE WHERE CLASS IS EQUAL TO ECONOMY DISPLAY BOOKING NO, CUSTOMER NO, CUSTOMER NAME, CLASS, TICKET PRICE END CASE PLANE DETAILS: FORMAT PLANE DETAIL MENU SET TITLEBAR OPEN WINDOWS DIALOGUE DISPLAY PLANE TYPE, PLANE WEIGHT, OPERATION SPEED FLIGHT DETAILS FORMAT FLIGHT DETAIL MENU SET TITLEBAR OPEN WINDOWS DIALOGUE DISPLAY DEPARTURE, DESTINATION, DEPARTURE TIME END CASE