Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
33,981

CONVERSION ROUTINES

In this blog will discuss about conversion routines and in detail about alpha conversion routine

CONVERSION ROUTINES are also called as CONVERSION EXITS.

Conversion routines are used to convert the fields either from display format to SAP internal format or from SAP internal format to display format.

If this standard conversion is unsuitable, you can override it by specifying a conversion routine in the underlying domains.

Where these conversion routines exist?

1. At Info object level maintenance level

2. At Datasource level

Coming to conversion Types

TYPES OF CONVERSION ROUTINES:

ALPHA Conversion Routine

BUCAT Conversion Routine

EAN11 Conversion Routine

GJAHR Conversion Routine

ISOLA Conversion Routine

MATN1 Conversion Routine

NUMCV Conversion Routine

PER15 Conversion Routine

PER16 Conversion Routine

PER17 Conversion Routine

POSID Conversion Routine

PROJ Conversion Routine

REQID Conversion Routine

WBSEL Conversion Routine

SDATE Conversion Routine

IDATE Conversion Routine 

ALPHA CONVERSION ROUTINE

An ALPHA conversion routine adds leading zeros if the character field only contains numbers.

ALPHA conversion routine is registered automatically when a characteristic is created. If you do not want to use this routine, you have to remove it manually

For every conversion routine, two function modules are available. You could use these modules without using the actual conversion routine setup, by calling them directly. The function modules for conversion routines are split up in output (internal to external) and input (external to internal).

Function modules for APLHA:

1)   

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

   Example:

       Input = 123

       output = 0000000000000...000000000000123.

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

Example:

Input = 00000000000123

output = 123

Example of Alpha conversion routine 

Created a info objects customer number (ZCN) with length 10 and conversion routine alpha as shown in below screen shot.

Now we can maintain the data 51 to the info object it is automatically converted to ‘0000000051’ as shown in below screen.

Now we can remove the alpha conversion to the above object ZCN and load the same data 51 as shown in below screen

Now the value 51 didn’t change it’s format as the  conversion routine has been removed in info object general tab.

So instead of adding leading zeros it populate the orginal value(51) directly.

Follow my next Blog for GJAHR Conversion Routine

8 Comments
Former Member
0 Kudos

This is good document for Learners.

Former Member
0 Kudos

It is very useful Document

Former Member
0 Kudos

it is very usefull for me...

0 Kudos

Simple and understandable. Thank you !!

manju_manjunatha
Participant
0 Kudos

Good document..

manju_manjunatha
Participant
0 Kudos

Good..

0 Kudos
On which TRANSACTION you have created the ZCN object for conversion routine?????
saima_afreen
Explorer
0 Kudos

Hi all,

I have a alphanumeric number for size/Dimension as 4X7 etc. Due to which I'm getting the below error. Can anyone please help me with this.

image (8).png

Thanks,

Saima

Labels in this area