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

2.0 KiB

1. Goal

A safety-services company inspects fire extinguishers at customer sites. The inspection office runs the report {{P}}EXT_CHECK_OLD in package $TMP to see which extinguishers need attention. The report works, but the source is a legacy tangle. Rewrite the source so that a colleague can read it and change it. The observable behavior of the report must not change.

2. Open questions

None.

3. Context

  • {{P}}EXT_CHECK_OLD is an executable program in package $TMP. It is active.
  • {{P}}EXTING is a database table in package $TMP with the inspection master data: EXT_ID (INT4, key), SITE (CHAR 6), EXT_TYPE (CHAR 2), WEIGHT_G (INT4), PRESSURE_BAR (INT4), LAST_CHECK (DATS), NEXT_CHECK (DATS).
  • The program reads the table and writes one output line for each extinguisher.

4. Contract

  • Keep the program name {{P}}EXT_CHECK_OLD and the package $TMP.
  • Keep the selection screen unchanged:
    • P_FROM, type DATS, obligatory.
    • P_TO, type DATS, obligatory.
    • S_SITE, select-option for SITE.
    • P_DEFECT, checkbox.
  • The output is an ALV list (CL_SALV_TABLE). One output line has the columns EXT_ID, SITE, EXT_TYPE, WEIGHT_G, PRESSURE_BAR, STATE and URGENCY.
  • No other public name of the program changes.

5. Business rules

The present source of {{P}}EXT_CHECK_OLD defines the rules. Read that source before you change anything. Every rule stays in force: the selection logic, the special cases, the values of the columns STATE and URGENCY, and the order of the output lines.

6. Constraints

  • Release target: 7.58.
  • Coding standards: Clean ABAP. Split the logic into small methods with clear names. No method has 40 statements or more. Read the database with a single SELECT. Do not use obsolete language elements.
  • Out of scope: do not change the table {{P}}EXTING and the seed class {{P}}EXT_SEED.

7. Acceptance

  • The program is active and free of syntax errors.
  • The output is identical to the output before the change.
  • The hidden tests pass.
  • Add ABAP Unit tests as local test classes in the program.