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: 

Generation of sequence numbers

Former Member
0 Kudos

Hi guys,

I have to generate a 11-digit no.The numbers have to be in a sequence.I have to use the number range object snum to do this.Then I have to concatenate this no. to 019.So I will have a 14 digit no as follows.

01900000000001

01900000000002

01900000000003

...........

How to achieve this in abap using the no range object or any customized FM

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Check the FM <b>NUMBER_GET_NEXT</b>

2 REPLIES 2

Former Member
0 Kudos

Check the FM <b>NUMBER_GET_NEXT</b>

Former Member
0 Kudos

Hi,

check the below code.

data: v_num(11) type n,

v_num_char(11) type c,

v_number(14) type c.

do 20 times.

clear v_num.

v_num = sy-index.

v_num_char = v_num.

concatenate '019' v_num_char into v_number.

write:/5 v_number.

clear v_number.

enddo.