Files
Kral 5de5e2851c Generator: pilot analysis and fixes; G0002-G0021 tasks; handover notes merged
- Static bundle checks (name length, seed type, reserved words, contract test classes,
  testclasses_file), local abaplint parser check before SAP, max_tokens, robust JSON parse
- Runner: G2 for CDS views with parameters, contract_check detail in report
- G0020 and G0013 fixed by review and revalidated (oracle 100, null 0)
- Pilot results in docs/faz1-tasarim.md 11e; handover notes merged into CLAUDE.md and docs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 05:04:23 +02:00

1.7 KiB

1. Goal

Show how many sales items and how much sales value each region has, split into three size classes. A report reads the result. The calculation must run in the database, in a CDS view.

2. Open questions

None.

3. Context

  • Table {{P}}SALE (sales item), package $TMP. Key: SALE_ID (CHAR 10), ITEM_NO (INT4). Fields: REGION (CHAR 2), AMOUNT (DEC 15,2), STATUS (CHAR 1).
  • STATUS 'X' means that the item is cancelled.

4. Contract

  • Create the CDS view entity {{P}}I_SALES_CLASS in package $TMP.
  • Elements, with these names: REGION (key), ITEM_COUNT, SMALL_COUNT, MEDIUM_COUNT, LARGE_COUNT, TOTAL_AMOUNT.
  • No authorization check (#NOT_REQUIRED).

5. Business rules

  1. Ignore every item with STATUS 'X'. Do not count it and do not add its amount.
  2. Show one row for each region that has at least one item that is not cancelled. Do not show a region without such an item.
  3. An item is small if its amount is less than 100.00.
  4. An item is medium if its amount is 100.00 or more and less than 1000.00.
  5. An item is large if its amount is 1000.00 or more.
  6. ITEM_COUNT is the number of items of the region that are not cancelled.
  7. SMALL_COUNT, MEDIUM_COUNT and LARGE_COUNT are the numbers of items of the region in the three size classes.
  8. TOTAL_AMOUNT is the sum of the amounts of all items of the region that are not cancelled, with 2 decimals.

6. Constraints

  • Release target: ABAP Platform 2025 (SAP_BASIS 816).
  • Coding standards: Clean ABAP. Keep methods below 40 statements. Do not create ATC findings of priority 1 or 2.
  • Out of scope: do not change {{P}}SALE.

7. Acceptance

  • The view is active and has no syntax error.
  • The hidden tests pass.
  • Write ABAP Unit tests with CL_CDS_TEST_ENVIRONMENT in a global test class.