Skip to Content
avatar image
Former Member

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

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Aug 16, 2007 at 08:23 PM

    HI ,

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

    Thanks

    Mahesh

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 16, 2007 at 08: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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • avatar image
    Former Member
    Aug 16, 2007 at 09: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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Sam,

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

      Thank you,

      Surya

  • avatar image
    Former Member
    Aug 16, 2007 at 10: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.

    Add comment
    10|10000 characters needed characters exceeded