Files
2026-10-05 22:08:59 +02:00

52 lines
2.1 KiB
Markdown

# 1. Goal
The cider press house of a fruit cooperative records each pressing batch of
apple deliveries. Create the database table that stores these batches. A press
terminal writes the batches and a reporting tool reads them. The field names,
the data types and the key must be exactly as agreed.
# 2. Open questions
None.
# 3. Context
- The table is in package $TMP.
- The press house receives apples from the member orchards.
- One pressing batch comes from one orchard.
- The press house charges a fee for each pressing. The fee is money.
# 4. Contract
- Create the transparent database table {{P}}CIDER in package $TMP as a DDL
source.
- The table has these fields, with these names: CLIENT, BATCH_ID, ORCHARD_ID,
APPLE_VARIETY, PRESSED_ON, BIN_COUNT, APPLE_KG, JUICE_L, PRESS_FEE,
CURRENCY_CODE, GRADE.
- The table has no other fields.
- The key of the table is CLIENT and BATCH_ID.
# 5. Business rules
1. CLIENT is the client field of the table (CLNT, 3 characters). It is a key
field. It is not null.
2. BATCH_ID is the number of the pressing batch (CHAR 10). It is a key field.
It is not null.
3. ORCHARD_ID is the number of the orchard that delivered the apples (CHAR 6).
It is not null.
4. APPLE_VARIETY is the name of the apple variety (CHAR 20).
5. PRESSED_ON is the date of the pressing (DATS, 8 characters).
6. BIN_COUNT is the number of apple bins of the batch (INT4).
7. APPLE_KG is the weight of the apples in kilograms (DEC 13,3).
8. JUICE_L is the volume of the juice in litres (DEC 13,3).
9. PRESS_FEE is the fee of the pressing (CURR 15,2). It is an amount in the
currency that CURRENCY_CODE gives.
10. CURRENCY_CODE is the currency key (CUKY, 5 characters).
11. GRADE is the quality grade of the juice (CHAR 2).
# 6. Constraints
- Release target: 8.16 (SAP_BASIS 816).
- Coding standards: Clean ABAP.
- Out of scope: do not create other tables, views, classes or programs. Create
only the table and your own test class.
# 7. Acceptance
- The table is active and has no syntax error.
- The hidden tests pass.
- Write ABAP Unit tests with CL_OSQL_TEST_ENVIRONMENT in a global test class.