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: 

Syntax Error: "CS" is not a valid comparison operator.

Former Member
0 Kudos

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

7 REPLIES 7

Former Member
0 Kudos

HI ,

U cannot use CS rather you can use like in select statment.

Thanks

Mahesh

0 Kudos

Hi Mahesh,

Please look at my edited message.

Thank you,

Surya

Former Member
0 Kudos

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.

0 Kudos

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

Former Member
0 Kudos

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.

0 Kudos

Hi Sam,

p_ebeln is select option not a parameter. What is the code change ? Your help will be appreciated.

Thank you,

Surya

Former Member
0 Kudos

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.