Application Development 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: 

'conversion_exit_alpha_input'

Former Member
0 Kudos
3,426

Hi All,

What is the function of 'conversion_exit_alpha_input'

FM? How it will be used?

Thanks,

GovindarajanUmadevi.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
500

This is an conversion FM. Used mainly when dealing with select queries.

Because what appears on screen is not the way it is stored in databases. There will be a conversion routine.

So if we are reading directly from tables, we have to use the conversion exits.

Generally these are provided with the data element defintion you are dealing with.

regards,

Sandeep Josyula

*Mark Helpful answers

9 REPLIES 9

roberto_tagliento
Active Contributor
0 Kudos
500

CONVERSION_EXIT_ALPHA_INPUT - converts any number into a string fill with zeroes-right

example:

input = 123

output = 0000000000000...000000000000123

CONVERSION_EXIT_ALPHA_OUTPUT - converts any number with zeroes-right into a simple integer

example:

input = 00000000000123

output = 123

former_member181962
Active Contributor
0 Kudos
500

Hi Uma,

It si well documented.

Check this:

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.

Usage:

call function 'CONVERSION_EXIT_ALPHA_INPUT'

exporting

input = v_input

importing

output = v_output

exceptions

others = 1.

Regards,

ravi

Message was edited by: Ravi Kanth Talagana

FredericGirod
Active Contributor
0 Kudos
500

This is used for field conversion to allow user to enter a number without preceding 0. This function will put 0 at the begining of the field to set in numeric format.

Fred

Former Member
0 Kudos
501

This is an conversion FM. Used mainly when dealing with select queries.

Because what appears on screen is not the way it is stored in databases. There will be a conversion routine.

So if we are reading directly from tables, we have to use the conversion exits.

Generally these are provided with the data element defintion you are dealing with.

regards,

Sandeep Josyula

*Mark Helpful answers

venkata_ramisetti
Active Contributor
0 Kudos
500

Hi,

For some data in SAP, there is an internal format and external format.

If you check MATERIAL number, if you display value it shoows in external format(that is removing leading zeros).

For converting internal to external/external to internal we use conversion_exit_alpha_input/conversion_exit_alpha_output

Eg:

Assume before function call v_matnr = 1000.

call function 'conversion_exit_alpha_input'

exporting

input = v_matnr

importing

outout = v_matnr.

after function call v_matnr = 000000000000001000

roberto_tagliento
Active Contributor
0 Kudos
500

Govindarajan Umadevi

By the way:

help yourself.

use trn 'se37'. or doubel-click on this fm.

you can find a document.

*************

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.

Parameters

INPUT

OUTPUT

Former Member
0 Kudos
500

Hi,

Here the Docu of the FM:

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

Exceptions

Function group

ALFA

short example:

<b>REPORT ZGRO_TEST. .

*

DATA: c1(18) value '123'.

DATA: c2(18).

*

write: / c1.

*

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

INPUT = C1

IMPORTING

OUTPUT = C2.

*

write: / c2.</b>

Hope it helps.

regards, Dieter

Former Member
0 Kudos
500

Hi all,

We will upload data from ascii files to BW system.

In the txt files we have amount field .Amount field length is 17 in the BW system.To upload data in the ascii format we have to use fixed lenght data in the txt files.But in the txt file amount field is not fixed,stable ,also containd decimal places, for example 4500,58.

How can we fix its size to 17.

We know there is a function CONVERSION_EXIT_ALPHA_INPUT but we can not be able to use it for amount key figure.

Does anyone solve such a problem like this?

Thanks for your help.

Former Member
0 Kudos
500

HI

USE OF CONVERSION_EXIT_ALPHA_INPUT IS TO CONVERT EXTERNAL FORMAT OF FIELD VALUE TO INTERNAL FORMAT i.e. HOW IT STORES IN DATABASE.

EX : WHEN WE GENERATE ON REPORT ON SALES ORDERS,

SYSTEM DISPLAYS 'SO' NUMBERS WITH SUPPRESSING ZEROS.

LIKE 2345 OR 45632 ETC

BUT ACTUALLY 'SO' NUMBER LENGTH IS 10 CHARACTER.

TO CONVERT 2345 TO 0000002345 WE USE CONVERSION_EXIT_ALPHA_INPUT.