首页 > 其他 > 详细

添加和去除前导零

时间:2017-09-26 15:49:31      阅读:270      评论:0      收藏:0      [点我收藏+]

"加前导零
DEFINE add_pre_zero.
  call function ‘CONVERSION_EXIT_ALPHA_INPUT‘
    exporting
      input        = &1
    importing
      output       = &2
    exceptions
      length_error 1
      others       2.
  if sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  endif.
END-OF-DEFINITION.

"去前导零
DEFINE delete_pre_zero.
  call function ‘CONVERSION_EXIT_ALPHA_OUTPUT‘
    exporting
      input        = &1
    importing
      output       = &2
    exceptions
      length_error 1
      others       2.
  if sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  endif.
END-OF-DEFINITION.

添加和去除前导零

原文:http://www.cnblogs.com/zxiu/p/7596947.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!