50 lines
2.1 KiB
Markdown
50 lines
2.1 KiB
Markdown
# 1. Goal
|
|
The mobile bicycle repair service "Bike Doctor" repairs bicycles at the homes of
|
|
its customers. The office needs a list of the repair jobs of one day. Each line
|
|
shows the job, the customer, the mechanic, the number of spare parts and the
|
|
total price of the parts. The office uses the list to check the daily work.
|
|
|
|
# 2. Open questions
|
|
None.
|
|
|
|
# 3. Context
|
|
- Table {{P}}MECH is in package $TMP. It contains the mechanics.
|
|
Fields: MECH_ID (CHAR 6, key), MECH_NAME (CHAR 40).
|
|
- Table {{P}}JOBHDR is in package $TMP. It contains the repair jobs.
|
|
Fields: JOB_ID (INT4, key), JOB_DATE (DATS), CUSTOMER (CHAR 40),
|
|
MECH_ID (CHAR 6).
|
|
- Table {{P}}JOBITM is in package $TMP. It contains the spare parts that the
|
|
mechanic used for a job.
|
|
Fields: JOB_ID (INT4, key), ITEM_NO (INT4, key), SPARE_PART (CHAR 20),
|
|
QTY (INT4), PRICE (DEC 15,2).
|
|
- The three tables contain data.
|
|
|
|
# 4. Contract
|
|
- Create the executable program {{P}}REPAIR_LIST in package $TMP.
|
|
- Selection screen:
|
|
- Parameter P_DATE, type DATS, mandatory: the job date to show.
|
|
- Show the result with CL_SALV_TABLE. The output table has these columns with
|
|
these names: JOB_ID, CUSTOMER, MECHANIC, ITEMS, TOTAL.
|
|
|
|
# 5. Business rules
|
|
1. Include a job only if its JOB_DATE is equal to P_DATE.
|
|
2. Include a job only if at least one item of this job is in {{P}}JOBITM.
|
|
3. ITEMS is the number of the items of the job.
|
|
4. TOTAL is the sum of QTY * PRICE over all items of the job.
|
|
5. MECHANIC is the MECH_NAME of the mechanic whose MECH_ID is the MECH_ID of
|
|
the job.
|
|
6. If no mechanic has this MECH_ID, MECHANIC is the text UNKNOWN.
|
|
7. Show exactly one line for each included job.
|
|
8. Sort the lines by TOTAL, the highest total first. If two lines have the same
|
|
TOTAL, sort them by JOB_ID, the lowest first.
|
|
|
|
# 6. Constraints
|
|
- Release target: SAP_BASIS 816 (ABAP Platform 2025).
|
|
- Coding standards: Clean ABAP. Read each table with one database access.
|
|
- Out of scope: do not change {{P}}MECH, {{P}}JOBHDR and {{P}}JOBITM.
|
|
|
|
# 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.
|