Skip to Content

?$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....

Problem:
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

Benedikt.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Oct 10, 2013 at 03:03 PM

    Hi Benedikt,

    Just a quick question is ' sap/opu/odata/ORI/ACE_SERVICE_SRV/pmFuncLocSet?$filter=startswith(Tplrn, '9')' not suitable for your requirement ??

    If you run a query like that , in your DPC , in parameter 'IT_FILTER_SELECT_OPTIONS' will can get the correct range table. For the above mentioned query your 'IT_FILTER_SELECT_OPTIONS' will look like

    IT_FILTER_SELECT_OPTIONS

    |__ PROPERTY --> Tplrn

    |__ SELECT_OPTION --> I CP 9*

    Regards,

    Atanu

    Add a comment
    10|10000 characters needed characters exceeded

    • Benedikt Kromer Krishna Kishor Kammaje

      Thank you for your help.

      $filter=startswith(Tplrn, '9') and Tplnr eq '9'
      or $filter= Tplrn eq '9' startswith(Tplrn, '9')
      does not work too.


      I will ask my system operator to open an OSS message.... can anybody confirm that this bug is still in sp07?
      i have only a sp4 installation.

      regard Benedikt

      .

  • Posted on Oct 10, 2013 at 01:43 PM

    Hi Benedict,

    I feel that this might be a bug at SAP end. Try raising a OSS message.

    Thanks

    Krishna

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 04, 2019 at 01:52 PM

    eq true and eq false not working with B1 Service layer v1 or v2

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.