Step F first pass: 81/92 accepted; budget floor 60 calls; rejected slots moved for regeneration
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014aUaQeLnwbb1zTpN7kHeat
This commit is contained in:
56
tasks_gen/eval/G0142/seed/train_punct_old.prog.abap
Normal file
56
tasks_gen/eval/G0142/seed/train_punct_old.prog.abap
Normal file
@@ -0,0 +1,56 @@
|
||||
REPORT {{p}}train_punct_old.
|
||||
|
||||
DATA gv_line TYPE {{p}}trun-line_code.
|
||||
DATA gv_date TYPE {{p}}trun-plan_date.
|
||||
|
||||
SELECT-OPTIONS s_line FOR gv_line.
|
||||
SELECT-OPTIONS s_date FOR gv_date.
|
||||
|
||||
TYPES: BEGIN OF ty_out,
|
||||
line_code TYPE {{p}}trun-line_code,
|
||||
runs TYPE i,
|
||||
late TYPE i,
|
||||
sum_delay TYPE i,
|
||||
punct TYPE i,
|
||||
END OF ty_out.
|
||||
|
||||
DATA gt_out TYPE STANDARD TABLE OF ty_out.
|
||||
|
||||
FIELD-SYMBOLS <ls_run> TYPE {{p}}trun.
|
||||
FIELD-SYMBOLS <ls_out> TYPE ty_out.
|
||||
|
||||
START-OF-SELECTION.
|
||||
DATA lt_runs TYPE STANDARD TABLE OF {{p}}trun.
|
||||
SELECT * FROM {{p}}trun
|
||||
INTO TABLE @lt_runs
|
||||
WHERE plan_date IN @s_date
|
||||
AND line_code IN @s_line.
|
||||
|
||||
LOOP AT lt_runs ASSIGNING <ls_run>.
|
||||
IF <ls_run>-cancelled = 'X'.
|
||||
CONTINUE.
|
||||
ENDIF.
|
||||
READ TABLE gt_out ASSIGNING <ls_out> WITH KEY line_code = <ls_run>-line_code.
|
||||
IF sy-subrc <> 0.
|
||||
APPEND INITIAL LINE TO gt_out ASSIGNING <ls_out>.
|
||||
<ls_out>-line_code = <ls_run>-line_code.
|
||||
ENDIF.
|
||||
<ls_out>-runs = <ls_out>-runs + 1.
|
||||
<ls_out>-sum_delay = <ls_out>-sum_delay + <ls_run>-delay_min.
|
||||
IF <ls_run>-delay_min > 5.
|
||||
<ls_out>-late = <ls_out>-late + 1.
|
||||
ENDIF.
|
||||
ENDLOOP.
|
||||
|
||||
LOOP AT gt_out ASSIGNING <ls_out>.
|
||||
<ls_out>-punct = ( <ls_out>-runs - <ls_out>-late ) * 100 / <ls_out>-runs.
|
||||
ENDLOOP.
|
||||
|
||||
SORT gt_out BY punct line_code.
|
||||
|
||||
TRY.
|
||||
cl_salv_table=>factory( IMPORTING r_salv_table = DATA(lo_alv)
|
||||
CHANGING t_table = gt_out ).
|
||||
lo_alv->display( ).
|
||||
CATCH cx_salv_msg.
|
||||
ENDTRY.
|
||||
Reference in New Issue
Block a user