ADT fallback: Accept headers for FUNC; G0189 accepted; regen2 results

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014aUaQeLnwbb1zTpN7kHeat
This commit is contained in:
Kral
2026-10-03 16:31:03 +02:00
parent 428b3565b2
commit 7510131a7d
335 changed files with 12047 additions and 5545 deletions

View File

@@ -1,45 +1,51 @@
# 1. Goal
Show the milk deliveries of each farm in an ALV list. The cooperative uses the
list to compare the farms of a region for a period.
A facility management company operates a fleet of vehicles. The fleet manager
needs a report that shows the distance that each vehicle drove in a period.
The fleet manager uses the report to compare the vehicles.
# 2. Open questions
None.
# 3. Context
- Table {{P}}FARM exists in package $TMP. It contains data.
Fields: FARM_ID (CHAR 10, key), FARM_NAME (CHAR 40), REGION (CHAR 4).
- Table {{P}}MILK exists in package $TMP. It contains data.
Fields: DELIV_ID (INT4, key), FARM_ID (CHAR 10), DELIV_DATE (DATS),
LITRES (DEC 13,2).
The tables {{P}}VEH and {{P}}ODOM exist in package $TMP. Both tables contain
data.
Table {{P}}VEH holds the vehicles.
Fields: VEH_ID (CHAR 10, key), DEPOT (CHAR 4), VEH_TYPE (CHAR 10).
Table {{P}}ODOM holds the odometer readings of the vehicles.
Fields: READ_ID (INT4, key), VEH_ID (CHAR 10), READ_DATE (DATS),
ODOMETER (INT4, the odometer value in kilometres).
A vehicle can have many odometer readings. An odometer reading can belong to a
vehicle that is not in {{P}}VEH.
# 4. Contract
- Create the executable program {{P}}MILK_SUM in package $TMP.
- Create the executable program {{P}}FLEET_DIST in package $TMP.
- Selection screen:
- Parameter P_FROM, type DATS, mandatory: the first delivery date to include.
- Parameter P_TO, type DATS, mandatory: the last delivery date to include.
- Select-option S_REG for the region.
- Parameter P_FROM, type DATS, mandatory: the first reading date to include.
- Parameter P_TO, type DATS, mandatory: the last reading date to include.
- Select-option S_DEPOT for the depot.
- Show the result with CL_SALV_TABLE. The output table has these columns, with
these names: FARM_ID, FARM_NAME, REGION, LITRES, DELIVERIES.
these names: VEH_ID, DEPOT, DISTANCE, READINGS.
# 5. Business rules
1. Include a delivery only if DELIV_DATE is on or after P_FROM and on or before
P_TO. Both limits are included.
2. Include a farm only if REGION is in S_REG. An empty S_REG includes every
region. A line with sign E in S_REG excludes its region.
3. Show one line for each included farm. A farm without an included delivery also
gets a line.
4. LITRES is the sum of the litres of the included deliveries of the farm. LITRES
is 0 if the farm has no included delivery.
5. DELIVERIES is the number of included deliveries of the farm. DELIVERIES is 0
if the farm has no included delivery.
6. Sort the lines by LITRES, the highest value first. If two lines have the same
LITRES, sort them by FARM_ID, the lowest value first.
7. FARM_NAME and REGION are the values of the farm.
1. Include an odometer reading only if READ_DATE is on or after P_FROM and on
or before P_TO.
2. Include a vehicle only if the vehicle is in {{P}}VEH and its DEPOT is in
S_DEPOT.
3. Include a vehicle only if at least two of its readings are included.
4. DISTANCE is the highest included ODOMETER value of the vehicle minus the
lowest included ODOMETER value of the vehicle.
5. READINGS is the number of included readings of the vehicle.
6. Show one line for each included vehicle.
7. Sort the lines by DISTANCE. The highest distance comes first. If two lines
have the same DISTANCE, the line with the smaller VEH_ID comes first.
# 6. Constraints
- Release target: 7.58.
- Coding standards: Clean ABAP. Read each table with one database access.
- Out of scope: do not change {{P}}FARM and {{P}}MILK.
- Release target: 8.16.
- Coding standards: Clean ABAP.
- Out of scope: do not change {{P}}VEH and {{P}}ODOM.
# 7. Acceptance
- The program is active and has no syntax error.