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.

Similar Messages

  • How to use the prompted value in the filter expression

    Hi
    Is it possible to use the prompted value in the filter expression?
    My requirement is that user will be prompted for a date field and I need to filter the records such that the records are displayed for the last 5 weeks from the date entered by the user.
    If somehow I know how to use the prompted value in the filter expression then this requirement is easy to be done. If this is possible, please guide me?
    If there are other ways to acheive the desired results then please suggest.
    Thanks
    -Jaz

    Edit: example added
    SQL> create table tb_test
      2  ( id number(5)
      3  , tot number(5)
      4  , mon_tot number generated always as (tot*15) virtual
      5  );
    Table created.
    SQL> insert into tb_test (id, tot) values (1, 5);
    1 row created.
    SQL> select * from tb_test;
            ID        TOT    MON_TOT
             1          5         75
    1 row selected.
    SQL> update tb_test
      2  set    tot = 15
      3  where  id = 1;
    1 row updated.
    SQL> select * from tb_test;
            ID        TOT    MON_TOT
             1         15        225
    1 row selected.

  • How to use for all entires clause while fetching data from archived tables

    How to use for all entires clause while fetching data from archived tables using the FM
    /PBS/SELECT_INTO_TABLE' .
    I need to fetch data from an Archived table for all the entries in an internal table.
    Kindly provide some inputs for the same.
    thanks n Regards
    Ramesh

    Hi Ramesh,
    I have a query regarding accessing archived data through PBS.
    I have archived SAP FI data ( Object FI_DOCUMNT) using SAP standard process through TCODE : SARA.
    Now please tell me can I acees this archived data through the PBS add on FM : '/PBS/SELECT_INTO_TABLE'.
    Do I need to do something else to access data archived through SAP standard process ot not ? If yes, then please tell me as I am not able to get the data using the above FM.
    The call to the above FM is as follows :
    CALL FUNCTION '/PBS/SELECT_INTO_TABLE'
      EXPORTING
        archiv           = 'CFI'
        OPTION           = ''
        tabname          = 'BKPF'
        SCHL1_NAME       = 'BELNR'
        SCHL1_VON        =  belnr-low
        SCHL1_BIS        =  belnr-low
        SCHL2_NAME       = 'GJAHR'
        SCHL2_VON        =  GJAHR-LOW
        SCHL2_BIS        =  GJAHR-LOW
        SCHL3_NAME       =  'BUKRS'
        SCHL3_VON        =  bukrs-low
        SCHL3_BIS        =  bukrs-low
      SCHL4_NAME       =
      SCHL4_VON        =
      SCHL4_BIS        =
        CLR_ITAB         = 'X'
      MAX_ZAHL         =
      tables
        i_tabelle        =  t_bkpf
      SCHL1_IN         =
      SCHL2_IN         =
      SCHL3_IN         =
      SCHL4_IN         =
    EXCEPTIONS
       EOF              = 1
       OTHERS           = 2
       OTHERS           = 3
    It gives me the following error :
    Index for table not supported ! BKPF BELNR.
    Please help ASAP.
    Thnaks and Regards
    Gurpreet Singh

  • How to use the same POWL query for multiple users

    Hello,
    I have defined a POWL query which executes properly. But if I map the same POWL query to 2 portal users and the 2 portal users try to access the same page simultaneously then it gives an error message to one of the users that
    "Query 'ABC' is already open in another session."
    where 'ABC' is the query name.
    Can you please tell me how to use the same POWL query for multiple users ?
    A fast reply would be highly appreciated.
    Thanks and Regards,
    Sandhya

    Batch processing usually involves using actions you have recorded.  In Action you can insert Path that can be used during processing documents.  Path have some size so you may want to only process document that have the same size.  Look in the Actions Palette fly-out menu for insert path.  It inserts|records the current document work path into the action being worked on and when the action is played it inserts the path into the document as the current work path..

  • How to use the customer types in customer master data

    how to use the customer types in customer master data?
    menu path is Extras -> account group info -> customer types

    hi,
    This is an option given to you to choose (if you need to) the way you perceive this customer.Here you get options including ompetitors,Salespartner, prospect,
    default sp ,consumer.
    See it helps you to differentiate between prospect(which you may use for quotation or inquiry purpose)Sales partner and the competetor.
    I hope this clarifies your quiery.Reward points if so.
    Thanking you,
    Best regards,
    R.Srinivasan

  • HT4356 How to use Canon Selphy Photo Printer (CP900) to print from iPad 3?

    How to use Canon Selphy Photo Printer (CP900) to print from iPad 3?  I would like to print the photos in my ipad on my Canon Selphy Photo Printer (CP900) which has wifi...

    hi
    ideally if you want to print from the ipad you should have an airprint enabled printer:
    http://support.apple.com/kb/ht4356
    however, there are workarounds, you can download a decent third party app to print such as print n share, printcentral or printdirect

  • How to use LSMW on CRM for bulk master data creation?

    Hello Experts,
    I need your help to able to use LSMW on CRM for bulk master data creation. Below is described my detailed requirement; -
    We have CRM 2007 integrated with SAP ISU (ECC6.0). As per business process all Business Master Data (BP details, Business Agreement details etc) and Technical Master Data (Connection Object, PoD etc.) is created in CRM and then it is replicated in ISU. We are going to start Assembly Test soon. Now we need to have all master data in place. Tool we want to use is LSMW.
    Now can you help me right from scratch on how to use LSMW for bulk master data creation in CRM?
    Please give me documents / links etc that is relevant.
    Regards,
    Rohit

    Hi,
    I have looked into your query.
    These are some information which might be useful to you.
    What is LSMW?
    Legacy System Migration Workbench or LSMW is SAP standard program that can be used to easily load / change master data or transactions in SAP without any programming at all. It can be used to upload data at cutover, such as: open orders, contracts, materials, vendors, stock on hand. It can also be used in a production system to make changes to existing data. Very limited authorization checks are available on the transaction, so the use of it must be very well controlled.
    One input file can be used to create all the views of the material master. For all the material types. Even if different views and fields are used for the different materials.
    Steps to take
    1. Create text file with data to be loaded
    2. Set up and run LSMW
    The following link will provide good information on LSMW Idoc method:
    [http://help.sap.com/saphelp_nw04/helpdata/en/ad/2d54a41d7011d2b42e006094b944c8/frameset.htm]
    I hope this helps.
    Regards,
    Venkat

  • How to Use dyanamic table in query?

    Hi,
    can you please tell.in query -
    1] if we define a varibale and in that varibale we have to speacfy the dynamic table name can it's possible.
    2] I tried but it's not working
    3] Every year i have taken a backup table and from that backup table i feteched the data.But i want to do this programmatically
    e.g. Table name is pf_emp_pf_txn20122013 but this is "20122013" this dynamic .How we use in query that dyanamic table .
    Kindly Suggest,
    Regards,
    Sachin

    RHELSENSEI wrote:
    Your EXEC executes in a different context, therefore it is not aware of any variables that have been declared in your original context. You should be able to use a temp table instead of a table variable as shown in the simple demo below.
    create table #t (id int)
    declare @value nchar(1) set @value = N'1' 
    declare @sql nvarchar(max)
    set @sql = N'insert into #t (id) values (' + @value + N')'
    exec (@sql)
    select * from #t
    drop table #t
    Epic. Fail.
    SQL-Server syntax and features for an Oracle problem. Features that are not relevant at all to Oracle, but the very reason why SQL-Server is technically inferior to Oracle...
    Are you a professional idiot, or just a very gifted amateur?

  • How to use moving maximum in query desighner

    Hi All,
    i am new to BI, please help.
    I have a requirement to find the maximum and minimum posting date for an article.
    For this i would need to use the moving maximum feature of the query. where to find this function and how to use it.
    please reply
    thanks,
    kushagra

    Hi,
    Max/Min functions can't be applied on characteristics. I'm not sure but you can try using a formula variable or exception aggregation.
    --Akashdeep

  • How to make key date of query as transcation date in cube

    I am facing an issues in displaying the transaction data with time dependent master data.
    I want to set the key date of the query to go against the transaction date and diplay the respective master data.
    I read in other posts,
    that i cant use the user exit variable, because the exit is executed only once before the query run.
    The fllowing is the report i want to achive,
    customer|customer_grp-|date-|--|sale
    100-----|-sa|jan 1|--- 15$
    100-----|-ic|oct 1|--- 32$
    in the above scenario, customer_grp for cusotmer 100 is sa from jan - mar and
    customer_grp for cusotmer 100 is ic from apr - dec
    I have customer_grp as time dependent attribute of customer. when i execute the report with key date as ,nov 1st
    it displays as,
    customer|customer_grp-|date-|--|sale
    100-----|-ic|jan 1|--- 15$
    100-----|-ic|oct 1|--- 32$
    if key date is jan 1st it displays as,
    customer|customer_grp----|date-|--|sale
    100--|-sa|jan 1|--- 15$
    100--|-sa|oct 1|--- 32$
    let me know whether it is possible to achive this type of report
    -thanks in advance
    - points will be awarded for  inputs

    Hello,
    I have the same kind of requirement.
    Is it possible to assign a Date field from the cube to Keydate of the query so that the time-dep attribute value is properly displayed based on InvoiceDate of each record, not based on today(query keydate by default)?
    Otherway i can think of is to add a Char/KF to cube and insert the value using a query on Masterdata in update rules. How far this approach is recommended?
    Thanks in advance,
    vamsi.

  • How to use the not exists query

    Hello,
    Using obiee 11g,
    i would like to know how to deal with not exists query in the obiee11g,
    the query is like this
    select count(a.col1),a.col2 from table1 a ,table2 b where a.col1=b.col1
    and not exists
    (select d.col1 from table3 d, table4 e
    where d.col1=e.col1 and d.col1=a.col1)
    group by a.col2
    there are 4 tables.
    table1,table2,table3,tabel4
    this is what i need in a report,these tables are used in othere places also,
    would prefer if its possible to do in for a report i.e.e analysis itself.
    If not possible then may be in rpd since if i change in rpd it may reflect every place
    and not in for a report itself.
    thanks

    Implement this in report itself can be a tricky and tedious job..But better to have it in RPD - Physical - Select Table type
    USE NOT IN in place of NOT Exist..You can simply use SELECT statement in SELECT TABLE TYPE
    Hope it clear

  • How to use property file - sql query define in property file

    Hi All,
    Anybody please tell me how to use property file.
    I have placed sql query in propery file and I have to access this in my file.
    well so far this is my code but don't know how to implement in the following ...
    pstmt = con.prepareStatement("select * from registration where username=?");
    instead of writting the query I want to use the property file.
    so far I have developed the following code...
    FileInputStream fis = new FileInputStream("querysql.property");
    Properties dbProp = new Properties();
    dbProp.load(fis);is the code correct... or is there another way to access property file
    Please help.
    please reply soon....
    Thanks

    Before answering, check if it's already been done here http://www.jguru.com/forums/view.jsp?EID=1304182

  • How to use offset in select query

    Suppose i have data like ssonje     00000001 as a one field in database table . i have to segregate this two data. how should I do this.the first part is of 12 characters and the last is of 10 character long.

    Hi Naveen,
    I am again in trouble, Now the requirement were changed. I am sending you the code which i had implemented.
    Now, the user enter username(ie UNAMED) and document id (ie. TEMPD) and the output should be doucment id, which has been search through database table RFDT , field SRTFD, this field contains both the username and the document id.
    That means: suppose user enters UNAMED as SSONJE and TEMPD as 0000000030, then i want to fier the select query from RFDT on field SRTFD and get only the document id of that user which user enter on input field-UNAMED.
    i had tried but result were not coming.
    please go through the code.
    data:uname type UF05A-UNAMD.
    data:temp type UF05A-TEMPD.
    TYPES: BEGIN OF TEITAB_RFDT,
           SRTFD TYPE RFDT-SRTFD,
           END OF TEITAB_RFDT.
    DATA: ITAB_RFDT TYPE TABLE OF TEITAB_RFDT.
    DATA: WA_RFDT TYPE TEITAB_RFDT.
    DATA: STR(22) TYPE c.
    SELECT-OPTIONS:UNAMED FOR uname,
    TEMPD FOR TEMP.
    UNAMED-option = 'CP'.
    append UNAMED.
    CONCATENATE UNAMED TEMPD INTO STR.
    SELECT SRTFD FROM RFDT INTO CORRESPONDING FIELDS OF TABLE ITAB_RFDT WHERE SRTFD eq str.
    LOOP AT ITAB_RFDT INTO WA_RFDT.
    SPLIT WA_RFDT AT SPACE INTO STR1 STR2.
      WRITE: / STR1,STR2.
    ENDLOOP.
    Please mentioned what is the way to do this.
    Thanks

  • How to use standard Search Input Help (return 2 data code and desc) ?

    Hi,
    Please advise how to use standard Input Help provided by SAP and return 2 data (code and description) ? because the standard Input Help only return the code only ?
    Thank You and Best Regards
    Fernand

    >
    Saket  Abhyankar wrote:
    > Hi,
    >
    > I think you need to go for 'Search Help Exit' or OVS.
    >
    > Regards,
    >
    > Saket.
    That is not true that this is the only way.  The standard Data Dictory based search help can return more than one value as long as there are multiple exporting values defined in the search help, the search help is attached to a Data Dictionary Structure, and this same data dictionary structure is used as the source of the context node. You can read more about this in the online help:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/47/9f724642314aabe10000000a42189b/frameset.htm
    The Note section under Integration:
    If an input help structure is stored in a field in the ABAP Dictionary, and if you want to use the field mapping of search help parameters stored in the ABAP Dictionary as the field name for the structure for your Web Dynpro input help, then map your context nodes to this structure. This ensures that all components of the structure are available dynamically at runtime as attributes of the node.
    If the context node is not mapped to the structure, the data element's input help can be used if there is one.

  • How to use wildcards in ABAP query where condition?

    Hi,
    Please tell me how to use wildcards in ABAP qurey where condition.
    e.g. select * from mara where matnr = * (wildcard we need to use.
    Thanks & Regards,
    Gaurav T

    Do you want to query asterix * ?
    select * from mara where matnr = '*'.  "then just put it in apstrophes
    or you want certain part of string be used as * ?
    select * from mara where matnr like '%*'  "then use % sign before it
    or maybe you want something like this
    select * from mara where matnr like '%1' . "then it will look for all materials having '1' inside it
    Regards
    Marcin

Maybe you are looking for

  • ADOBE PHOTOSHOP CS5 3D OPTION?

    Hi am I able to add in the 3D tab as a plugin? I've purchased the standard PS CS5 and never got told we had other options, could you please let me know if this can be added in or do I need to pay another k just to upgrade?

  • Spread Preview Issue - left page only

    I'm in the catalog/magazine racket and just starting using InD 5.5 along with Bridge 5.1 When I save/convert documents from CS3 InD to 5.5, the preview in bridge 5.1 only shows the left hand page in my document. There is also a little chain icon in t

  • How can i get the status of the loaded database in OCI ??

    Hi, buddy! Now i wanna get the status of the loaded database,example MOUNT, NOMOUNT,OPEN. Can i use the OCI interface to get it? if it like that, how can i do? Otherwise, is there another way to do in program?? thanks!!

  • Scrap Percentage Field in Asset Master

    Hii Experts, scrap value in main asset and sub number different. i want to have scrap value different between main asset and sub number example asset number 123-0 scrap value = 1 asset number 123-1 scrap value = 0 asset number 123-2 scrap value = 0 I

  • We are getting Licensing for product stopped working error on Mac OSX 10.6 computers

    We are getting error " Licensing for this product has stopped working.  This product has encountered a problem which requires that you restart your computer before it can be launched.  If you continue to see this message after restarting your compute