‎2007 Feb 07 9:21 AM
hi all,
may i know how to have substring in select? i got the error when i define so.
pls advise.
thanks
SELECT SINGLE * FROM mara
WHERE matnr0(1) = fieldvalue0(1).
‎2007 Feb 07 9:23 AM
Hi El,
You cannot do that way.
Do this way:
concatenate fieldvalue+0(1) '%' into v_str.
select single * from mara
where matnr like v_str.
Regards,
Ravi
‎2007 Feb 07 9:24 AM
you cannot use substrings to the left of the WHERE condition , only right hand side you can use substrings
May be you have to select data into one internal table and then use offsets
loop at itab.
if itab-matnr0(1) = fieldvalue0(1).
endloop.
‎2007 Feb 07 9:25 AM
hi ,
dont use it in that way
first concatenate the field in an variable
then use that variable in u r select query
cheers
‎2007 Feb 07 9:37 AM
el,
data : v_var(1),
v_per value '%',
v_final(2).
v_var = fieldvalue+0(1).
concatenate v_var v_per into v_final.
SELECT SINGLE * FROM mara
WHERE matnr like v_var.
Pls. mark if useful
‎2007 Feb 07 9:42 AM
Hi,
You can use offset only at the right side, if the left side value is less tahn the right side value you can use this as
WHERE matnr = name+0(10).Hope you are clear. Please reward and close the thread if ur problem got solved else get back with queries.
‎2007 Feb 07 9:44 AM