‎2008 Jan 25 5:12 AM
can anyone tell me what the function module 'CONVERSION_EXIT_ALPHA_INPUT' do with an example.
Thanks
‎2008 Jan 25 5:15 AM
Hi,
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.
‎2008 Jan 25 5:15 AM
Hi,
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.
‎2008 Jan 25 5:17 AM
Hi
Hope it will help you.
Reward if help.
What is Conversion Programs?
Conversion takes place when converting the contents of a screen field from display format to SAP-internal format and vice versa and when outputting with the ABAP statement WRITE, depending on the data type of the field.
If standard conversion is not suitable, it can be overridden by specifying a conversion routine in the underlying domain.
A conversion routine is identified by its five-place name and is stored as a group of two function modules.
The function modules have a fixed naming convention.
The following function modules are assigned to conversion routine xxxxx:
CONVERSION_EXIT_xxxxx_INPUT
CONVERSION_EXIT_xxxxx_OUTPUT
The INPUT module performs the conversion from display format to internal format. The OUTPUT module performs
the conversion from internal format to display format.
If a screen field refers to a domain with a conversion routine, this conversion routine is executed automatically each time an entry is made in this screen field or when values are displayed with this screen field.
Eg. refer to the vbak table.
Go to SE11 -> VBAK -> Display mode -> double click on the data element VBELN_VA
Double click on the domain VBELN
You can find the conversion routine in the Output characteristics.
This is the FM Documentation.
FU CONVERSION_EXIT_ALPHA_INPUT
____________________________________________________
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
‎2008 Jan 25 5:21 AM
Thanks ramesh and deepankar and i have rewarded the same for the answer.
‎2008 Jan 25 6:24 AM
conversion exits are to change the format of the input as per the database format.
'CONVERSION_EXIT_ALPHA_INPUT' is used to change the format of input text as per the text displayed in database.
Eg. if u enter material number as '1234' but actually in database its 10 digits so this function module will change it to 10 digits by appending 6 zeros before it. i.e. '0000001234' .
Hope this is enough for ur understanding.
Pl reward if its helpful to u.
‎2008 Jun 19 8:38 AM
‎2008 Jun 19 9:36 AM
DATA: LV2(3) TYPE c,
LV3(2) TYPE c,
CLEAR: LV2,
LV3.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = T_DRAW-DOKTL1 " input is zero
IMPORTING
OUTPUT = LV2. " output is double zero
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = T_DRAW-DOKVR1 "input is zero
IMPORTING
OUTPUT = LV3. " output is triple zero
SELECT SINGLE * FROM DRAW into DRAW WHERE DOKNR = T_DRAW-DOKNR1
AND DOKAR = T_DRAW-DOKAR1
AND DOKTL = LV2
AND DOKVR = LV3.
in above select stmt
i want pass 000 for DOKTL
i want pass 00 for DOKVR Througt excel sheet.
but we can not enter 000 , 00 in excel ssheet.
if we enter 000 it will take 0 only,
but in our program we have to pass 000 to DOKTL.
so we convert 0 to 000
that time we have to use 'CONVERSION_EXIT_ALPHA_INPUT'
pls give points if it usefull.