‎2009 Dec 14 5:48 PM
Hi,
Why this code is writing 00638161342A without deleting leading zeros??? I've got a file with materials in that format, the materials can contain letters and zeros in the middle. How can I delete leading zeros (the number of leading zeros can be variable and the length of material too!).
DATA: a type matnr VALUE '00638161342A'.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = a
IMPORTING
OUTPUT = a.
write a.
Thanks
‎2009 Dec 15 12:16 AM
Marshal,
the conversion exits remove leading zeros from numerical input. 00638161342A is not numeric because there is a 'A' at the end.
Regards,
Clemens
‎2009 Dec 14 5:52 PM
‎2009 Dec 14 6:09 PM
Not working.
But I found a solution by myself...
SHIFT a LEFT DELETING LEADING '0'.
‎2009 Dec 14 6:23 PM
CONVERSION_EXIT_ALPHA_OUTPUT works just fine. It just doesn't meet your requirements.
Your question is answered, so please close it.
Rob
‎2009 Dec 15 12:16 AM
Marshal,
the conversion exits remove leading zeros from numerical input. 00638161342A is not numeric because there is a 'A' at the end.
Regards,
Clemens
‎2013 Aug 26 12:32 PM
CONVERSION_EXIT_ALPHA_OUTPUT is used to deleting leading zero's means
It's Convert the data from internal format to external format.
Ex:
data : v_matnr like mara-matnr value '0000001234'.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
INPUT = v_matnr
IMPORTING
OUTPUT =v_matnr.
* Here v_matnr value is 1234
select single * from mara where matnr = v_matnr.