Application Development and Automation 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: 
Read only

Conversion Routine

Former Member
0 Likes
1,202

Hi All,

Waht is a Conversion Routine.?

where we define conversion routines.

how to make use of these routines in my application programming.?

Best Thanks in Advance,

U,khan.

6 REPLIES 6
Read only

former_member480923
Active Contributor
0 Likes
1,028

Hi

If u have a different input and output parameter in a table field u use a Conversion routine in the Domain level for that field

hope that helps

Anirban

Read only

Former Member
Read only

0 Likes
1,028

You can create conversion routine thru SE37 tcode. Your conversion routine is basically a FM and then attach this routine to the domain of the Z Field.

Conversion takes place when converting the contents of a screen field from display format to SAP-internal format and vice versa and when outputting with the ABAP statement WRITE, depending on the data type of the field.

A conversion routine is identified by its five-place name and is 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 performs the conversion from display format to internal format. The OUTPUT module performs the conversion from internal format to display format.

If a screen field refers to a domain with a conversion routine, this conversion routine is executed automatically each time an entry is made in this screen field or when values are displayed with this screen field.

Read only

Former Member
0 Likes
1,028

HI

GOOD

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.

GO THROUGH THIS LINK FOR MORE INFORMATION

http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee19446011d189700000e8322d00/content.htm

THANKS

MRUTYUN

Read only

Former Member
0 Likes
1,028

Hi ubedulla,

1. It can be best understood with an example.

2. Example : MATNR (18) characters.

3. Say there is one material number

55

4. On selection screen, we just enter

55 (and not 000000000000000055)

5. But in database it is stored with padded zeros.

6. So when fetching from database,

in select query,

AUTOMATIC CONVERSION HAPPENS

in the FIELD VALUE

55=======>000000000000000055

so that matching record is found

(other wise if we just search for 55,

hardcoded in sql, it won't return any record)

7. The same thing happens, when we want to

show the material ON THE SCREEN.

000000000000000055=======>55

(The variable contians all zeros and 55,

but on screen only 55 is shown)

8. THIS KIND OF AUTOMATIC CONVESION,

IS SAP TECHNOLOGY

FOR EASE OF USE PURPOSE ONLY.

9. Such conversions (automatic)

are done thru special function modules,

which are called conversion routines.

10. We can use this FM just like a normal FM.

regards,

amit m.

Read only

Former Member
0 Likes
1,028

Hi,

Conversion routines are used to convert data from source systems to BW compatible data

http://help.sap.com/saphelp_nw04/helpdata/en/2b/e9a20d3347b340946c32331c96a64e/frameset.htm

Chek this link for more info:

Please reward helpful answers.

Regards,

Anjali