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: 

conversion routine

Former Member
0 Kudos

Hi,

Could anyone plz tell me what are Conversion routines?How they are used?Where they are used with an example?

Thanks,

Priya.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

check PROJ table. PSPNR has the conversion routine. U can find it in domain of PSPNR field. Name is KONPD.

PSPNR has data length as 8. Internally it has some other value w.r.t. original value.

If u want to display original value follow this.

call conversion_exit_KONPD_output.

Export to FM itab-pspnr(8).

Import to program itab-pspnr(24).

Regards,

Subbu

6 REPLIES 6

Former Member
0 Kudos

hi chandipriya,

These are used for padding zeros at the first and also filter zeros at end.we have to conversion routines,They are

1.converion_exit_alpha_input.

Conversion exit ALPHA, external->internal

ALPHA conversion is used especially with account numbers. During conversion from the external to the internal format, the system checks to see if input in the INPUT field is purely numeric, that is, if this input consists only of numbers, possibly with spaces before and after them. If this is the case, then the number string is inserted right- justified in the display field OUTPUT and all spaces to the left of the value are filled with zeroes ('0'). If the input is not purely numeric, it is inserted in the display field from left to right and all extra spaces are filled with blanks.

Example:

(Input field and output field are both eight characters in length)

1. '1234 ' --> '00001234'

2. 'ABCD ' --> 'ABCD '

3. ' 1234 ' --> '00001234'

2.CONVERSION_EXIT_ALPHA_OUTPUT

Reversing conversion undertaken by function module CONVERSION_EXIT_ALPHA_INPUT. The contents of the INPUT field are converted to display format and placed in the OUTPUT field.

EX:

1.'00001234' -


> 1234.

Award points if helpful.

Kiran Kumar.g

Have a Nice Day..

Former Member
0 Kudos

Hi,

u can find the conversion routine of a field in its domain.

it is used to convert the values entered to the form that will be stored in the table.

say for language we enter EN it gets stored as E.

Regards,

Will

Former Member
0 Kudos

Hi,

check PROJ table. PSPNR has the conversion routine. U can find it in domain of PSPNR field. Name is KONPD.

PSPNR has data length as 8. Internally it has some other value w.r.t. original value.

If u want to display original value follow this.

call conversion_exit_KONPD_output.

Export to FM itab-pspnr(8).

Import to program itab-pspnr(24).

Regards,

Subbu

Former Member
0 Kudos

hi

good

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.

eg . refer to the vbak table.

Go to SE11 -> VBAK -> Display mode -> double click on the data element VBELN_VA

Double click on the domain VBELN

You can find the conversion routine in the Output characteristics.

check this link

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

thanks

mrutyun^

Former Member
0 Kudos

Hi this will help u.

Conversions - This type of transfer refers to a one-time transfer from a legacy system to the SAP system. In this case, the “legacy” system is the old system that is being replaced by the SAP system.

For example, the old system being replaced has data for 2,000 vendors that must be transferred to the SAP system.

Interfaces - This type of transfer refers to an ongoing transfer from a complimentary system to the SAP system. In this case, the “complimentary” system is a system that will run along side the SAP system.

For example, customer orders may be taken in another system. For the SAP system to reflect accurate information, these orders must be transferred to the SAP system every night.

BDC can be both interfaces or conversions depending upon the functionality above.

Interfaces are needed when we need data from other than SAP envoronment and vise versa.

Suppose aclient may send his business data through Excel sheet which are to be loaded in his SAP Tables.Then we need to use interfaces.

There are two Categogies.

1.From Presentation Layer to your ABAP Program(and then into Database table)

Presentation layer means from your sytem (from C, drives)

2.From application Server to your ABAP Program(and then into Database table)

Application Server means the server for your Sap System.

For the first case you need to use:From Presentation Layer to your ABAP Program and vise versa)

GUI_UPLOAD to upload data,

GUI_DOWNLOAD to download data

For the Second case(From application Server to your ABAP Program and vise versa)

A.OPEN DATA SET FILE NAME ON APPL.SERVER FOR INPUT ENCODING BY DEFAULT. use tranfer command to send data to application server

B. CLOSE DATA SET.

with regards,

Hema Sundara.

pls give points if u find it helpful.

Former Member
0 Kudos

using conversion routine we can padd the zero to the given field.for this use function modules.

some of the function modules are like

converesion_alpha_routine.