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

Ranges in select statement

Former Member
0 Likes
504

hi all,

I want to kow how to create ranges and how to use in selet statement

I have list of values A,B,C,D

In select statement I have to check VBTYP not in the above range...

3 REPLIES 3
Read only

Former Member
0 Likes
447

Hi,

Try this.

INITIALIZATION.

RANGES r_vbtyp FOR vbak-vbtyp.

AT SELECTION-SCREEN.

r_vbtyp-sign = 'I'.

r_vbtyp-option = 'BT'.

r_vbtyp-low = 'A'.

APPEND r_vbtyp.

r_vbtyp-sign = 'I'.

r_vbtyp-option = 'BT'.

r_vbtyp-low = 'B'.

APPEND r_vbtyp.

r_vbtyp-sign = 'I'.

r_vbtyp-option = 'BT'.

r_vbtyp-low = 'C'.

APPEND r_vbtyp.

r_vbtyp-sign = 'I'.

r_vbtyp-option = 'BT'.

r_vbtyp-low = 'D'.

APPEND r_vbtyp.

Select - - - from --

WHERE vbtyp NOT IN r_vbtyp-low.

Read only

amit_khare
Active Contributor
0 Likes
447

Check RS reply in this thread -

Regards,

Amit

Read only

Former Member
0 Likes
447

ranges r_vbtyp for vbak-vbtyp.

start-of-selection.

r_vbtyp-low = value.

r_vbtyp-option = 'EQ'.

r_vbtyp-sign = 'I'.

append r_vbtyp.

r_vbtyp-low = value.

r_vbtyp-option = 'EQ'.

r_vbtyp-sign = 'I'.

append r_vbtyp.

select * from table into table int_table

where vbtyp in r_vbtyp.

Reward Points if it is helpful

Thanks

Seshu