ABAP中加上前导零、去除前导零

ABAP中加上前导零、去除前导零

ABAP中加上前导零、去除前导零的function module

  PERFORM add_zero CHANGING p_in.
  PERFORM del_zero  CHANGING p_out.

*加上p_in的前导零

 FORM add_zero  CHANGING p_in.

  CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
      input  = p_in
    IMPORTING
      utput = p_in.

 ENDFORM.


*去除p_out的前导零

 FORM del_zero CHANGING p_out.

  CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
    EXPORTING
      input  = p_out
    IMPORTING
     output = p_out.

ENDFORM.

你可能感兴趣的:(ABAP开发)