1.6 KiB
1.6 KiB
1. Goal
Show the studio fee of each customer in an ALV list. The studio uses the list to bill its customers for a period.
2. Open questions
None.
3. Context
- The table {{P}}STUDIO exists in package $TMP. It contains the recording sessions of the studio and it contains data. Fields: REC_ID (INT4, key), CUSTOMER (CHAR 10), REC_DATE (DATS), TRACKS (INT4), FEE (DEC 15,2).
4. Contract
- Create the executable program {{P}}STUDIO_BILL in package $TMP.
- Selection screen:
- Parameter P_FROM, type DATS, mandatory: the first recording date to include.
- Parameter P_MIN, type P LENGTH 15 DECIMALS 2, mandatory: the minimum total fee.
- Select-option S_CUST for the customer.
- Show the result with CL_SALV_TABLE. The output table has these columns with
these names:
- CUSTOMER: the customer.
- SESSIONS: the number of included recording sessions of the customer.
- TRACKS: the sum of TRACKS of the included sessions.
- FEE: the sum of FEE of the included sessions.
5. Business rules
- Include a recording session only if REC_DATE is on or after P_FROM, CUSTOMER is in S_CUST, and TRACKS is greater than zero.
- Show one line for each customer that has at least one included session.
- Show only the customers whose total fee is on or after P_MIN.
- Sort the lines by FEE, the highest fee first.
6. Constraints
- Release target: 7.58.
- Coding standards: Clean ABAP. Read the data with one database access.
- Out of scope: do not change the table {{P}}STUDIO.
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.