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_input

Former Member
0 Likes
1,543

hi mates,

when using 'conversion_exit_alpha_input' before select queries. whether it wil add 0's to the output, or trips the prefixed 0's in output.

reply asap.

regards

manoharan

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,380

hi,

Yes you can do that before selection ....

.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
  EXPORTING
    input         = v_matnr
  IMPORTING
    OUTPUT        = v_matnr
          .

 select single * from mara where matnr = v_matnr. 

.

Regards,

Santosh

7 REPLIES 7
Read only

Former Member
0 Likes
1,381

hi,

Yes you can do that before selection ....

.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
  EXPORTING
    input         = v_matnr
  IMPORTING
    OUTPUT        = v_matnr
          .

 select single * from mara where matnr = v_matnr. 

.

Regards,

Santosh

Read only

0 Likes
1,380

hi thanks for ur reply, but whether it wil add 0's to the output, or trims the prefixed 0's in output.

regards

manoharan

Read only

0 Likes
1,380

Hi,

If you use the same field in output then it will add leading 0

regards

Shiva

Read only

0 Likes
1,380

Hi,

The FM will add 0 before the field.

Like if Material no. 12 it will add 16 0's before 12

ex.00000000012

The FM Conversion exitalpha_output will trim leading 0.

It converts any number with zeroes right into a simple integer

Read only

0 Likes
1,380

hi,

If you want to trim the 0's before displaying then use

CONVERSION_EXIT_ALPHA_OUTPUT


CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
  EXPORTING
    input         = v_matnr
  IMPORTING
    OUTPUT        = v_matnr
          . 

Regards,

Santosh

Read only

Former Member
0 Likes
1,380

hi,

populate the value to type n variable of same length ... it holds the leading zeros ...

Regards,

Santosh

Read only

Former Member
0 Likes
1,380

Hi Manoj,

FU CONVERSION_EXIT_ALPHA_INPUT

____________________________________________________

Short text

Conversion exit ALPHA, external->internal

ALPHA conversion is used especially with account numbers. During

conversion from the external to the internal format, the system checks

to see if input in the INPUT field is purely numeric, that is, if this

input consists only of numbers, possibly with spaces before and after

them. If this is the case, then the number string is inserted right-

justified in the display field OUTPUT and all spaces to the left of the

value are filled with zeroes ('0'). If the input is not purely numeric,

it is inserted in the display field from left to right and all extra

spaces are filled with blanks.

Example:

(Input field and output field are both eight characters in length)

1. '1234 ' > '00001234'

2. 'ABCD ' > 'ABCD '

3. ' 1234 ' > '00001234'

Conversion from the internal to the external format (function module

CONVERSION_EXIT_ALPHA_OUTPUT) is undertaken in exactly the opposite

manner.

Parameter

INPUT

OUTPUT