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

Former Member
0 Likes
657

Hi,

number(10) type c.

if number starting from '8' series then i want to assigne its name = 'ABC' .i.e. '800000090' , '800000091'

and if number startingfrom '9' series then i want to assigne its name = 'PQR' i.e. '900000045', '900000047'

how to do that ?

1 ACCEPTED SOLUTION
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
634

Hello,

What's the big deal ? Use offsetting techniques.

DATA: number(10) type c,
OFFSET TYPE CHAR1.

OFFSET = NUMBER+0(1).

BR,

Suhas

3 REPLIES 3
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
635

Hello,

What's the big deal ? Use offsetting techniques.

DATA: number(10) type c,
OFFSET TYPE CHAR1.

OFFSET = NUMBER+0(1).

BR,

Suhas

Read only

Former Member
0 Likes
634

use the offset option to give this naming convention

if number+0(1) = '8'.

ABC..

ELSEIFnumber+0(1) = '9'.

PQR..

endif.

Br,

vijay.

Read only

Former Member
0 Likes
634

hi

DATA:number(10) TYPE c.
number = '80'.
IF number+0(1) = 8.
  MESSAGE 'ABC' TYPE 'i'.
ELSEIF number+0(1) = 9.
  MESSAGE 'PQR' TYPE 'i'.
ENDIF.