- 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>
44 lines
1.7 KiB
Markdown
44 lines
1.7 KiB
Markdown
# 1. Goal
|
|
Show the sales of each book for a period that the caller gives. The period comes
|
|
from the caller, so the view needs input parameters. A report and an OData
|
|
service read the view.
|
|
|
|
# 2. Open questions
|
|
None.
|
|
|
|
# 3. Context
|
|
- Table {{P}}BOOK (book master data), package $TMP. Key: BOOK_ID (CHAR 10).
|
|
Fields: TITLE (CHAR 40), CATEGORY (CHAR 10), PRICE (DEC 15,2), STOCK (INT4).
|
|
- Table {{P}}SALE (book sales), package $TMP. Key: BOOK_ID (CHAR 10),
|
|
SALE_DATE (DATS). Field: QUANTITY (INT4).
|
|
|
|
# 4. Contract
|
|
- Create the CDS view entity {{P}}I_BOOK_REVENUE in package $TMP.
|
|
- The view has two input parameters, with these names and types:
|
|
- P_FROM (DATS): first day of the period.
|
|
- P_TO (DATS): last day of the period.
|
|
- Elements, with these names: BOOK_ID (key), TITLE, CATEGORY, SOLD_QUANTITY,
|
|
REVENUE.
|
|
- No authorization check (#NOT_REQUIRED).
|
|
- Create the global ABAP Unit test class {{P}}T20_TEST for the view.
|
|
|
|
# 5. Business rules
|
|
1. The view has one row for each book that has at least one sale whose
|
|
SALE_DATE is in the period. The period starts on P_FROM and ends on P_TO.
|
|
Both limits belong to the period.
|
|
2. A book without a sale in the period has no row in the view.
|
|
3. SOLD_QUANTITY is the sum of QUANTITY of all sales of the book in the period.
|
|
4. REVENUE is the sum of QUANTITY multiplied by PRICE of the book, over all
|
|
sales of the book in the period. REVENUE has 2 decimals.
|
|
5. TITLE and CATEGORY are the title and the category of the book.
|
|
|
|
# 6. Constraints
|
|
- Release target: 7.58.
|
|
- Coding standards: Clean ABAP, methods below 40 statements.
|
|
- Out of scope: do not change {{P}}BOOK and {{P}}SALE.
|
|
|
|
# 7. Acceptance
|
|
- The view is active and has no syntax error.
|
|
- The hidden tests pass.
|
|
- {{P}}T20_TEST uses CL_CDS_TEST_ENVIRONMENT and passes.
|