Query on time field.

Hi,
I have a column "Date1" in a table. On the form I define it as Datetime datatye.
I have the format mask of 'HH24:MI' on that column.
Iam not able to query on that field.
Tried adding the foll. code
' AND TO_CHAR(MY_TABLE.MY_TIME, ''HH24:MI'') = TO_CHAR(:MY_BLOCK.MY_TIME, ''HH24:MI'') ');
in pre-query..but doesnot work !! I use the same code in SQL and it works fine..It does retrieve the data...
Any suggestion...
Thanks.

Dear Hareesh and Harish,
Ooopps the names are confusing. but very close..
Yes I changed my receiver structure and added <compareOperation> under the key field Material Number. In the Message Mapping , I assigned a constant EQ to <compareOperation>.
Now tested the proxy will value of Material with no 100 , expecting a response from database for Material 100. But getting error as below.
xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<SAP:Category>XIProtocol</SAP:Category>  
<SAP:Code area="PARSING">GENERAL</SAP:Code>  
<SAP:P1 />  
<SAP:P2 />  
<SAP:P3 />  
<SAP:P4 />  
<SAP:AdditionalText />  
<SAP:Stack>com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.engine.interfaces.messaging.api.exception.MessageExpiredException: Message 53cc7fab-e712-0b20-e100-8000ac10134c(OUTBOUND) expired. at com.sap.aii.adapter.soap.web.SOAPHandler.processSOAPtoXMB(SOAPHandler.java:746) at com.sap.aii.adapter.soap.web.MessageServlet.doPost(MessageServlet.java:505) at  
I am not sure whether there was any response from database.
I am close to end of this thread..
Please guide.
Regards
Rebecca

Similar Messages

  • How can I query on a time field??

    Hi All,
    I have a time field (base table field) in my form. I use a format mask of HH24:MI for that field.
    If i put in "%10:00" in that field and query, the query returns rows correctly. But I canot ask my user to put in a "%" each time he/she queries. I have to do it from the form.....
    How can I do this programatically..I mean how do I write it in pre-query?
    Thanks in advance...
    Sowmya.

    Hi,
    Thanks for your reply...
    Unfortunately I already tried that..
    The problem was to compare only the time portions . And as soon as the user put in say "12:00" in the time field, the system defaulted it to 01-SEP-2002 12:00:00 .And it compared this to the database value which is wrong...
    I solved the problem by creating a non-base table item and then writing code in pre-query using set_block_property etc...and it worked !!
    Thanks for you response once again..
    Sowmya.
    How about using the Set_block_property(Default_where) built in? check the online help.

  • How to show a time field in a form portlet

    Hi,
    I am not familiar with PL/SQL and I was wondering how I could show a time field on a form portlet.
    I have a date column in my database that stores the time and date together, but I do not know how to separate them into date and time fields. I also do not know how to concatenate them when a user inserts a new record, or how to query on a date alone.
    At present, the user has to type the date and time following this format mask hh:mi am DD/Mon/RR
    I also have a problem with one of my hidden id fields. I have set the default to a sequence.nextval (#qtc_app.seq_visitor.nextval) and then hidden it since
    it is irrelevant to my users. However, I can no longer use the query function since the sequence is always generating a new value. How would I only generate
    a new sequence no. when a user inserts a record??
    Thank you!
    cheers, Kim

    Hi,
    Each colunm in the form has a format mask associated with it. For the date column make the format mask like this DD-MON-RR HH.MI. This will show the date along with the hours and minutes.
    Thanks,
    Sharmila

  • F4 help for Time field in webdynpro abap

    Hi Guru's,
    how to get f4 help for time field in webdynpro abap.
    thanks in advance,
    narendra

    Hi Narendra,
    Check this link:
    Re: Time Search Help
    Also few more links here:
    http://forumsa.sdn.sap.com/search.jspa?forumID=249&threadID=&q=time+help&objID=f249&dateRange=lastyear&numResults=15&rankBy=10001
    Also check if this example helps you: WDR_TEST_HELP
    If your query is not yet answered then its advisable to post in webdynpro for abap (Web Dynpro ABAP). You may get some quick repliy.
    Regards,
    Swarna Munukoti.

  • Color coding in the "Date" and "Time" field in "Person Assignment"

    Hi,
    What does it mean when the color of the values for the "Date" and "Time" fields under the tab "Person Assignment" on an activity element in the project builder (CJ20N) turn red?
    Regards,
    Petter Kvalvik

    Hi,
    I dont suppose we have any option to achieve this at Query Designer level. Your requirement can be achieved in Workbook,
    Insert text template in one of the cell in your workbook, context menu--properties-Constant Tab----Check Display last Refreshed. Doing this you will get Date and Time of last refreshed data.
    Thanks,
    Vishnu.

  • Slow query execution time

    Hi,
    I have a query which fetches around 100 records from a table which has approximately 30 million records. Unfortunately, I have to use the same table and can't go ahead with a new table.
    The query executes within a second from RapidSQL. The problem I'm facing is it takes more than 10 minutes when I run it through the Java application. It doesn't throw any exceptions, it executes properly.
    The query:
    SELECT aaa, bbb, SUM(ccc), SUM(ddd), etc
    FROM MyTable
    WHERE SomeDate= date_entered_by_user  AND SomeString IN ("aaa","bbb")
    GROUP BY aaa,bbbI have an existing clustered index on SomeDate and SomeString fields.
    To check I replaced the where clause with
    WHERE SomeDate= date_entered_by_user  AND SomeString = "aaa"No improvements.
    What could be the problem?
    Thank you,
    Lobo

    It's hard for me to see how a stored proc will address this problem. I don't think it changes anything. Can you explain? The problem is slow query execution time. One way to speed up the execution time inside the RDBMS is to streamline the internal operations inside the interpreter.
    When the engine receives a command to execute a SQL statement, it does a few things before actually executing the statement. These things take time. First, it checks to make sure there are no syntax errors in the SQL statement. Second, it checks to make sure all of the tables, columns and relationships "are in order." Third, it formulates an execution plan. This last step takes the most time out of the three. But, they all take time. The speed of these processes may vary from product to product.
    When you create a stored procedure in a RDBMS, the processes above occur when you create the procedure. Most importantly, once an execution plan is created it is stored and reused whenever the stored procedure is ran. So, whenever an application calls the stored procedure, the execution plan has already been created. The engine does not have to anaylze the SELECT|INSERT|UPDATE|DELETE statements and create the plan (over and over again).
    The stored execution plan will enable the engine to execute the query faster.
    />

  • Auto suggest behavior for af:query component LOV fields.

    Hi,
    I am new to ADF development and need help on implementing auto suggest behavior to the LOV fields generated by af:query component. For inputList and inputCombo.. fields we can add af:autosuggestbehavior tag to enable this. How do we enable the same for af:query generated LOV fields.
    Regards,
    C.R

    Thanks Timo for such a quick response.
    JDev version we are using is 11.1.1.6.0
    Unfortunately, we have gone too far with the AF:Query and Everything else is working apart from Auto-Suggest on AF:Query. Now will take a lot of time to implement and test. Also, users will have to spend considerable time to test it again.
    Thanks and Regards,
    Satya

  • How to query a datetime field with a datetime offset value

    Hi Experts
    I have a problem where I want to query a date time field with a value with a date time offset, and convert the value to the stored timezone.
    The functionality I am after is that the user enters the value 30/08/2011 22:14:46 -4:00 and the report converts it into the timezone of the stored field and performs the query using the date time filter and the local equivilent of the date time entered.
    Has anyone had experience in date time offsets and OBIEE?
    suggestions appreciated.
    Cheers

    Hi,
    Use below one
    cast the timestampadd (sql_tsi_year, -1, timestampadd (sql_tsi_day, -1, current_timestamp)) to a date and see if it
    drops the current time stamp and makes it 00:00:00
    Thanks
    Deva

  • Time field in alv list

    Hi all ,
    i want to display alv list with time field . if no data exists in that field its showing 00:00:00 , i have to show it blank. if i change time field as type c in my internal table its showing like this 121314, i need to display it 12:13:14 . if no data it should display balnk . can any one help me out to reslove this issue?

    Hi priya,
    do this:
    declare in your itab a field like sy-uzeit.
    as example.
    move sy-uzeit to itab-uzeit.
    In fieldcat do this:
        MOVE  'X'                        TO   WA_FIELDCAT-NO_ZERO.
    Hope it helps.
    regards, Dieter

  • F4 help for Time field in Webdynpro Screen

    Hi Experts,
    I'm using TIMS data type for my Time field. In ECC we will have F4 function for the same data element, but in Webdynpro screen, am not getting the F4 help.
    I got some information from SCN that I need to go for some custom search help. But with which reference to the table, am I want to create it.
    Please let me know, is there any other possible way to create F4 for time field for webdynpro.
    Even I tried to use some standard search help, but am getting an error as 'Sending of dynpro ' ' not possible. No window system type specified'.
    Expecting valuable information from you experts.
    With Regards,
    RAM.

    Hi RAM,
    For time field, there is no SAP delivered search help in WDA , so we need to go for freely programmed search help.
    Please refer the below link, in which Mr. Thomas, has provided the links for search help document you can follow and create new search help component
    and also nugget of the component which can be imported using ZSAPLINK program.
    search help for time
    Regards,
    Rama

  • No time field in an event added by pressing down a date in the month view of the calendar!, no time field in an event added by pressing down a date in the month view of the calendar!

    I have been trying to add time to an event i already added but the time field does not exist.
    this happens only when I add the event from the month view while I press a date. in no other senario does this happens.
    may be its a bug in the calendar.
    if I press the + sign then it's normal.
    any suggestions on how to fix this?

    there is edit button; however, my problem comes after that. if the event was added using the above method then there is still no way to change the time of the event in that date. if the event was added in any other way then I can change the time.
    and I just realized my iphone3gs with ios5.0.1 has the same exact bug.

  • Problem with Date/Time field in Adobe LiveCycle

    I am trying to create a form that has a check-in and check-out dates. I want the user to enter those dates and then have the form automatically compute how many nights the user intends on staying.
    I have two fields, CHECKIN and CHECKOUT, set up as text fields. My third field, NIGHTS, has the following script to do the calculation:
    var strStart = CHECKIN.rawValue
    var strEnd = CHECKOUT.rawValue
    if(strStart.length && strEnd.length)
    var dateStart = util.scand("mmm d, yyyy",strStart);
    var dateEnd = util.scand("mmm d, yyyy",strEnd);
    var diff = dateEnd.getTime() - dateStart.getTime();
    var oneDay = 24 * 60 * 60 * 1000;
    var days = Math.floor(diff/oneDay);
    this.rawValue = days;
    else
    this.rawValue = 0;
    NOW...this is fine if the user inputs a four-digit year. If not, it's trouble. SO, what I want to do is change the CHECKIN and CHECKOUT fields to the date/time field so they select the date off the pop-up calendar.
    When I make the changes, I can't get the script to work for the NIGHTS field.
    CAN ANYONE HELP THIS NEWBIE?

    Make sure the format of the date strings provided by the calendar is what you are expecting. Or use the "formattedValue" for the input strings.

  • Sap query and additional fields.

    Hello guys.
    ABAP it's not my strong skill, but i need to develop some report.
    What i need:
    input: material, SLED, plant
    output: material, SLED, plant, values from characteristic field.
    I have created sap query with additional field type c.
    Below my code:
    TYPES: BEGIN OF charast,
            ATNAM(50)    TYPE c,
            ATWTB(8)     TYPE n,
            X(50)        TYPE n,
            C(50)        TYPE n,
            ATINN(50)    TYPE n,
            END OF charast.
    DATA: char TYPE TABLE OF charast WITH HEADER LINE.
    CALL FUNCTION 'VB_BATCH_GET_DETAIL'
       EXPORTING
         MATNR              = MCH1-MATNR
         CHARG              = MCH1-CHARG
         GET_CLASSIFICATION = 'X'
       TABLES
         CHAR_OF_BATCH      = char.
    LOOP AT char into TEST (This is an additional field type C.
       ENDLOOP.
    Questions:
    1. How i can return internal table into standard abap type, because i can create additional field only with standart types.
    2. Need i fetch exporting parameters before calling FM? Or sap query do it automatically, based on given values on selection screen of the report?
    3. How i can return only needed field from FM output? Now, when i'm executing FM via SE37 it's show desired result, but when i'm getting it from code i see strange values.
    4. If i don't know exactly return by an FM values, how i can fill structure dynamically?
    5. How i can return result of a program not only to additional field but to layout?
    Sorry for noob questions and thank you in advance guys!

    Well, seems like it work fine for me.
    Below my crappy, but working code:
    DATA: material TYPE MCHB-MATNR,
           batch    TYPE MCHB-CHARG,
           plant    TYPE MCHB-WERKS,
           sloc     TYPE MCHB-LGORT,
           gtdt     TYPE STANDARD TABLE OF clbatch,
           gtdit    TYPE clbatch.
    SELECT MATNR INTO material FROM MCHB
       WHERE MATNR = MCHB-MATNR.
    ENDSELECT.
    SELECT CHARG INTO batch FROM MCHB
       WHERE CHARG = MCHB-CHARG.
    ENDSELECT.
    SELECT WERKS INTO plant FROM MCHB
       WHERE WERKS = MCHB-WERKS.
    ENDSELECT.
    SELECT LGORT INTO sloc FROM MCHB
       WHERE LGORT = MCHB-LGORT.
    ENDSELECT.
    CALL FUNCTION 'VB_BATCH_GET_DETAIL'
       EXPORTING
         MATNR = material
         CHARG = batch
         WERKS = plant
         GET_CLASSIFICATION = 'X'
        TABLES
          CHAR_OF_BATCH = gtdt.
    READ TABLE gtdt INTO gtdit
       WITH KEY atnam = 'BATCH_SHELF_LIFE_EXPIRY_DATE'.
    GTD = gtdit-ATWTB.

  • Distinct count on date/time field...

    Hi,
    I am trying to a distinct count on this formula that takes a date/time field and converts it to a date in order to get a distinct count of dates.  However, it's not working... say, if I have two dates are the same (the times may be different), it's counted twice.  Any suggestions?  I tried to convert this to a string thinking the evaluation may change, but no dice.  Thanks!!
    if not isnull({AVAILABILITY.PAT_ENC_CSN_ID}) then
        cstr(cdate({AVAILABILITY.SLOT_BEGIN_TIME}))
    else

    You can use the following formula...
    DateAdd("d", DateDiff("d", #1/1/1900#, {TableName.YourDateTimeField}), #1/1/1900#)
    This will set each date value to 12:00 am of it's respective day...
    So 8/16/2010   3:01:20PM would become 8/16/2010  12:00:00AM
    Now you can group on this formula field and then simply do a count on the date at the appropriate group level.
    HTH,
    Jason

  • Query execution time

    Dear SCN,
    I am new to BOBJ Environment. I have created a webi report on top of bex query by using BISC connection. Bex query is build for Vendor Ageing Analysis. My bex query will take very less time to execute the report (max 1 min). But in case of webi is takeing around 5 min when i click on refresh. I have not used any conditions,filters,restrictions are done at webi level all are done at bex level only.
    Please let me know techniques to optimize the query execution time in webi. Currently we are in BO 4.0.
    Regards,
    PRK

    Hi Praveen
    Go through this document for performance optimization using BICS connection
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0e3c552-e419-3010-1298-b32e6210b58d?QuickLink=index&…

Maybe you are looking for