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: 

Query wildcard LIKE ' * ' works in DEV box .same query not working in QA.

Former Member
0 Kudos

1 ) I have a Query SELECT * FROM TABLE X WHERE A LIKE 'S*' and B = itabvalue.

The same query works properly in CID but not working correctly in QA though there is required data in QA.

Any idea what is the problem,,,no error with the query.SY-SUBRC = 4

2 ) I tried other example with NOT LIKE 'K' it retrieves oppositly in QA ..i.e. retrieves records like ' K ' .so SY-SUBRC = 0

but that is not correct result.....

This also works correctly in DEV...

Any idea ?

I see a line in ABAP DOCU help which says wildcard maynot be succesful based on database system ....a sentence similar to this...

how to correct this.

Any suggestion from you all.Thanks.

11 REPLIES 11

Former Member
0 Kudos

Hi Sona,

Your query is fine. But one thing in second condition B = tabvalue. what is this tabvalue. Is this any internal table.

please eloborate ur problem.

Regards,

AZAD.

0 Kudos

yes.that filed is from internal table from previous step..data is there in that field.

just forget about it..

More elaborate ?

To be simple consider below query

this query is not fetching records in CIQ system....the same query works fine for CID system(same table in FROM )

CIQ also has data starting with S in that field.

Query SELECT * FROM TABLE X WHERE A LIKE 'S*'

Former Member
0 Kudos

Why don't you try with Like "S%"?

0 Kudos

I had tried 'S%' also.......same problem ...not successful

0 Kudos

Hi Sona,

Can you show us your exact Code?

Its a given that it will not work for *.

If you use like, you have to use % only.

Regards,

Ravi

0 Kudos

But how come ' * ' and % works in CID alone?? that's the big surprise

Hi Ravi, % also didn't work ...

0 Kudos

Yes... * didn't work for LIKE

Any specific rules for NOT LIKE

Former Member
0 Kudos

Could you post your exact code? What is Table X? (Transparent Table - Internal Table, etc ...).

0 Kudos

OFCOURSE table X is transparent table , not internal table.....select query from transparent table .....

Option 1 : I tried NOT LIKE ' S* ' QUERY fetches data but wrong data ,it fetches a record with field S which is wrong because i don't want all values of range 'S*' (this is working in CID but fetches wrongly in CIQ)

Option 2 :I tried NOT LIKE ' S%' this is working in CID but not at all working in CIQ.

Option 3 :I tried LIKE ' S%' this is working in CID but not at all working in CIQ.

I tried LIKE 'S*' this is not working in CID .....so no need of this option.

I have explained all possibities ....Any one...........

Question is why option 1 works wrongly .......... also wondering how option2 and 3 works correct in one system alone.

0 Kudos

One more question, what happens when you go to SE16 in CIQ and use your selections there? You should get the same results from your Program and in SE16.

0 Kudos

I checked SE16 already thats how i tell the result in program is wrong .in option 1 as well as 2 ,3