SAP GUI 7.50 Patch Level 13
Download from MegaDownload from Mail.ru
REPORT ztest_overflow.
DATA gv_value TYPE string VALUE '123456789123456'.
DATA gv_wrbtr TYPE wrbtr_d.
CLASS lcl_test DEFINITION.
PUBLIC SECTION.
CLASS-METHODS convert
IMPORTING iv_value TYPE clike
RETURNING VALUE(rv_value) TYPE decfloat34
RAISING cx_static_check.
ENDCLASS.
CLASS lcl_test IMPLEMENTATION.
METHOD convert.
DATA(lv_value) = iv_value.
DO 2 TIMES.
TRY .
rv_value = lv_value.
EXIT.
CATCH cx_root INTO DATA(lx_error).
IF sy-index = 1.
TRANSLATE lv_value USING ',..,'.
ELSE.
RAISE EXCEPTION TYPE cx_sral.
ENDIF.
ENDTRY.
ENDDO.
ENDMETHOD.
ENDCLASS.
START-OF-SELECTION.
BREAK-POINT.
TRY .
DATA(lv_value) = lcl_test=>convert( gv_value ).
gv_wrbtr = lv_value.
CATCH cx_root.
WRITE 'Overflow'. NEW-LINE.
ENDTRY.
TRY .
gv_wrbtr = lcl_test=>convert( gv_value ). "!!!!DUMP
CATCH cx_root.
WRITE 'Overflow'. NEW-LINE.
ENDTRY.