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>
This commit is contained in:
Kral
2026-10-03 05:04:23 +02:00
parent 15eb9f1bb2
commit 5de5e2851c
162 changed files with 9943 additions and 23 deletions

View File

@@ -0,0 +1,22 @@
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Project effort'
define view entity {{P}}I_PROJ_EFFORT
as select from {{p}}proj as proj
inner join {{p}}asgn as asgn on asgn.proj_id = proj.proj_id
{
key proj.proj_id as proj_id,
proj.proj_name as proj_name,
count( * ) as assign_count,
sum( asgn.work_hours ) as total_hours,
sum( cast( asgn.work_hours as abap.dec( 15, 2 ) ) * asgn.rate ) as total_cost,
case
when sum( cast( asgn.work_hours as abap.dec( 15, 2 ) ) * asgn.rate ) > proj.budget
then 'X'
else 'N'
end as over_budget
}
where asgn.status = 'A'
group by
proj.proj_id,
proj.proj_name,
proj.budget

View File

@@ -0,0 +1,53 @@
CLASS {{p}}t21_test DEFINITION PUBLIC FINAL CREATE PUBLIC
FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
PRIVATE SECTION.
CLASS-DATA go_env TYPE REF TO if_cds_test_environment.
CLASS-METHODS class_setup.
CLASS-METHODS class_teardown.
METHODS setup.
METHODS effort_of_one_project FOR TESTING.
METHODS no_active_assignment FOR TESTING.
ENDCLASS.
CLASS {{p}}t21_test IMPLEMENTATION.
METHOD class_setup.
go_env = cl_cds_test_environment=>create( i_for_entity = '{{P}}I_PROJ_EFFORT' ).
ENDMETHOD.
METHOD class_teardown.
go_env->destroy( ).
ENDMETHOD.
METHOD setup.
DATA lt_proj TYPE STANDARD TABLE OF {{p}}proj WITH EMPTY KEY.
DATA lt_asgn TYPE STANDARD TABLE OF {{p}}asgn WITH EMPTY KEY.
go_env->clear_doubles( ).
lt_proj = VALUE #( ( proj_id = 'A' proj_name = 'ONE' budget = '100.00' )
( proj_id = 'B' proj_name = 'TWO' budget = '10.00' ) ).
lt_asgn = VALUE #( ( proj_id = 'A' emp_id = 'E1' work_hours = 2 rate = '10.00' status = 'A' )
( proj_id = 'A' emp_id = 'E2' work_hours = 1 rate = '5.00' status = 'A' )
( proj_id = 'A' emp_id = 'E3' work_hours = 9 rate = '9.00' status = 'I' )
( proj_id = 'B' emp_id = 'E1' work_hours = 3 rate = '1.00' status = 'I' ) ).
go_env->insert_test_data( lt_proj ).
go_env->insert_test_data( lt_asgn ).
ENDMETHOD.
METHOD effort_of_one_project.
SELECT SINGLE assign_count, total_hours, total_cost, over_budget
FROM {{p}}i_proj_effort
WHERE proj_id = 'A'
INTO @DATA(ls_effort).
cl_abap_unit_assert=>assert_equals( exp = CONV i( ls_effort-assign_count ) act = 2 ).
cl_abap_unit_assert=>assert_equals( exp = CONV i( ls_effort-total_hours ) act = 3 ).
cl_abap_unit_assert=>assert_equals( exp = CONV decfloat34( '25.00' )
act = CONV decfloat34( ls_effort-total_cost ) ).
cl_abap_unit_assert=>assert_equals( exp = 'N' act = ls_effort-over_budget ).
ENDMETHOD.
METHOD no_active_assignment.
SELECT SINGLE proj_id FROM {{p}}i_proj_effort WHERE proj_id = 'B' INTO @DATA(lv_proj_id).
cl_abap_unit_assert=>assert_equals( exp = 4 act = sy-subrc ).
cl_abap_unit_assert=>assert_initial( lv_proj_id ).
ENDMETHOD.
ENDCLASS.