Files
abap-llm/tasks_gen/train/G1138/spec.md
2026-10-05 18:02:52 +02:00

48 lines
2.0 KiB
Markdown

# 1. Goal
A beverage bottling plant fills bottles on several filling lines. Show the output of
each filling line for one production day in an ALV list. The shift supervisor uses
the list to compare the filling lines.
# 2. Open questions
None.
# 3. Context
- Table {{P}}BOTTLE exists in package $TMP. It contains data.
Fields:
- REC_ID (INT4, key): the number of the record.
- LINE_NO (CHAR 4): the number of the filling line.
- PROD_DATE (DATS): the production day.
- SHIFT_NO (CHAR 1): the shift.
- BOTTLES (INT4): the number of bottles that the line filled in this record.
- STOP_MIN (INT4): the minutes that the line stopped in this record.
# 4. Contract
- Create the executable program {{P}}LINE_OUTPUT in package $TMP.
- Selection screen:
- Parameter P_DATE, type DATS, mandatory: the production day to show.
- Select-option S_SHIFT for the shift number.
- Show the result with CL_SALV_TABLE. The output table has these columns with these
names:
- LINE_NO: the number of the filling line.
- BOTTLES: the total number of bottles that the line filled.
- STOPS: the number of records of the line that have a stop.
# 5. Business rules
1. Include a record only if PROD_DATE is equal to P_DATE and SHIFT_NO is in S_SHIFT.
2. Show one line for each filling line that has at least one included record.
3. BOTTLES is the sum of the BOTTLES values of the included records of the line.
4. STOPS is the number of included records of the line where STOP_MIN is greater
than zero.
5. Sort the lines by BOTTLES, the highest number first. If two lines have the same
BOTTLES value, sort them by LINE_NO in ascending order.
# 6. Constraints
- Release target: 7.40 SP05. Use only syntax that this release supports.
- Coding standards: Clean ABAP. Read the records with one database access.
- Out of scope: do not change {{P}}BOTTLE.
# 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.