Hello,
I'm trying to make a SAPUI5 Application supporting a fuzzy search.
First I have done this with a sap.ui.commons.SearchField Control, and it worked fine.
When the Suggestion event was triggered i called a xsjs service with this select :
var sqlQuery = " select v.\"VBELN\", v.\"PRBEZ\" , k.\"NAME1\" from \"SAPTEE\".\"VBAK\" as v " +
" inner join \"SAPTEE\".\"KNA1\" as k " +
" on v.\"KUNNR\" = k.\"KUNNR\""+
" where CONTAINS(KUNNR, ? , FUZZY(0.4)) or CONTAINS(VBELN, ? , FUZZY(0.4)) or CONTAINS(\"PRBEZ\", ? , FUZZY(0.4)) or CONTAINS(k.\"NAME1\", ? , FUZZY(0.4)) order by score() desc , k.\"NAME1\" "
.
I wrote the results in a Array and used the function SearchControl.suggest(sSSuggestValue, resultarray), and the results poped up.
Now I'm trying to do it with the sap.m Library on the same way, but as it seems sap.m.SearchField can't suggest anything.
So I tried it with sap.m.Input , but the Input Control hasn't got something like the function suggest(); , I created a list of sap.ui.core.Items with the results of the Select and inserted the Items in the Aggregation SuggestionItems. Also i have set the Property showSuggestion on true but nothing poped up at all.
So how can i achieve that a sap.m Control can suggest like the sap.ui.commons.Searchfield did. Or do I have to take an other Control?