ABAP 添加前导0和去除前导0

【添加前导0】

  LOOP AT lt_vkorg INTO DATA(ls_vkorg).
    ls_vkorg-vkorg = |{ ls_vkorg-vkorg ALPHA = IN }|.
    MODIFY lt_vkorg FROM ls_vkorg.
  ENDLOOP.

【去除前导0】

LOOP AT gt_data INTO gs_data.
   SHIFT gs_data-lifnr LEFT DELETING LEADING '0'.
   MODIFY gt_data FROM gs_data.
   CLEAR gs_data.
ENDLOOP.

 

你可能感兴趣的:(ABAP,ABAP,前导0)