Files
2026-10-05 18:02:52 +02:00

42 lines
1.6 KiB
Markdown

# 1. Goal
An olive oil mill presses the olives that its member groves deliver. Show the
oil output of each growing region for a period in an ALV list. The mill manager
uses the list to compare the regions.
# 2. Open questions
None.
# 3. Context
- Table {{P}}GROVE is in package $TMP and contains data.
Fields: GROVE_ID (INT4, key), GROVE_NAME (CHAR 30), REGION (CHAR 8),
VARIETY (CHAR 10).
- Table {{P}}PRESS is in package $TMP and contains data.
Fields: PRESS_ID (INT4, key), GROVE_ID (INT4), PRESS_DATE (DATS),
KILOS (INT4), LITRES (DEC 9,2).
# 4. Contract
- Create the executable program {{P}}OIL_REPORT in package $TMP.
- Selection screen:
- Parameter P_FROM, type DATS, mandatory: the first pressing date to include.
- Select-option S_REG for the growing region.
- Show the result with CL_SALV_TABLE. The output table has these columns with
these names: REGION, LITRES, KILOS.
# 5. Business rules
1. Include a pressing only if PRESS_DATE is on or after P_FROM and the region of
the grove that delivered the olives is in S_REG.
2. LITRES of a region is the sum of the litres of all included pressings.
3. KILOS of a region is the sum of the kilos of all included pressings.
4. Show one line for each region with at least one included pressing.
5. Sort the lines by LITRES, the highest value first.
# 6. Constraints
- Release target: 8.16.
- Coding standards: Clean ABAP. Read the data with one database access.
- Out of scope: do not change {{P}}GROVE and {{P}}PRESS.
# 7. Acceptance
- The program is active and has no syntax error.
- The hidden tests pass.
- Write ABAP Unit tests as local test classes in the program.