‎2007 Mar 16 6:30 AM
hi,
in my sql statement i need a field value in between '1A' - '1Z'
for example kstar char10, i need to extract field value in between the first 2 value starts with '1A' to '1Z'.
thanks
‎2007 Mar 16 6:40 AM
eI,
DATA : v_char value '1'.
Select all the records into internal table.
Loop at itab.
if itab-filed+0(1) eq v_char.
if itab-filed+0(2) CA sy-abcde.
endif.
endif.
endloop.
reward if useful....
‎2007 Mar 16 6:34 AM
data : v_char(3)
ranges : s_char for v_char.
s_char-sign = 'I'.
s_char-option = 'CP'.
s_char-low = '1A'.
s_char-high = '1Z'.
append s_char.
select ..... where field in s_char.
‎2007 Mar 16 6:35 AM
Hi,
One way to do is:
declare a ranges object for that field: v_kostl for cost-kostl.
then populate it with the values:
v_kostl-low = '1A'.
v_kostl-high = '1Z'.
v_kostl-sign = 'I'.
v_kostl-option= 'BT'.
append v_kostl.
then in ehere clause use KOSTL in v_KOSTL.
regards,
Anji
Message was edited by:
Anji Reddy Vangala
‎2007 Mar 16 6:38 AM
Hi,
You can write the select statment by using the BETWEEN statment.
WHERE NAME LIKE '1A%' " It will pick the values
" which starts from 1A...
Regards
Sudheer
Message was edited by:
Sudheer Junnuthula
‎2007 Mar 16 6:40 AM
eI,
DATA : v_char value '1'.
Select all the records into internal table.
Loop at itab.
if itab-filed+0(1) eq v_char.
if itab-filed+0(2) CA sy-abcde.
endif.
endif.
endloop.
reward if useful....
‎2007 Mar 16 6:46 AM
Hi el,
Try this.........
SELECT *
FROM table_name
INTO TABLE t_table
WHERE field_name BETWEEN '1A' AND '1Z'.
Reward,if helps.
Hope,your problem is solved.
Message was edited by:
Raghavender Vadakattu
‎2007 Mar 16 7:34 AM
hi
use code like this
SELECT *
FROM table
INTO TABLE it_table
WHERE field BETWEEN '1A%' AND '1Z%'.
it worked for me.
pls reply if it is useful