Skip to Content

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.

/wp-content/uploads/2012/04/n1_95280.png

/wp-content/uploads/2012/04/n2_95279.png

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

/wp-content/uploads/2012/04/n3_95281.png

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

/wp-content/uploads/2012/04/n4_95285.png

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.

/wp-content/uploads/2012/04/n6_95286.png

Follow my next Blog for GJAHR Conversion Routine

To report this post you need to login first.

6 Comments

You must be Logged on to comment or reply to a post.

Leave a Reply