Skip to Content
0
Former Member
Oct 21, 2011 at 08:37 AM

CX_SY_CONVERSION_OVERFLOW for type p decimals 14

2558 Views

am I mistaken on this:

apparently type p cannot use 11 (the number 11)

if type p is used with 14 decimals.

sample code:

(NetWeaver 7.02)

FORM test_p_und_die_11.
  data lr_cxroot type ref to cx_root.
  data l_p_decimals13 type p decimals 13.
  data l_p_decimals14 type p decimals 14.
  TRY.
    write /'NEXT: l_p_decimals13 = 11'.
    l_p_decimals13 = 11.
    write: /'OK ' , (*) l_p_decimals13.
    write /'NEXT: l_p_decimals14 = 11'.
    l_p_decimals14 = 11.  "CX_SY_CONVERSION_OVERFLOW
  CATCH CX_SY_CONVERSION_OVERFLOW INTO lr_cxroot.
    data l_s type string.
    l_s = lr_cxroot->get_text( ).
    write: /'exception :'  , l_s.
  ENDTRY.
ENDFORM.