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 Routines

Former Member
0 Kudos

Hi all,

What do we mean by Conversion Routines and exactly where do we use them.

Regards,

3 REPLIES 3

paruchuri_nagesh
Active Contributor
0 Kudos

hi

conversion routines are which changes from display format to sap format and vice versa

As the name goes they are primarly used for converting the values from target variable to source variable.

They are mostly used to store the data differently in database. for this the function modules we use CONVERSION_EXIT_ALPHA_INPUT and CONVERSION_EXIT_ALPHA_OUTPUT which is used to remove or add leading zeros to the data variable before soting the data in the database.

Regards

Nagesh.Paruchuri

Former Member
0 Kudos

Hi Somya,

<b>what are conversion routines??</b>

Depending on the data type of the field, there is a conversion when the contents of a screen field are converted from display format to SAP-internal format and vice versa. If this standard conversion is not suitable, it can be overridden by defining a conversion routine in the underlying domain.

Conversion routines are identified by a five-place name and are 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 converts from display format to internal format, and the OUTPUT module converts from internal format to display format.

<b>When do use them??</b>

If a screen field refers to a domain with a conversion routine, this conversion routine is executed automatically when entries are saved in this screen field or when values are displayed in this screen field. The conversion routine of the domain is also triggered when the field contents are output with the WRITE statement.

Thanks,

Vinay

Former Member
0 Kudos

Thanks for the information.

points aswarded accordingly