Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014aUaQeLnwbb1zTpN7kHeat
40 lines
1.7 KiB
Markdown
40 lines
1.7 KiB
Markdown
# 1. Goal
|
|
A print shop prints jobs for its customers. The sales team needs a report that
|
|
shows, for each customer, the number of jobs and the revenue of a period.
|
|
|
|
# 2. Open questions
|
|
None.
|
|
|
|
# 3. Context
|
|
- Table {{P}}PRTJOB exists in package $TMP. It contains data.
|
|
Fields: JOB_ID (INT4, key), CUSTOMER (CHAR 10), JOB_DATE (DATS),
|
|
SHEETS (INT4), AMOUNT (DEC 15,2).
|
|
|
|
# 4. Contract
|
|
- Create the executable program {{P}}PRINT_SUM in package $TMP.
|
|
- Selection screen:
|
|
- Parameter P_FROM, type DATS, obligatory: the first job date to include.
|
|
- Select-option S_CUST for the customer.
|
|
- Show the result with CL_SALV_TABLE. The output table has these columns, with
|
|
these names: CUSTOMER, JOBS, SHEETS, REVENUE.
|
|
|
|
# 5. Business rules
|
|
1. Include a job only if JOB_DATE is on or after P_FROM and CUSTOMER is in S_CUST.
|
|
2. Show one line for each customer that has at least one included job.
|
|
3. JOBS is the number of included jobs of the customer.
|
|
4. SHEETS is the sum of the SHEETS values of the included jobs of the customer.
|
|
5. REVENUE is the sum of the AMOUNT values of the included jobs of the customer.
|
|
6. Sort the lines by REVENUE, the highest revenue first. If two customers have
|
|
the same revenue, sort these two customers by CUSTOMER in ascending order.
|
|
|
|
# 6. Constraints
|
|
- Release target: 7.02. Write the program in ABAP and ABAP SQL syntax that
|
|
release 7.02 supports. Do not use syntax that is newer than 7.02.
|
|
- Coding standards: Clean ABAP. Read the data with one database access.
|
|
- Out of scope: do not change {{P}}PRTJOB.
|
|
|
|
# 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.
|