Mutation check done on all accepted tasks; mutant fixes; dump filter in proxy
- skip sy-subrc lines and CDS type lengths; CDS literal mutants; mutate helper classes - proxy: sap_short_dumps shows only dumps of the current run - 26/26 tasks pass; results in docs/faz1-tasarim.md 11g Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014aUaQeLnwbb1zTpN7kHeat
This commit is contained in:
38
tasks_gen/eval/G0013/faulty/m1_repl_qty.func.abap
Normal file
38
tasks_gen/eval/G0013/faulty/m1_repl_qty.func.abap
Normal file
@@ -0,0 +1,38 @@
|
||||
FUNCTION {{p}}repl_qty
|
||||
IMPORTING
|
||||
iv_stock TYPE decfloat34
|
||||
iv_safety TYPE decfloat34
|
||||
iv_lot_size TYPE decfloat34
|
||||
iv_min_order TYPE decfloat34
|
||||
EXPORTING
|
||||
ev_order_qty TYPE decfloat34
|
||||
ev_action TYPE string
|
||||
EXCEPTIONS
|
||||
invalid_input.
|
||||
|
||||
IF iv_lot_size < 0 AND iv_min_order < 0.
|
||||
RAISE invalid_input.
|
||||
ENDIF.
|
||||
|
||||
DATA lv_required TYPE decfloat34.
|
||||
lv_required = iv_safety - iv_stock.
|
||||
|
||||
IF lv_required <= 0.
|
||||
ev_order_qty = 0.
|
||||
ev_action = 'NONE'.
|
||||
RETURN.
|
||||
ENDIF.
|
||||
|
||||
IF iv_lot_size > 0.
|
||||
ev_order_qty = ceil( lv_required / iv_lot_size ) * iv_lot_size.
|
||||
ELSE.
|
||||
ev_order_qty = lv_required.
|
||||
ENDIF.
|
||||
|
||||
IF ev_order_qty < iv_min_order.
|
||||
ev_order_qty = iv_min_order.
|
||||
ENDIF.
|
||||
|
||||
ev_action = 'ORDER'.
|
||||
|
||||
ENDFUNCTION.
|
||||
Reference in New Issue
Block a user