08-16-2007 9:21 PM
Hi,
I am using the following query
select bukrs hkont augdt augbl zuonr gjahr
belnr buzei xblnr budat wrbtr
from bsis
into table ts_bsis
where bukrs eq p_bukrs and
hkont eq p_hkont and
zuonr cs p_ebeln and
budat in p_budat and
blart eq c_we.
I am receiving an syntax error:
"CS" is not a valid comparison operator.
Can I use this way or not ?
I need this because ZUONR is of 16 characters and it contains PO number(10) and PO item(6) combined.
So on the selection screen if user specifies PO number range, then he should be able to get the ones that are in match.
Any other solutions are welcome.
Thank you,
Surya
Message was edited by:
Surya
08-16-2007 9:23 PM
HI ,
U cannot use CS rather you can use like in select statment.
Thanks
Mahesh
08-16-2007 9:27 PM
08-16-2007 9:31 PM
Hi,
You cant use comparision operetor in select where condition.
And in your case best suggestion.....
select bukrs hkont augdt augbl zuonr gjahr
belnr buzei xblnr budat wrbtr
from bsis
into table ts_bsis
where bukrs eq p_bukrs and
hkont eq p_hkont and
***zuonr cs p_ebeln and<----comment out
budat in p_budat and
blart eq c_we.
Later loop the internal table to process on the condition with ...check ts_bsis-zuonr(10) in p_ebeln.
Like this you can make the condition.
Thanks,
Deepak.
08-16-2007 11:12 PM
Hi Deepak,
Thanks for your quick response. I already did this. I don't wanted this extra loop to save some processing time. If there is no option, I will stick to that.
Thank you,
Surya
08-16-2007 10:27 PM
ranges: rzuonr for bsis-zuonr.
rzuonr-sign = 'I'.
rzuonr-option - 'CP'.
rzuonr-low = p_ebeln.
rzuonr-low+10(1) = '*'.
append rzuonr.
select bukrs hkont augdt augbl zuonr gjahr
belnr buzei xblnr budat wrbtr
from bsis
into table ts_bsis
where bukrs eq p_bukrs and
hkont eq p_hkont and
zuonr in rzuonr and "range used here
budat in p_budat and
blart eq c_we.
08-16-2007 11:25 PM
Hi Sam,
p_ebeln is select option not a parameter. What is the code change ? Your help will be appreciated.
Thank you,
Surya
08-16-2007 11:51 PM
Hi,
I think 2nd loop is the only process you can do for your requirement.
With in the select 'CS' you cant use it. And more over ZUONR length is 16, which will have to combination of EBELN(10) and EBELP(06).
This also you cant restrict within select itself.
Thanks,
Deepak.