‎2006 Nov 07 4:06 AM
Hi,
Function that puts leading zeros. I am getting a text file which has got cost center as 1234, but i need to put leading zero in order to check the availability of the value in the table csks.
I want a function module which puts leading zero.
‎2006 Nov 07 4:08 AM
CONVERSION_EXIT_ALPHA_INPUT for getting leading zeros
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
INPUT = IBSIS-ZUONR
IMPORTING
OUTPUT = IBSIS-ZUONR
EXCEPTIONS
OTHERS = 1.
Regards
- Gopi
‎2006 Nov 07 4:11 AM
data : l_val type lifnr.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = l_val
IMPORTING
OUTPUT = l_val.
write : l_val
‎2006 Nov 07 4:51 AM
Hi,
chk this one.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = in_value
IMPORTING
output = out_value.
rgds
Anver
pls mark helpful answers
‎2006 Nov 07 4:59 AM
Hi,
Use the function module
<b>CONVERSION_EXIT_ALPHA_INPUT</b>
converts any number into a string fill with zeroes, with the number at the extreme right
Example:
input = 123
output = 0000000000000...000000000000123
‎2006 Nov 07 5:12 AM
hi,
Use FM <b>'CONVERSION_EXIT_ALPHA_INPUT'</b>
<b>FU CONVERSION_EXIT_ALPHA_INPUT</b>
____________________________________________________
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.
Parameters
INPUT
OUTPUT
Exceptions
Function Group
ALFA
Regards,
Santosh