Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

CONVERSION_EXIT_ALPHA_OUTPUT not working!

Marcal_Oliveras
Active Contributor
0 Likes
4,499

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

1 ACCEPTED SOLUTION
Read only

Clemenss
Active Contributor
0 Likes
1,559

Marshal,

the conversion exits remove leading zeros from numerical input. 00638161342A is not numeric because there is a 'A' at the end.

Regards,

Clemens

5 REPLIES 5
Read only

former_member156446
Active Contributor
0 Likes
1,559

try CONVERSION_EXIT_MATN1_OUTPUT

Read only

0 Likes
1,559

Not working.

But I found a solution by myself...


SHIFT a LEFT DELETING LEADING '0'.

Read only

0 Likes
1,559

CONVERSION_EXIT_ALPHA_OUTPUT works just fine. It just doesn't meet your requirements.

Your question is answered, so please close it.

Rob

Read only

Clemenss
Active Contributor
0 Likes
1,560

Marshal,

the conversion exits remove leading zeros from numerical input. 00638161342A is not numeric because there is a 'A' at the end.

Regards,

Clemens

Read only

Former Member
0 Likes
1,559

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.