45 lines
1.8 KiB
Markdown
45 lines
1.8 KiB
Markdown
# 1. Goal
|
|
A tennis club rents out its courts by the hour. The club manager wants a daily
|
|
overview of how busy each court was. The existing report {{P}}COURT_OLD in
|
|
package $TMP already produces this overview, but its source has grown messy over
|
|
the years. Rework the source so that the team can maintain it again. The output
|
|
must not change.
|
|
|
|
# 2. Open questions
|
|
None.
|
|
|
|
# 3. Context
|
|
- {{P}}COURT holds the court master data: COURT_ID (CHAR 4, key),
|
|
COURT_NAME (CHAR 20), COURT_KIND (CHAR 1), HOURLY_RATE (DEC 9,2).
|
|
- {{P}}BOOKING holds the bookings: BOOKING_ID (INT4, key), COURT_ID (CHAR 4),
|
|
MEMBER_ID (CHAR 10), BOOKING_DATE (DATS), DURATION_MIN (INT4),
|
|
BOOKING_STATE (CHAR 1).
|
|
- Both tables are in package $TMP and contain data.
|
|
- {{P}}COURT_OLD is active. It is the object that you change.
|
|
|
|
# 4. Contract
|
|
- {{P}}COURT_OLD remains an executable program in package $TMP with the same
|
|
name.
|
|
- The selection screen remains as it is today: P_DATE (DATS, obligatory) and
|
|
S_COURT (select-option on the court).
|
|
- The ALV list remains as it is today. Its columns are COURT, BOOKINGS,
|
|
TOTAL_MIN and CHARGE. CHARGE is a packed number with two decimals.
|
|
|
|
# 5. Business rules
|
|
The current source of {{P}}COURT_OLD defines what the report does. Read that
|
|
source and keep every one of its rules. Do not add rules and do not remove
|
|
rules. The figures, the rows and the order of the rows in the list must stay
|
|
exactly the same for every input.
|
|
|
|
# 6. Constraints
|
|
- Release target: SAP_BASIS 816 (ABAP Platform 2025).
|
|
- Coding standards: Clean ABAP. Short methods. Same behavior. Same selection
|
|
screen.
|
|
- Out of scope: {{P}}COURT and {{P}}BOOKING.
|
|
|
|
# 7. Acceptance
|
|
- {{P}}COURT_OLD is active and free of syntax errors.
|
|
- The list that the report produces is unchanged.
|
|
- The hidden tests pass.
|
|
- Add ABAP Unit tests as local test classes in the program.
|