cancel
Showing results for 
Search instead for 
Did you mean: 

RelationalOperatorType.CONTAINS not working -- any solution/reason pls ??

Former Member
0 Kudos

Hi,

I need to write search logic in which user enters a single character , and search result should contain all the strings that contains the character required.

I guess RelationalOperatorType.CONTAINS is the correct one .

But its not giving result as desired.

Could anyone pls tell why its not working or any other way to achieve the search criteria ?

Regards & Thanks ,

Vipin.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hello vipin,

this relation operator type is not supported with the fileio persistence layer.

when used, it will throw a RuntimeException "Not implemented for <className>".

check your trace file for this entry. the same case for LIKE, IN and other sql

specific keywords.

regards

jo

Former Member
0 Kudos

Hi Jo,

Yes, i am using File as Database ( not DB2ee ) .

So, is there no method in SAP library which could be used for thsi searching criteria ?

Then in that case only way is to go to database , fetch all the records , and write cutom logic to search through the records Fetched.

Regards,

Vipin

Former Member
0 Kudos

hello vipin,

i just tried checking on the javadoc, the unsupported limitation seems to have been

removed. perhaps CONTAINS operator type is already supported. could you check

if you are having RuntimeException "Not implemented for <className>" in your

logs? (sorry, i dont have the latest MI client thus i can't check it for you). which

MI client version are using btw?

if this works with the db layer, then this could be a bug in MI API fileIO. also, it might

be related to encoding as well. are you only using single byte characters?

regards

jo

kishorg
Advisor
Advisor
0 Kudos

Hi Vipin,

The RelationalOperatorType.CONTAINS is working perfectly in our Case(File IO). What jo mentioned in his last reply is correct. The File IO persistence supports RelationalOperatorType.CONTAINS operator. We had faced the same problem. In our case the problem was because of the same that i mentioned in my last reply.

Just cross check with that point.

Regards,

Kishor Gopinathan

Former Member
0 Kudos

Hi Krishna,

i checked the BAPI, filed type is same. Infact , i am using standard BAPIs only , i havent made any changes to it.

But, still CONTAINS is nt working. is there any other reason possible for not working ?

Also, i noticed one more thing , which has becoem a issue to me :

while Searching with STARTS WITH also , there is a issue .

If search string contains a space .it will nt give corect results .

For e.e g i have to serach in a list that has folowing values :

abcd

abc bed

abdf h

and if serach strign entered is abc , only 1 result will come.

How to overcome this problem ??

THANKS & REGARDS,

Vipin.

sandeep_rs
Advisor
Advisor
0 Kudos

Hi Vipin,

Are you seeing any exceptions in your trace file when the trace level i set to 'All'? Also please let me know which SP level is being used?

Best Regards,

Sandeep

kishorg
Advisor
Advisor
0 Kudos

Hi Vipin,

Just check this thing.

Hope you will be filtering the data with respect to one field.Check for, whether the

data elements of the fields, the field you are using in your BAPI Wrapper and the corresponding back end field from where you are selecting the data for this field,

have the same length or not.

For example,

The field in your BAPI Wrapper you want to do filtering is - FIELD_BAPI

The field in the back end from where you are selecting data to fill the field - FIELD_BACKEND.

The above mentioned fields may be different. But the properties of the two data elements should be the same. I mean,

For

FIELD_BAPI - CHAR 60

FIELD_BACKEND- CHAR 70 or... like this..

Check for this ..

One more thing,

Make it sure that, one space is not there with your that character you are giving for filtering...

Which is the persistence medium you are using ?. file system or DB2E ?.

Check this note for,

Note 668807 - Restrictions for DB2e

Regards

Kishor Gopinathan