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: 

number display

Former Member
0 Kudos

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

abapdeveloper20
Contributor
0 Kudos

Hi,

check this Function module in SE37

CONVERSION_EXIT_ALPHA_INPUT

it will return the value in ur required format

reward if useful

~Lakshmiraj~

10 REPLIES 10

Former Member
0 Kudos

Hi,

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

data v_num(3) type n.

Cheers,

jose.

Former Member
0 Kudos

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...

Former Member
0 Kudos

HI, you can try this.

data: l_out(2) type n.

l_out = sy-index.

write: /l_out.

abapdeveloper20
Contributor
0 Kudos

Hi,

check this Function module in SE37

CONVERSION_EXIT_ALPHA_INPUT

it will return the value in ur required format

reward if useful

~Lakshmiraj~

former_member708410
Contributor
0 Kudos

Hi,

data num(2) type n.

num = 1.

do 5 times.

write :/2 num.

num = num + 1.

enddo

Former Member
0 Kudos

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

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

former_member1349771
Participant
0 Kudos

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

Former Member
0 Kudos

hi,

simply declare ur data as type n.

data var(2) type n.

former_member1349771
Participant
0 Kudos

Use pack & unpack

data: vno(2),

vno1(2).

vno1 = vno1 + 1.

unpack vno1 to vno1.

Hope u'll problem will be resolved

Former Member
0 Kudos

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.