Skip to Content
Oct 10, 2013 at 10:25 AM

?$filter=startswith(CompanyName, 'Alfr') eq true


Hello together,

how implement other people something like this:

Example: Read all functional locations from the system which starts with 9.

Scenario is very simple, the user should have an searchbar (google like, no fuzzy support) to find his funcLocation.

I solved all read request over selects. Classic abab coding, i would do something like that (ignore alternative labeling, to keep it simple)

My rangeTab:


I CP 9*


Select * from iflot where tplnt in rangeTab into....

if i access the gateway to do an request like that:

sap/opu/odata/ORI/ACE_SERVICE_SRV/pmFuncLocSet?$filter=Tplnr cp '9*'

Don*t work, because the gateway don't allow CP as filter operation

sap/opu/odata/ORI/ACE_SERVICE_SRV/pmFuncLocSet?$filter=Tplnr eq '9*'

Convert the EQ to CP in the custom coding, if an * is present.
I can`t select an item if the user input the exact entity id (but this problem is releasably)...

sap/opu/odata/ORI/ACE_SERVICE_SRV/pmFuncLocSet?$filter=startswith(Tplrn, '9') eq true and Tplnr eq '9'

i think, this would be the best solution. There is no error by this request, but i could not find any way to access the startswith to build an own range..

It there any other solution available for this kind of problem?

thanks and regards