06-16-2008 4:58 AM
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.
06-16-2008 5:16 AM
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.
06-16-2008 4:23 PM
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*'
06-16-2008 4:27 PM
06-16-2008 4:38 PM
06-16-2008 4:46 PM
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
06-16-2008 6:26 PM
But how come ' * ' and % works in CID alone?? that's the big surprise
Hi Ravi, % also didn't work ...
06-16-2008 6:41 PM
06-16-2008 7:04 PM
Could you post your exact code? What is Table X? (Transparent Table - Internal Table, etc ...).
06-16-2008 7:34 PM
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.
06-16-2008 8:12 PM
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.
06-16-2008 8:22 PM
I checked SE16 already thats how i tell the result in program is wrong .in option 1 as well as 2 ,3