# 1. Goal Calculate the price of a key cutting order. The checkout program calls one function module for each order. The function module must have the same interface as the sample function module, because the checkout program calls all order modules in the same way. # 2. Open questions None. # 3. Context - Function group {{P}}FG_KEY exists in package $TMP. - Function module {{P}}KEY_SAMPLE exists in this group. It is the sample order module. Its interface is the interface that all order modules must use. # 4. Contract - Create the function module {{P}}KEY_PRICE in function group {{P}}FG_KEY. - Use exactly the interface of {{P}}KEY_SAMPLE: the same parameter names, kinds, types, and exceptions. # 5. Business rules 1. If the quantity is less than 1, raise the exception INVALID_QUANTITY. 2. Key type ST (standard): the unit price is 3.50. 3. Key type SE (security): the unit price is 12.00. 4. Key type TR (transponder): the unit price is 45.00. 5. The total price is the unit price multiplied by the quantity. 6. If the quantity is 10 or more, the customer gets a 10 % discount on the total price. 7. Round the total price to 2 decimals, half up. 8. Set ev_valid to true when the order is priced. Set ev_valid to false when the order is not priced. 9. The shop offers only the key types ST, SE, and TR. # 6. Constraints - Release target: SAP_BASIS 816. - Out of scope: do not change {{P}}KEY_SAMPLE. - Coding standards: Clean ABAP. # 7. Acceptance - The function module is active and has no syntax error. - Write ABAP Unit tests for the function module in a global test class.