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:
@@ -1,41 +1,63 @@
|
||||
# 1. Goal
|
||||
Show the daily food cost of each enclosure in the zoo in an ALV list. The zoo
|
||||
keeper uses the list to plan the daily food order.
|
||||
|
||||
A hospital wants a report about the bed days of its wards. The report shows,
|
||||
for each ward, the number of admissions in a period, the bed days, and the cost
|
||||
of these bed days. The hospital management compares the wards with this report.
|
||||
|
||||
# 2. Open questions
|
||||
|
||||
None.
|
||||
|
||||
# 3. Context
|
||||
- The table {{P}}ANIMAL exists in package $TMP and contains data.
|
||||
Fields: ANIMAL_ID (INT4, key), ENCLOSURE (CHAR 10), SPECIES (CHAR 20),
|
||||
WEIGHT_KG (DEC 5,1), FOOD_COST (DEC 9,2).
|
||||
- FOOD_COST is the daily food cost of one animal in euro.
|
||||
|
||||
- The table {{P}}ADMIT exists in package $TMP. The table contains data. The
|
||||
fields are:
|
||||
- ADM_ID: INT4, key. The admission ID.
|
||||
- WARD: CHAR 4. The ward.
|
||||
- ADMIT_DATE: DATS. The admission date.
|
||||
- DISCHARGE_DATE: DATS. The discharge date. The field is initial while the
|
||||
patient is still in the ward.
|
||||
- DAILY_RATE: DEC 15,2. The cost of one bed day in this ward.
|
||||
|
||||
# 4. Contract
|
||||
- Create the executable program {{P}}ZOO_FEED in package $TMP.
|
||||
|
||||
- Create the executable program {{P}}WARD_STAY in package $TMP.
|
||||
- Selection screen:
|
||||
- Parameter P_MINWG, type {{P}}ANIMAL-WEIGHT_KG, mandatory: the smallest
|
||||
weight of an animal to include.
|
||||
- Select-option S_ENCL for the enclosure.
|
||||
- Show the result with CL_SALV_TABLE. The output table has these columns with
|
||||
these names: ENCLOSURE, ANIMALS, COST.
|
||||
- Parameter P_FROM, type DATS, mandatory. The first admission date to include.
|
||||
- Parameter P_TO, type DATS, mandatory. The last admission date to include.
|
||||
- Select-option S_WARD for the ward.
|
||||
- Show the result with CL_SALV_TABLE. The output table has exactly these columns
|
||||
with these names and types:
|
||||
- WARD: type {{P}}ADMIT-WARD.
|
||||
- ADMISSIONS: type I.
|
||||
- BED_DAYS: type I.
|
||||
- TOTAL_COST: type {{P}}ADMIT-DAILY_RATE.
|
||||
|
||||
# 5. Business rules
|
||||
1. Include an animal only if WEIGHT_KG is greater than or equal to P_MINWG and
|
||||
ENCLOSURE is in S_ENCL.
|
||||
2. Show one line for each enclosure that has at least one included animal.
|
||||
3. ANIMALS is the number of included animals of the enclosure.
|
||||
4. COST is the sum of FOOD_COST of the included animals of the enclosure.
|
||||
5. Sort the lines by COST, the highest cost first.
|
||||
6. If two lines have the same COST, sort them by ENCLOSURE in ascending order.
|
||||
|
||||
1. Include an admission only if ADMIT_DATE is on or after P_FROM, ADMIT_DATE is
|
||||
on or before P_TO, and WARD is in S_WARD.
|
||||
2. The bed days of one admission are DISCHARGE_DATE minus ADMIT_DATE.
|
||||
3. If DISCHARGE_DATE of an admission is initial, use P_TO as the discharge date
|
||||
of this admission.
|
||||
4. The cost of one admission is the bed days of the admission multiplied by
|
||||
DAILY_RATE.
|
||||
5. Show one line for each ward that has at least one included admission.
|
||||
6. ADMISSIONS is the number of included admissions of the ward.
|
||||
7. BED_DAYS is the sum of the bed days of the included admissions of the ward.
|
||||
8. TOTAL_COST is the sum of the costs of the included admissions of the ward.
|
||||
9. Sort the lines by TOTAL_COST, the highest total first.
|
||||
|
||||
# 6. Constraints
|
||||
- Release target: 7.40 SP05. Use only ABAP syntax that is available in this
|
||||
release. Do not use syntax of a newer release.
|
||||
- Coding standards: Clean ABAP. Read the data with one database access.
|
||||
- Out of scope: do not change {{P}}ANIMAL.
|
||||
|
||||
- Release target: 7.40 SP05. Do not use ABAP syntax that is newer than
|
||||
7.40 SP05. Examples of newer syntax are table expressions, FOR or REDUCE in
|
||||
constructor expressions, string aggregation, UNION, and WITH.
|
||||
- Coding standards: Clean ABAP. Read the admissions with one database access.
|
||||
- Out of scope: do not change the table {{P}}ADMIT.
|
||||
|
||||
# 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.
|
||||
|
||||
Reference in New Issue
Block a user