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: 

Ranges in select statement

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

amit_khare
Active Contributor
0 Kudos

Check RS reply in this thread -

Regards,

Amit

Former Member
0 Kudos

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