‎2008 Mar 12 12:25 PM
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
‎2008 Mar 12 12:28 PM
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
‎2008 Mar 12 12:28 PM
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
‎2008 Mar 12 12:32 PM
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
‎2008 Mar 12 12:34 PM
Hi,
If you use the same field in output then it will add leading 0
regards
Shiva
‎2008 Mar 12 12:41 PM
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
‎2008 Mar 12 12:43 PM
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
‎2008 Mar 12 12:37 PM
hi,
populate the value to type n variable of same length ... it holds the leading zeros ...
Regards,
Santosh
‎2008 Mar 12 12:45 PM
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