# 1. Goal An auction house charges a buyer's premium on each lot that it sells. The auction program calls one premium module for each sold lot. The premium module must use the same interface as the sample module {{P}}AUC_SAMPLE, because the auction program calls all premium modules in the same way. # 2. Open questions None. # 3. Context - Function group {{P}}FG_AUCT exists in package $TMP. - Function module {{P}}AUC_SAMPLE exists in this group. It is the sample premium module. Its interface is the interface that all premium modules must use. # 4. Contract - Create the function module {{P}}AUC_PREMIUM in function group {{P}}FG_AUCT. - Use exactly the interface of {{P}}AUC_SAMPLE: the same parameter names, kinds, types, and exceptions. - The exception is INVALID_HAMMER. # 5. Business rules 1. If the hammer price is less than 0, raise the exception INVALID_HAMMER and stop. 2. Set the skip flag to false, except in rule 3. 3. Lot type C (charity): set the skip flag to true. Leave the fee unchanged and stop. 4. For every other lot type, calculate the band premium from the hammer price: - the part of the hammer price up to 1,000.00: 20 % - the part of the hammer price above 1,000.00 up to 10,000.00: 12 % - the part of the hammer price above 10,000.00: 6 % 5. Channel O (online): the premium is 90 % of the band premium. For every other channel the premium is the band premium. 6. Round the premium of rule 5 half up to 2 decimals. 7. The minimum premium is 5.00. The maximum premium is 5,000.00. 8. The fee is the premium of rules 4 to 7. # 6. Constraints - Release target: 7.02. The code must run on a 7.02 system. Do not use syntax that was introduced after release 7.02. - Coding standards: Clean ABAP. - Out of scope: do not change {{P}}AUC_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.