Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014aUaQeLnwbb1zTpN7kHeat
1.4 KiB
1.4 KiB
1. Goal
Refactor the legacy function module {{P}}MUSEUM_FEE_OLD in function group {{P}}FG_MUSEUM. The function module calculates the entry fee for a museum visit. The behavior of the function module must stay the same. Improve the code quality.
2. Open questions
None.
3. Context
- Function group {{P}}FG_MUSEUM exists in package $TMP.
- Function module {{P}}MUSEUM_FEE_OLD exists in this group. It contains legacy code.
- The function module is called by a ticketing program. The interface must not change.
4. Contract
- Refactor the function module {{P}}MUSEUM_FEE_OLD in function group {{P}}FG_MUSEUM.
- Keep the name and the public interface: the same parameter names, kinds, types, and exceptions.
5. Business rules
- The behavior of the function module must not change. The legacy code defines the business rules.
- The function module must raise the exception INVALID_INPUT for the same inputs as the legacy code.
- The exported values must be the same as the legacy code for all valid inputs.
6. Constraints
- Release target: 8.16.
- Coding standards: Clean ABAP, no ATC priority 1 or 2 findings, methods below 40 statements.
- Out of scope: none.
7. Acceptance
- The function module is active and has no syntax error.
- The behavior is unchanged.
- The hidden tests pass.
- Write ABAP Unit tests for the function module in a global test class.