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

ADD ZERO

Former Member
0 Likes
543

Hi all,

I want add one zero to number.

Ex: If number is 8

I want to add 1 zero to 8. That is 08

How can I do that?

Thanks,

shashikanth

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
517

hi,

try this also

data i type i.

data i1(2) type n.

i = 8.

i1 = i.

write i1.

cheers,

sasi

4 REPLIES 4
Read only

Former Member
0 Likes
517

hi,

data x(2) type n.

n = 8.

concatenate '0' n into n.

cheers,

sasi

Read only

Former Member
0 Likes
517

Use FM CONVERSION_EXIT_ALPHA_INPUT

Your output field should be of length 2, or just use concadinate command.

Rgds.

Read only

athavanraja
Active Contributor
0 Likes
517

option 1.

concatenate '0' '8' into variable name.

option2.

declare a vairable like below.

data: myvar(2) type n.

move: '8' to myvar.

now my var will be 08

Regards

Raja

Read only

Former Member
0 Likes
518

hi,

try this also

data i type i.

data i1(2) type n.

i = 8.

i1 = i.

write i1.

cheers,

sasi