OData with Filter

Hi,
i am working on displaying record value using UI5. The record should be retrieved via OData from HANA by entering the record ID and the attribute values should be displayed in different textview. My data looks as follows,
Person [{ID: '001', Name: 'Tom'}, {ID: '002', Name: 'Marry'}]
and an OData service defined.
When the user input 001 from page and click button, the first record should be transfered and the name should be filled in a textview on page.
My problem is, I dont know how can i filter the OData when I bind the data with the textview? using bindproperty? bindtext?
I could do this without problem when displaying data in table, because the bindrow function can take the filter parameter. But the requirement specifies to use textview.
Thanks in advance!
Best Regards,
Hai

Hi Hai, Text Wei refers to OData entity than EntitySet. So , filtering OData directly does not make sense. I suggest , better use the OMdel.Read method to read your data in JSOn format and bind it manually with the TextView. Sreehari

Similar Messages

  • How to use OData Date filter query to filter data from OData NetWeaver Gateway Service?

    Hello,
    I am trying to use the OData Filter query. to filter data records from the OData Service, using Date range for filters.
    Please check the below URL for the SAP's sample OData Service, with filter option.
    Service Query URL :
    https://sapes1.sapdevcenter.com/sap/opu/odata/sap/ZGWSAMPLE_SRV/SalesOrderCollection?$filter=CreatedAt eq DateTime
    It gives out following error :->
    <message xml:lang="en">'$filter ' is not a valid system query option</message>
    Please let me know, if there is any mistake in the Query or is there anything that needs to be done on the
    Backend  Service.
    Thanks & Regards,
    Suraj Kumar

    Hi Jitendra,
    Once again, thank you for your help.
    I am able to filter the records using a date range.
    I am sharing the information, just in case anyone out there might need it.
    The OData Filter Query for Date Range (i.e. with Two date values) will return the results only if the OData Back-end Service is modified to accommodate such filter requests.
    This has to be done in ABAP.
    Please refer the following links which talks more about the Back-end ABAP Service being modified to ensure that the service returns records of data, as per the date range filter query
    http://scn.sap.com/thread/3170195
    http://scn.sap.com/blogs/lindsay.stanger/2012/12/29/gateway-odata-calls-convert-ivfilterstring-to-itfilterselectoptions
    http://scn.sap.com/thread/3173146
    Hope these links are helpful for those looking for OData Date Range filter query.
    Do let me know.
    Regards,
    Suraj Kumar.

  • Retrive records using ODATA with SQL functions

    Hi,
    I want to use SQL functions (for instance replace function) while retrieving records using ODATA endpoint using javascript. Like this:
    parent.SDK.REST.retrieveMultipleRecords(
    "$select=AccountId,Name,Telephone1&$filter=" + "replace(Telephone1,'-','') eq '12345678'",
    function (accountresults) {
    errorHandler,
    function () {
    But this is ending up with 404 bad request. Is there any way to achieve the same using any other technique?
    blog: <a href="http://technologynotesforyou.wordpress.com">http://technologynotesforyou.wordpress.com</a> | skype: ali.net.pk

    ODATA only supports simple comparison operators, and startswith, endswith and substringof. There are 2 approaches you could use without modifying the data:
    Have a less selective filter in ODATA, then filter the rest of the data in javascript. In this example, you could use ODATA to find all records where the telephone1 field has each of '1', '2', '3' etc, then use javascript to do the replace comparison. It
    depends how many records you have as to whether this is practical
    Write a plugin on RetrieveMultiple that applies the functions you want. This is not necessarily simple, and you'd need to determine how you identify in the query that you want to use a function like replace
    Another option could be to use a plugin when data is saved to strip out the characters you don't want, and store the results in a different field that you could then query on
    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

  • OBIEE 11g - Aggregation With filter

    Hi all ,
    I have a reg where the condition to be applied in ONE COLUMN of a report is as follows
    select count(*)
    from (SELECT SUM(quantity),SUM(quantity_received) qty_rec ,SUM(quantity)-SUM(quantity_received) qty ,po_header_id
          FROM F_ERP_PO
          group by po_header_id)
    where qty > 0
      and qty_rec <> 0     
    .. I  have multiple columns in the reports with varying conditions
    I tried out in different ways but could not bring the answer since this condition is just ofr one column and the next column has other conditions.
    Kindly help me in simplifying this report . I am stuck with it for long
    Thanks in advance,
    Regards,
    Niv d

    Hi Chris,
    Thanks for ur response.
    I tried usinf FILTER() function in different ways. But I had a comparison like
    FILTER("F1 Facts"."Total Revenue" USING (sum("PO"."Quantity") = sum("PO"."Quantity_Recieved") )) .
    Here the error is like Cannot use aggregation with the USING clause .
    I even tried with, Filter based on another request feature , it throws an error saying 'cannot use multiple select clause '
    Any suggestions would be very helpful.
    Regards,
    Niv D

  • Grant select role with filter ?

    hi,
    is it possible to Grant select with filter to a role, for example,
    user should select where ename='smith'

    I guess you may want something similar to VPD

  • How to use aggregator with filter  operator

    Hi,
    how can i use aggregation with filter operator. i have a table, form this table i have to calculate this valurs
    1. no of notes
    2. no of open notes where attribute =y (logic for one notes is count(notes) where attribute =y)
    2. no of closed notes where attribute =n
    for this i used like this
    table --> two filter operators 1 is for attribute =y and one is for attribute=n ----> to aggregaror operator. --- i am getting error.
    Regards,
    Jyothy

    Jyothy,
    Try this..
    U can use the below code in the aggregator without filters
    sum(decode(notes,'y',1,0) adn sum(decode(notes,'n',1,0)
    Regards,
    Sivarama

  • Af:table with filter option

    Hi,
    I have a bounded task flow with page-fragments, first activity is method-call(execute-query) and second is a view activity. On the view activity I dropped a read-only, af:table, enabled filters. Although execute query is successful af:table does not display correct records. When I delete af:table and add it again with no filter everything works as expected (also deleted the search region definition from page def file). af:table with filter option adds a search region to executable section of page-definition file, with Empty Criteria in my case. I want af:table to display results after execute-query method activity and decorate the af:table with filters. Filter would be enabled only when users enter filter criteria. Is that possible? Am I missing something?
    Best Regards,
    Salim

    Hi,
    I found new problems with my case. When we use filter option with af:table filter criteria is not cleared. Forum search returned Re: Problem with 11g table - filter . Suppose that user enters a criteria and presses enter, this executes query and results are displayed as expected. Then user clears the previously entered criteria presses enter o display all records, and no results are displayed. Looking at the trace for a testcase based on HR schema, I observed that all the bind variables in the query is saved and passivated, Please observe that for every new criteria entry (for the same field, Emp.ENAME) a SQL clause is added at the end. Although one might expect that all the criteria related to af:table filter is cleared and rebuilded for every request rather than saving them all, which results in bad end user experience. So is there a way to go with af:table with filter? Am I missing something?
    Best Regards,
    Salim
    SELECT Emp.EMPNO,        
         Emp.ENAME,        
         Emp.JOB,        
         Emp.MGR,        
         Emp.HIREDATE,        
         Emp.SAL,        
         Emp.COMM,        
         Emp.DEPTNO,        
         Dept.DNAME,        
         Dept.DEPTNO AS DEPTNO1
         FROM EMP Emp, DEPT Dept
    WHERE Emp.DEPTNO = Dept.DEPTNO(+)
         AND ( ( ( ( ( Emp.ENAME LIKE :vc_temp_1  )  OR  ( :vc_temp_1 IS NULL ) ) )  AND ( ( ( Emp.EMPNO = :vc_temp_2  )  OR  ( :vc_temp_2 IS NULL ) ) )  AND ( ( ( Emp.ENAME LIKE :vc_temp_3  )  OR  ( :vc_temp_3 IS NULL ) ) )  AND ( ( ( Emp.ENAME LIKE :vc_temp_4  )  OR  ( :vc_temp_4 IS NULL ) ) )  AND ( ( ( Emp.ENAME LIKE :vc_temp_5  )  OR  ( :vc_temp_5 IS NULL ) ) ) ) )Bind params for ViewObject: EmpView2
    [18615] Binding param "vc_temp_1": M%
    [18616] Binding param "vc_temp_2": 8
    [18617] Binding param "vc_temp_3": A%
    [18618] Binding param "vc_temp_4": M%
    [18619] Binding param "vc_temp_5": M%

  • Difference between CQC vs MapListener with Filter

    Can someone please explain how is a  Continuous Query Cache(CQC) different than a MapListener with a filter?
    On the same note, please elaborate on use cases where CQC is a right-fit vs MapListener (with filter)?
    Thanks in advance.

    Using listeners (with or without filters) is a way to react over data changes in the client application, allowing it to invoke actions in response of some changes. The basic idea is in the end, execute custom code based on the events, instead of manipulate the dataset.
    CQC in the other hand is a technique to materialize a keySet() in the client application in a such way that this keySet() is continuously updated automatically by Coherence, based on the delta of which resides in the client application and in the data grid storage. When you materialize a keySet() in the client application, the list of keys are stored continuously in the application heap memory, and grows at the same pace that the data grid grows, considering of course that the filter criteria has been satisfied.
    So the basic difference is the statefulness of the scenario: using CQC, you have the whole window of keySet() to work with, using listeners, the only keySet() available to work with is that of the current event triggering, after that they are disposed. Some CEP implementations like Oracle Event Processing should benefit of materialized keySets() in order to apply event constructions like temporal constraints, for instance: SELECT someData FROM eventChannel RANGE 60 MINUTES SLIDE 5 SECONDS.
    Cheers,
    Ricardo Ferreira

  • Trace with Filter

    Hi,
    I have a report Z_MA_TEST including a simple sql statement (open sql).
    I want to trace this to see what happends.
    When I Activate Trace With Filter (OK)
    Provide USERNAME = MYUSERNAME
    When I Activate Trace With Filter (<b>Trace file empty??</b>)
    Provide USERNAME = MYUSERNAME
    Provide PROGRAMNAME =       Z_MA_TEST
    Why cant I trace with my program name ?
    //Martin

    Hi Martin,
    I used your example with A004.
    I activated the trace on with filter in ST05.
    Checked all the checkboxes.
    Gave User name and program name in 'Trace on for user' option.
    Ran the program.
    Switched the trace off.
    I got some trace as follows.
    Transaction = SE38                 PID =    24768 P type  DIA Client = 040 User = SADAVI        
    HH:MM:SS.MS  Duration  Program  ObjectName Op.     Curs Array Rec   RC     Conn  Statement      
    11:19:59.947    11,414 SAPLSECU TSL1D      READ SI                1      0       R 3 AUW        
    11:19:59.962        22 ZTESTAKX A004       OPEN                   0      0       R 3 040        
    11:19:59.962        27 ZTESTAKX A004       FETCH                  1      0                      
    11:19:59.963        20 SAPLOMCV TMCNV      READ SI                1      0       R 11 040MATCONV
    11:19:59.963        32 ZTESTAKX A004       FETCH                  0     64                      
    11:19:59.963         7 ZTESTAKX A004       CLOSE                  0      0                      
    So I am not sure if this what you are also getting, whereas you are expecting more.
    Please let us know.
    Thanks,
    Srinivas

  • Problem with outer join with filter on join column

    Hi,
    In physical layer I have one dimension and two facts, and there's an outer join between the facts.
    dim_DATE ,
    fact_1 ,
    fact_2
    Joins:
    dim_DATE inner join fact_1 on dim_DATE.DATE = fact_1.DATE
    fact_1 left outer join fact_2 on fact_1.DATE = fact_2.DATE and fact_1.SOME_ID = fact_2.SOME_ID
    When I run a report with a date as a filter, OBIEE executes "optimized" physical SQL:
    select fact1.X, fact2.Y
    from
    Fact_1 left outer join on fact_1.DATE = fact_2.DATE and fact_1.SOME_ID = fact_2.SOME_ID
    where Fact_1.DATE = TO_DATE('2009-05-28' , 'YYYY-MM-DD' )
    and  Fact_2.DATE = TO_DATE('2009-05-28' , 'YYYY-MM-DD')
    The filter on Fact_2.DATE effectively replaces outer join with inner.
    Is there a way to disable this "optimization", which is actually very good for inner joins, but doesn't allow outer joins?
    Thanks in advance,
    Alex
    Edited by: AM_1 on Aug 11, 2009 8:20 AM

    If you want to perform a Fact-based partitioning with OBIEE (two fact with the same dimension), you have to :
    * create in your physical layer for each fact table the joins with the dimension
    * create in the Business Model layer ONE star schema with ONE logical fact table containing the columns of your two physical fact table
    In this way when you choose minimal one column of your fact1 and one column of your fact2, OBIEE will perform two query against each fact table/dimension, join them with an OUTER JOIN and your problem will disappear.
    Cheers
    Nico

  • Crystal Report linked to a table with filter attached

    I have a Crystal Report based on 2 tables and I want it to display every incident in the incident table and to pull the truckID of the
    first truck on the scene from the truck table . So the finished product should look like this…
    IncidentID           IncidentNum     ResponseTime                  First Arriving Truck           Disctict
      1x44452                1258ab55             5:32                                        B8                              2
    *The first arriving truck is the truck in the Truck Table with the same IncidentID and  the earliest ArrivalTime.  There will be multiple trucks for each incident but I want it to only show the one that arrived first (ArrivalTime).  So one line per incidentID.
    Incident Table
    IncidentID
    IncidentNum
    ResponseTime
    District
    Truck Table (Will contain many trucks for one incident with the following info
    Truckkey
    IncidentID (Link to Incident Table)
    ArrivalTime
    TruckID
    I figure I probably need to build a formula with the min function or perhaps an OnCommand – I’m just not sure.
    The biggest issue is the overall report has 4 filter settings.  They can select a date range, a location, an incident type and a range for the response time. So I do this with the Select Expert
    I can get all of that to work except I cannot figure out how to get it to pull the First Arriving Truck without duplicating the incident
    line.  Also, if there is a Truck with an ArrivalTime of Null I want it to ignore that Truck Table record.
    Can anyone help???

    Hi Debbie,,
    You may try this:
    1) Go to the Group Expert > Create a Group on the 'Incident ID' field from the Incident Table
    2) Insert a summary on the 'Arrival Time' field and place the field on the Group Footer
    3) Move all the fields from the Details section to the Group Footer
    4) Go to the Group Selection Formula (Report > Selection Formulas > Group) and use this code:
    {Truck.ArrivalTime} = Minimum({Truck.ArrivalTime}, {Incident ID})
    5) Suppress the Details Section
    -Abhilash

  • Filter Object with Filter Expression error.

    Hello everyone!
    I'm trying to put together the following expression for a filter to be used in a report:
    Order Date -> object name = M1 - (number, measure)
    Current Date -> object name = M2 - (number, measure)
    Comparison between the two:
    <EXPRESSION> IIF (@ Select (M1) = @ Select (M2), 1.0) </EXPRESSION>
    object name 3
    So far everything works fine.
    When I create a report in Web and I put the filter M3 = 1, it filters properly.
    I thought of putting the filter in a filter object in the universe, like this:
    <FILTER EXPRESSION = "Select @ (M3)"> <CONDITION
    OPERATORCONDITION = "Equal"> <CONSTANT CAPTION="1"/></CONDITION></FILTER>
    Just as it is in Olap universes best practices written by Didier. (Page 12), as following example:
    Filter with a calculated member referenced in the filter expression:
    <FILTER EXPRESSION="@Select(Calendar Year\My Calculated Member)"><CONDITION
    OPERATORCONDITION="Equal"><CONSTANT CAPTION="1"/></CONDITION></FILTER
    But does not work when I put the query, the error is dpscommand. And I have no idea where the error is.
    The strange thing is it works, if I filter the query directly. ( Query filter: M3 equal 1).
    Do you have any tips? or something I could try that I have the M3 as a filter object?
    Tks a lot!
    Livia
    I am working on BO XI R3 - SP2 and the basead query is on SAP BW 7.0.

    macearl wrote:
    SQL View does not display unless data is returned by the query. Is that normal?
    Also, none of these options shows the literal result of the expression we built, i.e.:
    expression: CAST(YEAR(TIMESTAMPADD(SQL_TSI_MONTH, -24, CURRENT_DATE)) as CHAR)
    result: *2008*
    Having the ability to test expressions and see their results would be very helpful in debugging. If anyone knows how to do that please share!
    Thanks!
    MacOk, Probably shoud have figured this out before, but in response to my own question, the way to view the result of an expression is to add the expression as a column and include it in the Table Presentation.
    - Mac (he can be taught)

  • Issues with filter on NULL

    I have a report page with several page items - text, drop-down, radio buttons, etc. - that help filter down the returns. I need it to return everything (match everything) if there is a NULL in the filter, but I can't seem to get it to work on the drop-down. Here's the query:
    select e.EQUIP_ID,
    e.EQUIP_TYPE_ID,
    et.EQUIP_TYPE_ABBR,
    et.ICON,
    e.EQUIP_TAG,
    e.ORG_ID,
    o.ORG_ABBR,
    o.ORG_NM,
    e.ACQ_DATE,
    e.DISP_DATE,
    e.DISP_TYPE_ID,
    d.DISP_TYPE_ABBR,
    e.ACQ_TYPE_ID,
    a.ACQ_TYPE_ABBR,
    e.EQUIP_DESC,
    e.EQUIP_ID MOB
    from EQUIPMENT e, EQUIPMENT_TYPE et, EQUIP_ACQ_TYPE a, EQUIP_DISP_TYPE d, ORG_ENTITIES o
    where e.EQUIP_TYPE_ID = et.EQUIP_TYPE_ID (+)
    and e.ACQ_TYPE_ID = a.EQUIP_ACQ_TYPE_ID (+)
    and e.DISP_TYPE_ID = d.EQUIP_DISP_TYPE_ID (+)
    and e.ORG_ID = o.ORG_ID (+)
    and DECODE(e.DISP_DATE,NULL,1,0) = :P200_ACTIVE --- Works fine
    and e.EQUIP_TYPE_ID = NVL(:P200_EQUIP_TYPE,e.EQUIP_TYPE_ID) --- Gives ORA-01722: invalid number error!
    and e.ORG_ID = NVL(:P200_PROJECT_ID,e.ORG_ID); --- Works fine
    Can anyone see what is preventing the line in question from operating properly? :P200_EQUIP_TYPE is a dynamic drop-down with the NULL selection set to "-- ALL --" and returning NULL (the parameter is left blank).

    I'm not quire sure where to replace it. I tried putting it into the item's null value and that didn't seem to have any effect. Do you mean in the report query? It's not obvious to me where to make the suggested change.
    Oh, and I was able to get kind of a solution by creating two reports - one conditionally set to view when the selection IS NULL and the other when the selection IS NOT NULL. It's a workaround at least.

  • Performance with filter selection lilst in answers

    Hi,
    We have one subject area with 7 Dimensions and 2 fact tables (both are very huge). In Answers, whenever the filters are selected on Dimension Attributes for list of values, it is taking long time to populate the list of values. The backend query generated is trying to join to fact table to get the list of valid values based on other filters. Is there a way to change this behaviour. Lets say, if a filter is selected from Dimension 1 attribute 1 , then it needs to generate query something similar like this (SELECT DISTINCT ATTRIBUTE 1 from DIMENSION1) instead of generating query like (SELECT DISTINCT ATTRIBUTE 1 from DIMENSION D1 , FACT F1, DIMENSION D2 where D1.SID = F1.SID1 and D2.SID = F1.SID2 and D2.Attribute3 = 'XXXX').
    Is this possible ?
    Thanks for your help

    Looks like the fact table is physically mapped for dimension in BMM layer. In this case you are forcing dimension table to join with fact for any reason.
    Look at your configuration, if you really need to have force join then only physically map fact if not go for Logical Table Source.
    Hope this helps.

  • Extraction of CO Plan data with filter on company code

    Hello,
    I have this urgent requirement:
    Extracting CO Plan data (from COSP) by selecting on the company code.
    Problem: company code not in extract structure used by 0CO_OM_CCA_1
    Actual data are extracted with 0CO_OM_CCA_9.
    My first idea was to use make an append to the extract structure of 0CO_OM_CCA_1 (i.e. BUKRS) and to fill this new field in the CMOD enhancement.
    Do you have any other hint?
    Thxs.
    LauQ

    Hi,
    I donot think the Selection works with any Customer enhanced fields(i.e the fields foe which, code written in CMOD) . So you have to keep filter some where either in Transfer rules or in update rules.
    Or Check whether you can replace the datassource 0CO_OM_CCA_1 with the datasources:
    0CO_OM_CCA_10
    0CO_OM_CCA_9.
    With rgds,
    Anil Kumar Sharma .P
    Message was edited by:
            Anil Kumar Sharma
    Message was edited by:
            Anil Kumar Sharma

Maybe you are looking for

  • Archiving on Blue-ray.. what are the issues that people are afraid of..?

    I'm considering how my latest storage monster toy (Hi definition camcorder) is going to eat disk space and realise that very very soon I'm going to want to move archived projects onto some external media that isn't going to consume that spare room in

  • SAP VEV Javascript API

    Hello, I would like to script part of the VEV using Javascript inside the browser. Is there any documentation that shows the available functions? Specifically also controlling the play and next step functions and for registering to clicks on certain

  • Mac vs PC features in Photoshop elements 11?

    Are all the features advertised in Photoshop Elements 11 available in both the Mac and the PC?

  • Episode numbers appear as a "-"

    Hey everyone, I just started hosting a podcast on posterous.  I used feedburner to send my podcast to iTunes.  When searching for the podcast, everything turns up find in iTunes and on the Podcasts app catalog portion.  However, when I subscribe to m

  • Restarting on its own while on the internet

    while on the internet twice in one day i got a message saying your computer will restart because there was an error something like that and it restarted on its own?