ABAP alpha 转换 Alpha = IN, 增加前导0, ALPHA = OUT , 删除前导0

1:

"增加前导0
DATA: ls_matnr TYPE matnr VALUE '15000042'.
DATA(ls_in_matnr) = |{ ls_matnr ALPHA = IN }|.
WRITE: ls_in_matnr.  "示例结果:000000000015000042

"删除前导0
DATA: gs_matnr TYPE matnr VALUE '000000000015000042'.
DATA(gs_out_matnr) = |{ gs_matnr ALPHA = OUT }|.
WRITE:/ gs_out_matnr.  "示例结果:15000042

 

posted @ 2020-08-13 08:08  1367356  阅读(6131)  评论(1编辑  收藏  举报