05-26-2007 12:31 PM
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...
05-26-2007 12:39 PM
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.
05-26-2007 12:40 PM
05-26-2007 1:20 PM
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