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

sequential number

Former Member
0 Likes
611

sure

i want to generate the sequential number in the following sequence:

0000,0001,0002...0008,0009,000A,000B....000Z.then

0010,0011,0012....0018,0019,001A,001B...001Z,then

0020,0021,0022,0023....0028,0029,002A,002B...002Z,

0030....0039,003A,003B...003Z.......00ZZ then

0100,0101,0102....010Z...0110...011Z...012Z...01ZZ...0ZZZ then

1000,1001,....100Z...10ZZ...1ZZZ....ZZZZ.

i hope i given clear explanation.if u have any querys plse mail me.

thanks

with regards

aaryaa

2 REPLIES 2
Read only

Former Member
0 Likes
481

Hi Madhu,

this code works well and has alrredy been specified in the previous post..

PARAMETERS p_i TYPE i.

DATA d_i1 TYPE i.

DATA d_i2 TYPE i.

DATA d_i3 TYPE i.

DATA d_i4 TYPE i.

DATA code(4).

DATA num(36) VALUE '0123456798ABCDEFGHIJKLMNOPQRSTUVWXYZ'.

d_i4 = p_i MOD 36.

p_i = p_i DIV 36.

d_i3 = p_i MOD 36.

p_i = p_i DIV 36.

d_i2 = p_i MOD 36.

p_i = p_i DIV 36.

d_i1 = p_i MOD 36.

code0(1) = numd_i1(1).

code1(1) = numd_i2(1).

code2(1) = numd_i3(1).

code3(1) = numd_i4(1).

WRITE : / code.

regards

satesh

Read only

Former Member
0 Likes
481

This is a modification to the previous program..

kindly close all your previous threads..

PARAMETERS p_i TYPE i.

DATA : temp type i , it type i value 1.

DATA d_i1 TYPE i.

DATA d_i2 TYPE i.

DATA d_i3 TYPE i.

DATA d_i4 TYPE i.

DATA code(4).

DATA num(36) VALUE '0123456798ABCDEFGHIJKLMNOPQRSTUVWXYZ'.

temp = p_i.

p_i = 1.

do temp times.

d_i4 = p_i MOD 36.

p_i = p_i DIV 36.

d_i3 = p_i MOD 36.

p_i = p_i DIV 36.

d_i2 = p_i MOD 36.

p_i = p_i DIV 36.

d_i1 = p_i MOD 36.

code0(1) = numd_i1(1).

code1(1) = numd_i2(1).

code2(1) = numd_i3(1).

code3(1) = numd_i4(1).

WRITE : / code.

it = it + 1.

p_i = it.

enddo.

regards

satesh