Stage 2 summary at 50 accepted trajectories
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
36
tasks_gen/train/G1139/reference/loan_check.func.abap
Normal file
36
tasks_gen/train/G1139/reference/loan_check.func.abap
Normal file
@@ -0,0 +1,36 @@
|
||||
FUNCTION {{p}}loan_check
|
||||
IMPORTING
|
||||
iv_fragile TYPE abap_bool
|
||||
iv_insured TYPE abap_bool
|
||||
iv_days TYPE i
|
||||
EXPORTING
|
||||
ev_approved TYPE abap_bool
|
||||
ev_reason TYPE string
|
||||
EXCEPTIONS
|
||||
invalid_days.
|
||||
|
||||
IF iv_days < 1.
|
||||
RAISE invalid_days.
|
||||
ENDIF.
|
||||
|
||||
IF iv_days > 90.
|
||||
ev_approved = abap_false.
|
||||
ev_reason = 'TOO_LONG'.
|
||||
RETURN.
|
||||
ENDIF.
|
||||
|
||||
" Open point: rules 3 and 4 give opposite priority to the insurance rule and
|
||||
" the fragility rule for an insured fragile exhibit. This reference applies
|
||||
" rule 3 (the insurance rule first).
|
||||
IF iv_insured = abap_true.
|
||||
ev_approved = abap_true.
|
||||
ev_reason = 'INSURED'.
|
||||
ELSEIF iv_fragile = abap_true.
|
||||
ev_approved = abap_false.
|
||||
ev_reason = 'FRAGILE'.
|
||||
ELSE.
|
||||
ev_approved = abap_true.
|
||||
ev_reason = 'OK'.
|
||||
ENDIF.
|
||||
|
||||
ENDFUNCTION.
|
||||
Reference in New Issue
Block a user