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

need to create SPECIAL CONVERSION ROUTINE

Former Member
0 Likes
2,123

Hi!

I need to create SPECIAL CONVERSION ROUTINE for conversion of a numeric field, it will be used for MastData transfering.

It is inbound user exit and conversion rule is the following: The receiver field is converted.

What tcode to use for creating such exit and what are the steps? I have never done it before, so do not know how to start.

Will reward,

M.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,926

Hi,

Another option, you can write an abap program that contains subroutine form.

Add your logic conversion inside the subroutine form and call this subroutine from other program to get the conversion result.


Syntax:
PERFORM form IN PROGRAM prog.

Options: 
1. ... TABLES   itab1 itab2 ... 

2. ... USING    u1 u2 u3 ... 

3. ... CHANGING c1 c2 c3 ... 

4. ... IF FOUND 

Regards,

Ferry Lianto

14 REPLIES 14
Read only

Former Member
0 Likes
1,926

name of it should look like CONVERSION_EXIT_&_INPUT.

& - name of conversion routine.

M.

Read only

Former Member
0 Likes
1,926

Please be clear about your requirement, whether you want to implement a user exit or create a conversion routine.

Conversion routine can be given at the domain level.

and for your requirement there is no need to create any conversion exit, use move x to y. statement which will take care of conversions ( if it is the case of just numerics).

Reward points if usefull.

Thanks,

Veerendra.

Read only

0 Likes
1,926

I need to create a User Exit for let's say changing one character in a string (string consists of numbers, but this is not important).

So as I understand, I have to create simple FM via se37, correct?

M.

Read only

0 Likes
1,926

If you want to use same routine in multiple places then you can create using Se37 .

if not you need to use that logic into only one place then implement in directly your user exit.

any any case if you create in SE37 then it will be reusablitity.

Thanks

Seshu

Read only

0 Likes
1,926

I have troubles when creating FM via se37, because when I try to create for example FM CONVERSION_EXIT_ZVAKEY_INPUT, SAP does not allow to do it and sais that this name is reserved, even if I try to use other name for FM....

M.

Read only

0 Likes
1,926

Custome type of Function module start with Z* or Y* ,you should use

Zconv* like

Thanks

Seshu

Read only

0 Likes
1,926

the same problem with ZCONVERSION_EXIT_VAKEY_INPUT or ZCONVERSION_EXIT_ZVAKEY_INPUT - SAP sais that names are reserved...

M.

Read only

0 Likes
1,926

It is just information message ,while creating FM ,you get pop up window.

here you need to give Function group,so function group should start with Z* or Y*

Thanks

Seshu

Read only

0 Likes
1,926

does not work out... created Z function group and try to name my FM as ZCONVERSION_EXIT_VAKEY_INPUT, but SAP sais the same and it is blue warning, so even if I press Enter I can not continue...

M.

Read only

0 Likes
1,926

anyway, I was thinking FM should look like CONVERSION_EXIT_&_INPUT.

& - name of <b>conversion routine</b>.

Maybe is other way to create conversion routine (user exit)?

M.

Read only

Former Member
0 Likes
1,926

Hi,

Please use naming convention starting with Z* or Y* as Seshu mentioned.

Check this link for step by step creating function module.

http://help.sap.com/saphelp_nw04/helpdata/en/26/64f623fa8911d386e70000e82011b8/content.htm

Regards,

Ferry Lianto

Read only

Former Member
0 Likes
1,926

Hi,

It is just a warning message ... press enter to continue your coding.

Regards,

Ferry Lianto

Read only

Former Member
0 Likes
1,926

Hi,

It works fine for me ...

Try this ...

1. Go to SE37.

2. Create new function group start with Z*.

Path: SE37 -> Goto -> Function groups -> Create group -> ....

3. Create new function module start with Z*.

Path: SE37 -> Enter new function module (i.e. ZCONVERSION_EXIT_VAKEY_INPUT) -> Click on create button -> Enter function group to assign and description -> Click on continue button -> ....

Regards,

Ferry Lianto

Read only

Former Member
0 Likes
1,927

Hi,

Another option, you can write an abap program that contains subroutine form.

Add your logic conversion inside the subroutine form and call this subroutine from other program to get the conversion result.


Syntax:
PERFORM form IN PROGRAM prog.

Options: 
1. ... TABLES   itab1 itab2 ... 

2. ... USING    u1 u2 u3 ... 

3. ... CHANGING c1 c2 c3 ... 

4. ... IF FOUND 

Regards,

Ferry Lianto