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: 

How to declare a 2 digit number that must have a padded 0 to the left?

Former Member
0 Kudos

It is on a custom subscreen.

For instance:

01 02 03 04......10 11 12

What is declaration syntax? Thank-You

1 ACCEPTED SOLUTION

naimesh_patel
Active Contributor
0 Kudos

Use Type N, length 2.

Like:


data: l_num(2) type n .

L_NUM = 1.

WRITE: L_NUM.

Regards,

Naimesh Patel

3 REPLIES 3

naimesh_patel
Active Contributor
0 Kudos

Use Type N, length 2.

Like:


data: l_num(2) type n .

L_NUM = 1.

WRITE: L_NUM.

Regards,

Naimesh Patel

Former Member
0 Kudos

Type N will do this automatically.

former_member203501
Active Contributor
0 Kudos

report .

data: i type i  value 1 .

 do 12 times .
 write: i .
 i = i + 1 .
 enddo .