cancel
Showing results for 
Search instead for 
Did you mean: 

conversion_exit_alpha_input

Former Member
0 Kudos

Hi,

I am working on a smartform program in which I want the number 300003295 o be converted to 0300003295.So,

I have used 'conversion_exit_alpha_input' function module.After executing this function module I can see the value as 0000000000000000000000000000000000000000000000000000000000000300003295.I want to append only one digit to the number and the number should contain 10 digits.How can I do this?

Regards,

Hema

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Instead of using conversion_exit_alpha_input.

data: l_name(10).

clear l_name.

l_name = tdline.

shift l_name right.

replace ' ' with '0' in l_name.

former_member181995
Active Contributor
0 Kudos

Hema,

Use the data type of exporting parameter exactly same as you want . like char10 or type p decimal 0.

Amit.

Former Member
0 Kudos

Hi,

I have declared the function module like this.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = l_name

IMPORTING

OUTPUT = l_name

.

l_name is declared like thead-tdname.

tdname has a data type of 70 characters.Now how can I declare l_name inthe program.

Former Member
0 Kudos

Hi Hema,

Declare I_NAME with type char(10).

And then pass, I_NAME to tdname.

Hope this is helpful to you. If you need further information, revert back.

Reward all the helpful answers.

Regards

Nagaraj T

sangeetha_sk
Participant
0 Kudos

check the data type of the importing parameter.

If the length of the importing parameter is 10, u will get surely only 10 charatcers with zero in the front provided the exporting parameter to FM is of 9 characters.

Former Member
0 Kudos

Hi ,

In the function module there is no fileld length mentioned, so it will take the maximum lenth and will give the value with the leading zero's . If you define the filed with the lenth 10 and use that filed in the FM it will display correctly.

Rajesh