|Home • Trainings • Quiz • Tips • Tutorials • Functional • Cert Q's • Interview Q's • Jobs • Testimonials • Advertise • Contact Us|
Creating custom conversion routine and assigning to the domain
By Jayshree Santosh Mahajan, Cognizant
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
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:
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.
Let’ say there is a date field and
we want to display the date field 20121203 as 12/2012.
Here are the steps how this can be
that we have created domain for the date field ZCRDAT and we need to assign the
custom conversion routine to this particular domain.
to the transaction code SE37, enter the function module name
CONVERSION_EXIT_ZDATE_INPUT and click create.
screen will appear. Enter the function group, short text and click save.
screen will appear. Click continue.
the import parameter INPUT.
to export tab and enter export parameter OUTPUT as below.
and activate the function module.
create the function module CONVERSION_EXIT_ZDATE_OUTPUT.
the function group, short text and click save.
pop up will appear.
the INPUT import parameter.
the OUTPUT export parameter.
go to the source code tab, enter appropriate code here and activate the function
Please send us your feedback/suggestions at webmaster@SAPTechnical.COM
©2006-2007 SAPTechnical.COM. All rights reserved.
product names are trademarks of their respective companies. SAPTechnical.COM
is in no way affiliated with SAP AG.
Graphic Design by Round the Bend Wizards