Department of Information Technology
Higher Diploma in Software Engineering (IT114105)
(2019/2020)
ITP4512 Enterprise Software
ASSIGNMENT
Assignment Due Date and Time: 1st May 2020 (Fri) 11:55 p.m.
ABAP Dictionary and ABAP Programming
In this assignment, you are required to create a table with ABAP Dictionary; write two function modules; write a report program to insert records into the table; and write another report program to generate a report with selection option and retrieve data from the table. Complete these tasks with the VM server provided in lab exercises and capture appropriate screens as evidence of your work.
Part 1: Create table
Create a table with name ZASG_yourname (replace yourname with your name, without space) which consists of the following columns, using appropriate existing data elements:
Field
Key
Data Type
Length
DP
Short Description
MANDT
Yes
CLNT
3
0
Client
CARRID
Yes
CHAR
3
0
Airline Code
CARRNAME
CHAR
20
0
Airline Name
CONNID
Yes
NUMC
4
0
Flight Connection Number
FLTIME
INT4
10
0
Flight Time
FLDATE
Yes
DATS
8
0
Flight Date
CUSTOMID
Yes
NUMC
8
0
Customer Number
LUGGWEIGHT
QUAN
8
4
Weight of Luggage
WUNIT
UNIT
3
0
Weight Unit
PASSNAME
CHAR
25
0
Name of the Passenger
H_FLAG
CHAR
1
0
General Flag
HKEARNING
CURR
15
2
Extra Earning Amount
CURRENCY
CUKY
5
0
Local Currency of Airline
PLANETYPE
CHAR
10
0
Plane Type
Hint: The order of the fields does not need to be the same as above.
Capture screens on tabs ‘Delivery and Maintenance’, ‘Fields’, ‘Currency/Quantity Fields’, and ‘Technical Settings’ after you have successfully activate the table.
Part 2: Function module to determine earning in HK dollar
Write an ABAP function module called Z_ yourname _FN1 (created in a separate function group Z_ yourname _GP) that perform the following:
Input: currency of TYPE CUKY,
earning (in foreign currency) of TYPE CURR.
Output: earning in HK dollar of TYPE CURR.
3. Set the output value (earning in HK dollar) according to the following table:
Currency
Code
Rate
US Dollar
USD
7.8
Euro
EUR
8.4
Australian Dollar
AUD
5.2
Singapore Dollar
SGD
5.6
Japanese Yen
JPY
0.07
You should also raise an exception when the input currency is not one of the above.
Capture screens that show the source code and test output of your function module.
You should test all types of currencies of the above table.
Part 3: Function module to determine luggage weight in kilograms
Write an ABAP function module called Z_ yourname _FN2 (created in function group Z_ yourname _GP) that perform the following:
Input: wtunit of TYPE UNIT,
lweight of TYPE QUAN.
Output: lgweight in Kilograms of TYPE QUAN.
3. Set the output value (: lgweight in Kilograms) according to the following rule:
IF wtunit has value of ‘KG’
Set lgweight = lweight
ELSE
Set lgweight = lweight / 2.2
Capture screens that show the source code and test output of your function module.
Part 4: Program to insert into the table ZASG_yourname
Write an ABAP report program called Z_ yourname _UP that perform the following:
Define a structure of variables corresponding to the data structure of ZASG_yourname.
Read data from tables SCARR, SPFLI, SFLIGHT and SBOOK and retrieve appropriate data.
Declare a variable EARNING which value is calculated as follows:
EARNING = SBOOK.LOCCURAM – SFLIGHT.PRICE
Use function module Z_ yourname _FN1 to calculate the earning in HK dollar (HKEARNING). Display a message if the currency is not in the table in Part 2.
Use function module Z_ yourname _FN2 to calculate the luggage weight in kilograms (LGWEIGHT).
Check the values of Lgweight and fltime. Set the q_flag according to the following:
IF lgweight is greater than 14
OR fltime is greater than 11 hours,
set the field h_flag to ‘X’.
ELSE, set it to ‘ ’.
Insert into table ZASG_yourname.
List all the records in the table ZASG_yourname.
Capture screens that show the source code and output of your program.
Output includes List of all records and the screen capture of the data in SE16N.
Part 5: Program to select records from table ZASG_yourname
Write an ABAP report program called Z_ yourname _DP that perform the following:
Display selection screen similar to the following for user to enter selection criteria:
Note that ‘H Flag set’ and ‘H Flag not set’ are radio buttons that user can only select one choice and should have ‘H Flag not set’ chosen by default; All other input fields should also display default values as shown above.
Select records from the table ZASG_yourname according to the user selection criteria and generate a report similar to the following (H Flag not set):
(Only first few records shown.)
Another set (2):
(Only first few records shown.)
Another set (3):
(Only first few records shown.)
Another set (4):
(Complete report shown.)
Capture screens that show the source code and outputs of your program. At least 8 sets outputs (with different selection criteria) including the above 4 sets must be shown.
Note : One set of output include both selection screen and report listing
[ Hint: You have to sort your internal table with fields from top to bottom as shown in the report. ]
Instructions to Students
The weighting of this assignment is 40% of Continuous Assessment.
This assignment is an individual assignment and each student has to submit his/her own work. Plagiarism is a serious offence and any assignments that involve any plagiarism will be given ZERO marks. The award of Zero marks will apply to all parties, regardless of whether or not a student is the original author or the plagiarist. Further disciplinary action will follow.
All work is to be submitted to HYPERLINK “http://moodle.vtc.edu.hk” moodle.vtc.edu.hk by 11:55 pm on Friday 01 May2020.
You are required to hand in all screen captures by print screen and pasting them onto this document in appropriate areas as instructed above and submit this document to Moodle.
If a report is more than 2 pages, you may capture the first and last pages only.
Marks:
Table Creation 15%
Function Module1 15%
Function Module2 10%
Insertion Program 20%
Selection Program 20%
Checking Select and Insert Status 5%
Use of Messages, Text Symbols & Selection Tests 5%
Use of Internal Table in Selection Program 3%
Appropriate testing screens captured 2%
Coding Standard and Documentation 5%
– End of Assignment Instruction –
Page PAGE 1