Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014aUaQeLnwbb1zTpN7kHeat
41 lines
1.5 KiB
Markdown
41 lines
1.5 KiB
Markdown
# 1. Goal
|
|
Calculate the fee of a grooming appointment. A booking program calls one event
|
|
module for each appointment. The event module must have the same interface as the
|
|
sample event module, because the booking program calls all event modules in the
|
|
same way.
|
|
|
|
# 2. Open questions
|
|
None.
|
|
|
|
# 3. Context
|
|
- Function group {{P}}FG_GROOM exists in package $TMP.
|
|
- Function module {{P}}GROOM_SAMPLE exists in this group. It is the sample event
|
|
module. Its interface is the interface that all event modules must use.
|
|
|
|
# 4. Contract
|
|
- Create the function module {{P}}GROOM_FEE in function group {{P}}FG_GROOM.
|
|
- Use exactly the interface of {{P}}GROOM_SAMPLE: the same parameter names, kinds,
|
|
types, and exceptions.
|
|
|
|
# 5. Business rules
|
|
1. If the size is not one of 'S', 'M' or 'L', raise the exception INVALID_SIZE.
|
|
This check applies to every channel.
|
|
2. Set the skip flag to false.
|
|
3. If the channel is 'PARTNER', set the skip flag to true and do not change the
|
|
fee. Rules 4 to 7 do not apply.
|
|
4. The base fee depends on the size: S = 26.50, M = 42.50, L = 64.50.
|
|
5. If the hair is long, add 15 % of the base fee. Round the surcharge half up to
|
|
2 decimals.
|
|
6. If the appointment is on a weekend, add 10.00.
|
|
7. The fee is the base fee plus the surcharges of rules 5 and 6.
|
|
|
|
# 6. Constraints
|
|
- Release target: 7.58.
|
|
- Coding standards: Clean ABAP.
|
|
- Out of scope: do not change {{P}}GROOM_SAMPLE.
|
|
|
|
# 7. Acceptance
|
|
- The function module is active and has no syntax error.
|
|
- The hidden tests pass.
|
|
- Write ABAP Unit tests for the function module in a global test class.
|