ABAP--调用SAP的单位转换函数进行单位转换

分享一下我老师大神的人工智能教程。零基础!通俗易懂!风趣幽默!还带黄段子!希望你也加入到我们人工智能的队伍中来!https://blog.csdn.net/jiangjunshow

               

report Zrsbzme10 .
parameters: p_In(10) type c,
            unit_in  like t006-msehi default 'M',
            unit_out like t006-msehi default 'MM',
            round(1) type c          default 'X'.
data: result type p decimals 3,
      input  type p decimals 3.
input   =  p_IN.
call function 'UNIT_CONVERSION_SIMPLE'
     exporting
          input                = input
          round_sign           = round
          unit_in              = unit_in
          unit_out             = unit_out
     importing
          output               = result
     exceptions
          conversion_not_found = 01
          division_by_zero     = 02
          input_invalid        = 03
          output_invalid       = 04
          overflow             = 05
          units_missing        = 06
          unit_in_not_found    = 07
          unit_out_not_found   = 08.
write: 'Result: ',result.
 

           

分享一下我老师大神的人工智能教程。零基础!通俗易懂!风趣幽默!还带黄段子!希望你也加入到我们人工智能的队伍中来!https://blog.csdn.net/jiangjunshow

猜你喜欢

转载自blog.csdn.net/hdduugc/article/details/87913722
今日推荐