How to converts string number into integer without leading zeroes in ABAP/4

We can apply function module "CONVERSION_EXIT_ALPHA_OUTPUT’ to convert string number to integer without leading zeroes.

Example


  DATA: lv_number TYPE I,
lv_string(10) TYPE C VALUE ’0000000012’.

CALL FUNCTION ’CONVERSION_EXIT_ALPHA_OUTPUT’
  EXPORTING
    INPUT       = lv_string
  IMPORTING
    OUTPUT      = lv_number
          .



*** Output -> lv_number = 12

Post new comment