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

43 lines
1.7 KiB
Markdown

# 1. Goal
Show the effort of each project. A report and an OData service read the effort,
so the calculation must be in the database, in a CDS view.
# 2. Open questions
None.
# 3. Context
- Table {{P}}PROJ (project), package $TMP. Key: PROJ_ID (CHAR 10).
Fields: PROJ_NAME (CHAR 30), BUDGET (DEC 15,2).
- Table {{P}}ASGN (project assignment), package $TMP. Key: PROJ_ID (CHAR 10),
EMP_ID (CHAR 10). Fields: WORK_HOURS (INT4, the hours of the assignment),
RATE (DEC 15,2, cost of one hour), STATUS (CHAR 1).
# 4. Contract
- Create the CDS view entity {{P}}I_PROJ_EFFORT in package $TMP.
- Elements, with these names: PROJ_ID (key), PROJ_NAME, ASSIGN_COUNT,
TOTAL_HOURS, TOTAL_COST, OVER_BUDGET.
- No authorization check (#NOT_REQUIRED).
# 5. Business rules
1. Show one row for each project that has at least one active assignment.
An assignment is active when its STATUS is 'A'. An assignment with
another status is not active. A project without active assignments does
not appear in the view.
2. ASSIGN_COUNT is the number of active assignments of the project.
3. TOTAL_HOURS is the sum of WORK_HOURS of the active assignments of the
project.
4. TOTAL_COST is the sum of WORK_HOURS multiplied by RATE of the active
assignments of the project, with 2 decimals.
5. OVER_BUDGET is 'X' when TOTAL_COST is greater than the BUDGET of the
project. Otherwise OVER_BUDGET is 'N'.
# 6. Constraints
- Release target: 7.58.
- Coding standards: Clean ABAP.
- Out of scope: do not change {{P}}PROJ and {{P}}ASGN.
# 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.