cancel
Showing results for 
Search instead for 
Did you mean: 

search criteria not filled correctly in search uibb

former_member469314
Participant
0 Kudos

Hi,

I have a problem with the search criteria in my search uibb.

When I use operator  'starts with' or 'contains' the search criteria in methods PROCESS_EVENT and GET_DATA is not filled correctly.

In the search uibb I have two search attributes, both data type CHAR. When I execute a search using search operator 'contains' or 'starts with' the search does not work if I only enter numbers in the search field. As soon as I add a character, everything works fine.


In the debugger I can see that the 'low'-value of the search attribute is filled wrong.

For example:

If I search for 'AUFNR starts with A20', the 'low'-value of the search criteria is filled correctly with 'A20', perfectly like I would expect it.

If I search for 'AUFNR starts with 20', without the character in front of it, the 'low'-value of the search criteria is '000000000000000020' instead of value '20' which I would expect.

This leads to problems in the search conversion because the asterisk can't be appended to the end of the value. So in the end, I get a ranges tab with entry (AUFNR CP 000000000000000020) instead of (AUFNR CP 20*) which would be correct.

Am I missing something and do I have to set a flag somewhere in order to get the correct value in the search criteria or is this really a bug?

Andy help is appreciated.

Best regards

Rebekka

Accepted Solutions (1)

Accepted Solutions (1)

ulrich_miller
Active Participant
0 Kudos

Hi Rebekka,
I assume that the data type of the attribue is something string-like, i. e, it is not numeric. Thus the
low value contains the leading zeros. That just how alpha numeric input fields work.

Therefore I am afraid, you will have to remove that leading zeros by yourself. You can do this in the feeder class, e. g. by using the following statement:

shift 'low'-value left deleting leading '0'.



Kind regards,

Ulrich




former_member469314
Participant
0 Kudos

Hi Ulrich,

thanks for your reply.

Yes, as I mentioned, the fields are of datatype CHAR, so they are not numeric.

The problem is that i wanted to use the search conversion class provided in the method PROCESS_EVENT. (So, I wanted to convert the search criteria to a ranges table and collect the data using this ranges table at the FPM_EXECUTE_SEARCH event. This class uses the search criteria of the search uibb and at this time I can't access and manipulate the search criteria.

So, if I understand you right, now I'll have to react to FPM_EXCEUTE_SEARCH in GET_DATA, check if the search value only contains numbers and delete the leading zeros in that case and then I would have to trigger an own event (in which I can collect my data and get my ranges tab) in order to be able to use the search conversion class. Is that the right way to do it?

I just expected the search conversion to give me the correct ranges table on ist own. So if I search for 'starts with 20' it would return me a ranges tab with 'CP 20*'.

ulrich_miller
Active Participant
0 Kudos

Hi Rebekka,
that is right, in the feeder class of the search uibb, in method get_data, if the event id is FPM_EXCEUTE_SEARCH just always call the statement "shift 'low'-value left deleting leading '0'" for that attribute, and that should be all. I do not understand why you need to trigger an additional event?

Cheers,
Ulrich

Answers (0)