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

number display

Former Member
0 Likes
1,146

hi,

there is one auto increament number.

its displayed like 1, 2, 3..................

but i want to display 01, 02, 03.................

i tried with int as well as char having length 3.

but not showing.

can any one help me?

thanks

Santosini

1 ACCEPTED SOLUTION
Read only

abapdeveloper20
Contributor
0 Likes
1,124

Hi,

check this Function module in SE37

CONVERSION_EXIT_ALPHA_INPUT

it will return the value in ur required format

reward if useful

~Lakshmiraj~

hi,

there is one auto increament number.

its displayed like 1, 2, 3..................

but i want to display 01, 02, 03.................

i tried with int as well as char having length 3.

but not showing.

can any one help me?

thanks

Santosini

10 REPLIES 10
Read only

Former Member
0 Likes
1,124

Hi,

declare it as type n ........

data v_num(3) type n.

Cheers,

jose.

Read only

Former Member
0 Likes
1,124

Hi,

TCODES SNRO

FUNCTION MODULE

NUMBER_GET_NEXT

call function 'NUMBER_GET_NEXT'
                exporting
                  nr_range_nr             = '01'
                  object                  = 'ZGPNO'  "SNRO OBJECT  NAME
                importing
                  number                  = gexno
                exceptions
                  interval_not_found      = 1
                  number_range_not_intern = 2
                  objec
                  t_not_found        = 3
                  quantity_is_0           = 4
                  quantity_is_not_1       = 5
                  interval_overflow       = 6
                  buffer_overflow         = 7
                  others                  = 8.

Regards,

V.Balaji

Reward if Usefull...

Read only

Former Member
0 Likes
1,124

HI, you can try this.

data: l_out(2) type n.

l_out = sy-index.

write: /l_out.

Read only

abapdeveloper20
Contributor
0 Likes
1,125

Hi,

check this Function module in SE37

CONVERSION_EXIT_ALPHA_INPUT

it will return the value in ur required format

reward if useful

~Lakshmiraj~

Read only

Former Member
0 Likes
1,124

Hi,

data num(2) type n.

num = 1.

do 5 times.

write :/2 num.

num = num + 1.

enddo

Read only

Former Member
0 Likes
1,124

i am using this autoincreament number in a table of smartform.

how i will define the lenghth like sl_no(3) type n.

Read only

Former Member
0 Likes
1,124

Use pack & unpack

data: vno(2),

vno1(2).

vno1 = vno1 + 1.

unpack vno1 to vno1.

Hope u'll problem will be resolved

Edited by: ABHUT on Mar 28, 2008 10:10 AM

Read only

Former Member
0 Likes
1,124

hi,

simply declare ur data as type n.

data var(2) type n.

Read only

Former Member
0 Likes
1,124

Use pack & unpack

data: vno(2),

vno1(2).

vno1 = vno1 + 1.

unpack vno1 to vno1.

Hope u'll problem will be resolved

Read only

Former Member
0 Likes
1,124

thanks, its been solved.

i used this FM

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = sl_no

IMPORTING

OUTPUT = i.

and got my req. output.

thank you very much.