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: 

HELP me in conversion routine

Former Member
0 Kudos

hi,

what is the purpose of conversion routine,how to define with in the report.plase send some examle report by using conversion routines.

with warm regards,

khadar

5 REPLIES 5

Former Member
0 Kudos

Hi,

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.

If standard conversion is not suitable, it can be overridden by specifying a conversion routine in the underlying domain.

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.

former_member181962
Active Contributor
0 Kudos

Convesrion Routine is a function module which converts the internal representation of a field to external and vice versa.

For example all the dates are stored in the database as yyyymmdd format. BUt Users cannot understand this format, hence if we use a conversion routine, they can view it in an understandable format.

If there is a Conversion Routine already defined ar domain level, you do not need to call the function module explicitly. The write statement will automatically use Conesrion routine.

for eg:

write: sy-datum. "If you see in debug, it would show yyyymmdd format.

But on the display, it will show differently.

Regards,

Ravi

Former Member
0 Kudos

HI Khadar,

Please have a look at the below links. It addresses both conversion routines and programs.

http://www.sap-img.com/abap/what-is-conversion-programs.htm

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

You can use conversion routine similar to a function module.

Hope this helps.

Thanks,

Imtiaz

Former Member

Former Member
0 Kudos

hi

good

A conversion routine conv is represented by two function modules that adhere to the naming convention CONVERSION_EXIT_conv_INPUT|OUTPUT. In these function modules, no statements can be executed that interrupt the program flow or end a SAP LUW. A conversion routine can be assigned to a domain in the ABAP Dictionary. If a screen field refers to a domain with a conversion routine, the system automatically executes the function module ..._INPUT for every input in the relevant screen field and the function module ..._OUTPUT when values are displayed in this screen field and uses the converted content in each case. If a data object refers to such a domain, the function module ..._OUTPUT is executed for the output of the data object in a list and the converted content is displayed.

thanks

mrutyun^