60 lines
2.5 KiB
Markdown
60 lines
2.5 KiB
Markdown
# 1. Goal
|
|
The tea plantation "Highland Leaf" picks the green leaf of its tea fields in
|
|
batches. The plantation must store every plucking batch in one database table.
|
|
The factory office, the field book and later evaluations read this table, so
|
|
the field names and the data types must be exact.
|
|
|
|
# 2. Open questions
|
|
None.
|
|
|
|
# 3. Context
|
|
- One plucking batch is the green leaf of one tea field on one day.
|
|
- The table is new and is in package $TMP. The table is client-dependent.
|
|
- No other object uses the table yet.
|
|
|
|
# 4. Contract
|
|
- Create the database table {{P}}PLUCK in package $TMP. The table is
|
|
transparent.
|
|
- The table is not extensible. Delivery class A. Data maintenance is
|
|
restricted.
|
|
- The table has these fields, in this order:
|
|
CLIENT, PLUCK_ID, FIELD_ID, PLUCK_DATE, TEAM_NO, LEAF_WEIGHT, LEAF_GRADE,
|
|
MOISTURE, WITHER_MIN, PRICE_PER_KG, NOTE.
|
|
- Key fields: CLIENT and PLUCK_ID.
|
|
|
|
# 5. Business rules
|
|
1. CLIENT is the client field of the table. Data type: client, length 3. Key
|
|
field. Not null.
|
|
2. PLUCK_ID is the number of the plucking batch. Data type: character, length
|
|
10. Key field. Not null.
|
|
3. FIELD_ID is the tea field. Data type: character, length 6. Not null.
|
|
4. PLUCK_DATE is the day of the plucking. Data type: date, length 8. Not null.
|
|
5. TEAM_NO is the number of the picking team. Data type: numeric text, length
|
|
4. The field can be empty.
|
|
6. LEAF_WEIGHT is the weight of the green leaf in kilogram. Data type: packed
|
|
number, 13 digits, 3 decimal places. Not null.
|
|
7. LEAF_GRADE is the grade code of the green leaf. Data type: character,
|
|
length 2. The field can be empty.
|
|
8. MOISTURE is the moisture of the green leaf in percent. Data type: packed
|
|
number, 5 digits, 2 decimal places. The field can be empty.
|
|
9. WITHER_MIN is the planned withering time in minutes. Data type: integer,
|
|
length 10. The field can be empty.
|
|
10. PRICE_PER_KG is the price for one kilogram of the green leaf. Data type:
|
|
packed number, 11 digits, 2 decimal places. The field can be empty.
|
|
11. NOTE is a short note about the batch. Data type: character, length 40.
|
|
The field can be empty.
|
|
12. Two batches with the same PLUCK_ID must not exist. A second insert with
|
|
the same key must fail.
|
|
|
|
# 6. Constraints
|
|
- Release target: 8.16.
|
|
- Coding standards: Clean ABAP.
|
|
- Out of scope: do not create a CDS view, a class, a program or a function
|
|
module for this task. Do not change any other object.
|
|
|
|
# 7. Acceptance
|
|
- The table is active and has no syntax error.
|
|
- The hidden tests pass.
|
|
- Write ABAP Unit tests in a global test class. Use CL_OSQL_TEST_ENVIRONMENT
|
|
for the database access.
|