Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014aUaQeLnwbb1zTpN7kHeat
44 lines
1.7 KiB
Markdown
44 lines
1.7 KiB
Markdown
# 1. Goal
|
|
A regional airport collects the movements of its flights. The operations team
|
|
needs a report that shows, for each destination, how many flights went there
|
|
and how many passengers they carried.
|
|
|
|
# 2. Open questions
|
|
None.
|
|
|
|
# 3. Context
|
|
- Table {{P}}FLIGHT exists in package $TMP. It contains data.
|
|
Fields: FLIGHT_ID (INT4, key), DEST (CHAR 3), FLIGHT_DATE (DATS), PAX (INT4).
|
|
- Table {{P}}AIRPORT exists in package $TMP. It contains data.
|
|
Fields: AIRPORT (CHAR 3, key), NAME (CHAR 40).
|
|
|
|
# 4. Contract
|
|
- Create the executable program {{P}}FLIGHT_SUM in package $TMP.
|
|
- Selection screen:
|
|
- Parameter P_FROM, type DATS, mandatory: the first flight date to include.
|
|
- Select-option S_DEST for the destination.
|
|
- Show the result with CL_SALV_TABLE. The output table has these columns, with
|
|
these names: DEST, NAME, FLIGHTS (number of flights), PAX (sum of the
|
|
passengers).
|
|
|
|
# 5. Business rules
|
|
1. Include a flight only if FLIGHT_DATE is on or after P_FROM and DEST is in
|
|
S_DEST.
|
|
2. Show one line for each destination that has at least one included flight.
|
|
3. NAME is the airport name of the destination from {{P}}AIRPORT. If the
|
|
destination has no entry in {{P}}AIRPORT, NAME is 'UNKNOWN'.
|
|
4. FLIGHTS is the number of included flights of the destination. PAX is the sum
|
|
of the passengers of the included flights.
|
|
5. Sort the lines by PAX, the highest first. If two lines have the same PAX,
|
|
sort them by DEST in ascending order.
|
|
|
|
# 6. Constraints
|
|
- Release target: 8.16.
|
|
- Coding standards: Clean ABAP.
|
|
- Out of scope: do not change {{P}}FLIGHT and {{P}}AIRPORT.
|
|
|
|
# 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.
|