Files
abap-llm/tasks_gen/eval/G0174/spec.md

1.2 KiB

1. Goal

Show the total revenue and the number of sales for each flower type in an ALV list. The florist uses the list to compare flower types for a period.

2. Open questions

None.

3. Context

  • Table {{P}}FLSALE exists in package $TMP. It contains data. Fields: SALE_ID (INT4, key), FLOWER_TYPE (CHAR 10), SALE_DATE (DATS), AMOUNT (DEC 15,2).

4. Contract

  • Create the executable program {{P}}FLOWER_SALES in package $TMP.
  • Selection screen:
    • Parameter P_FROM, type DATS, mandatory: the first sale date to include.
    • Select-option S_FLOWER for the flower type.
  • Show the result with CL_SALV_TABLE. The output table has these columns, with these names: FLOWER_TYPE, TOTAL_REVENUE (sum of AMOUNT), COUNT (number of sales).

5. Business rules

  1. Include a sale only if SALE_DATE is on or after P_FROM and FLOWER_TYPE is in S_FLOWER.
  2. Show one line for each flower type that has at least one included sale.
  3. Sort the lines by TOTAL_REVENUE.

6. Constraints

  • Release target: 816.
  • Coding standards: Clean ABAP. Read the data with one database access.
  • Out of scope: do not change {{P}}FLSALE.

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.