How to get the latest Change date and time of a M.O. from View VIAUFKST

Hi All,
I want to get the latest date and time of a M.O. from view
VIAUFKST. I have written the query like this...
  SELECT AUFNR
         AEDAT  " Changed Date
         AEZEIT " Changed Time
    FROM VIAUFKST
    INTO TABLE I_VIAUFKST
   WHERE AEDAT >= W_LASTRUN_DATE
   ORDER BY AEDAT DESCENDING.
but its not giving me right results... Pls help me out on this or suggest me the right approach to achieve the same...As this is very critical issue...
Advance Thanks and Points Gauranteed...
Suresh

> SELECT AUFNR
>          AEDAT
>          AEZEIT
>     FROM VIAUFKST
>     INTO TABLE I_VIAUFKST
>    WHERE AEDAT >= W_LASTRUN_DATE.  
>
>   IF NOT I_VIAUFKST[] IS INITIAL.
>    SORT I_VIAUFKST BY AEDAT AEZEIT DESCENDING.
>    READ TABLE I_VIAUFKST INDEX 1.
>   ENDIF.
>
> The above statement is giving me different results...
> such as...
>
>  1. 30/11/2005 19:20:11
>  2. 29/11/2005 22:10:09
>  3. 30/11/2005 20:56:09
>  4. 28/11/2005 23:10:09
>
> by using the above SORT statement i am getting the
> fourth record as the latest, where as it should give
> me the third record....
>
> Please advise,
> Suresh.
Hi Suresh,
The reason why you are getting this result is because the system is interpreting the DESCENDING only for AEZEIT not for both. Change it to
SORT I_VIAUFKST BY AEDAT DESCENDING AEZEIT DESCENDING

Similar Messages

  • How to find the Last modified date and time of a package

    Hi,
    We need a clarification on how to find the Last modified date and time of a package in Oracle. We used the example below to explain our scenario,
    Lets consider the following example
    Let A, B be two packages.
    Package A calls the package B. So A is dependent on B.
    When A is compiled the TIMESTAMP,LAST_DDL_TIME in USER_OBJECTS gets updated.
    Now there a modification in package B so it is compiled. There is no modification in package A.
    Now when the package A is executed the TIMESTAMP,LAST_DDL_TIME in USER_OBJECTS gets updated but we did not make any change in Package A. Now we need to find last modified date and time of the package A . So we can not rely on the TIMESTAMP,LAST_DDL_TIME in USER_OBJECTS . Can u please tell us any other solution to get last modified date and time of the package A .
    Regards,
    Vijayanand.C

    Here is an example:
    SQL> SELECT OBJECT_NAME,CREATED,LAST_DDL_TIME,TIMESTAMP,STATUS FROM USER_OBJECTS
    2 WHERE OBJECT_NAME = ANY('A','B');
    OBJECT_NAM CREATED LAST_DDL_TIME TIMESTAMP STATUS
    A 20-MAY-2004 10:57:32 20-MAY-2004 10:57:32 2004-05-20:10:57:32 VALID
    B 20-MAY-2004 10:58:22 20-MAY-2004 10:59:04 2004-05-20:10:59:04 VALID
    SQL> CREATE OR REPLACE PROCEDURE A AS
    2 BEGIN
    3 NULL;
    4 NULL;
    5 END;
    6 /
    Procedure created.
    SQL> SELECT OBJECT_NAME,CREATED,LAST_DDL_TIME,TIMESTAMP,STATUS FROM USER_OBJECTS
    2 WHERE OBJECT_NAME = ANY('A','B');
    OBJECT_NAM CREATED LAST_DDL_TIME TIMESTAMP STATUS
    A 20-MAY-2004 10:57:32 20-MAY-2004 11:01:28 2004-05-20:11:01:28 VALID
    B 20-MAY-2004 10:58:22 20-MAY-2004 10:59:04 2004-05-20:10:59:04 INVALID
    SQL> EXEC B
    PL/SQL procedure successfully completed.
    SQL> SELECT OBJECT_NAME,CREATED,LAST_DDL_TIME,TIMESTAMP,STATUS FROM USER_OBJECTS
    2 WHERE OBJECT_NAME = ANY('A','B');
    OBJECT_NAM CREATED LAST_DDL_TIME TIMESTAMP STATUS
    A 20-MAY-2004 10:57:32 20-MAY-2004 11:01:28 2004-05-20:11:01:28 VALID
    B 20-MAY-2004 10:58:22 20-MAY-2004 11:01:53 2004-05-20:11:01:53 VALID
    Note that the date under the column 'created' only changes when you really create or replace the procedure.
    Hence you can use the column 'created' of 'user_objects'.

  • I need to get the Current System Date and time in the format

    I need to get the Current System Date and time in the format
    *6/24/2009 11:30:29 AM*
    How do i do it ?

    I seem to be saying this a lot lately.
    Google is your friend.
    I googled "java current date format" and SimpleDateFormat featured prominently in the results.

  • Can I get the Requisition Submitted Date and Time in Emails

    Can I get the Requisition Submitted Date and Time in Emails
    Hi,
    Is there a way to get Requisition submitted Date and Time in Service Initiation Emails.

    Unfotunately, there is not a namespace that will return Submitted Date for a requisition or service. You can, however, get the start date:
    #Requisition.StartedDate# or #Service.Requisition.StartedDate#

  • Table name for Info-record where i can get the last changed date and user

    Using ME12, i have changed the price of the info record i want to get the who was the user and changed date...
    I had check in EINA EINE but i couldnt find out please anybody Please help me out by providing solution for this??

    Hi
    If at the data element level the field for which you want to know the old and new fields  the option of CHANGE DOCUMENT option must be  enabled ,then you can find the old and new values in the
    CDHDR -
    Change document header
    CDPOS -
    Change document items.
    Regards
    Pavan

  • My ipod is the second Generation, how can i upgrade  to get the latest game apps and such?

    My ipod is the second Generation, how can i upgrade  to get the latest game apps and such?

    You probably can't. Many games and other apps now require iOS 4.3 or later, and iOS 4.2.1 is the last version that will run on a 2nd-gen iPod touch. If you want to run newer games, you'll need a newer iPod.  If you want to look for games that will run on your iPod, here's a tip from another user that may help you:
    "I was running into the same problem trying to find apps for my daughters Iphone 3g running 4.2.1.  What I did was go to the Itunes store through Itunes on my PC, and then went to the bottom of the main page and clicked "Browse." On the browse page I selected, App Store, Games (category), Kids (subcategory), and then a list of apps appears below. 
    I sorted by date (oldest to newest) by right-clicking next to "price" and choosing "release date" on the menu that pops up. The date created field will then be showing, which you can click on to sort newest to oldest or oldest to newest.  I downloaded a bunch of free apps starting from the oldest (by name - you don't have much else to go on).  Of the 30 or so I added to my Itunes, about 27 of them were compatible with 4.2.1. 
    This is defintely not a perfect way of finding apps, but after spending a lot of time searching for a better way this was the best I could come up with."
    You can also check out these web sites:
    https://sites.google.com/site/appleclubfhs/support/advice-and-articles/finding-a pps-for-older-devices
    http://findoldapps.com
    Other posts may provide other tips on how to look for compatible apps.
    Regards.

  • How do I get the last changed date & time of a file in app server?

    Hi Experts,
    How do I get the last changed date & time of a file in app server?
    Thanks!
    - Anthony -

    Hi,
    that's what I use...
      CALL 'C_DIR_READ_FINISH'.             " just to be sure
      CALL 'C_DIR_READ_START' ID 'DIR' FIELD p_path.
      IF sy-subrc <> 0.
        EXIT. "Error
      ENDIF.
      DO.
        CLEAR l_srvfil.
        CALL 'C_DIR_READ_NEXT'
          ID 'TYPE'   FIELD l_srvfil-type
          ID 'NAME'   FIELD l_srvfil-file
          ID 'LEN'    FIELD l_srvfil-size
          ID 'OWNER'  FIELD l_srvfil-owner
          ID 'MTIME'  FIELD l_mtime
          ID 'MODE'   FIELD l_srvfil-attri.
    *    l_srvfil-dir = p_path .
        IF sy-subrc = 1.
          EXIT.
        ENDIF." sy-subrc <> 0.
        PERFORM p_to_date_time_tz
          USING    l_mtime
          CHANGING l_srvfil-mod_time
                   l_srvfil-mod_date.
        TRANSLATE l_srvfil-type TO UPPER CASE.               "#EC TRANSLANG
        PERFORM translate_attribute CHANGING l_srvfil-attri.
        CHECK:
          NOT l_srvfil-file = '.',
          l_srvfil-type = 'D' OR
          l_srvfil-type = 'F' .
        APPEND l_srvfil TO lt_srvfil.
      ENDDO.
      CHECK NOT lt_srvfil IS INITIAL.
      pt_srvfil = lt_srvfil.
    FORM p_to_date_time_tz  USING    p_ptime  TYPE p
                            CHANGING p_time   TYPE syuzeit
                                     p_date   TYPE sydatum.
      DATA:
        l_abaptstamp TYPE timestamp,
        l_time       TYPE int4,
        l_opcode     TYPE x VALUE 3,
        l_abstamp    TYPE abstamp.
      l_time = p_ptime.
      CALL 'RstrDateConv'
        ID 'OPCODE' FIELD l_opcode
        ID 'TIMESTAMP' FIELD l_time
        ID 'ABAPSTAMP' FIELD l_abstamp.
      l_abaptstamp = l_abstamp.
      CONVERT TIME STAMP l_abaptstamp TIME ZONE sy-zonlo INTO DATE p_date
          TIME p_time.
    ENDFORM.                    " p_to_date_time_tz
    Regards,
    Clemens

  • HT3140 put a date 1970 june 27 . and now the whole system is out of control i cant get to internet cannot change date and time  always when i opened system preferences stays in a waiting mode but doesnt show any opcion don t know what to do and i just bou

    put a date 1970 june 27 . and now the whole system is out of control i cant get to internet cannot change date and time  always when i opened system preferences stays in a waiting mode but doesnt show any opcion don t know what to do and i just bought this computer

    It may well be a driver issue but considering the loading: Xorg trying to load different drivers is somewhat normal. @cafe you can see that these are autoconfigured by X above the loading in the log:
    Jul 20 19:48:24 arch gdm-Xorg-:0[216]: (==) Matched intel as autoconfigured driver 0
    Jul 20 19:48:24 arch gdm-Xorg-:0[216]: (==) Matched intel as autoconfigured driver 1
    Jul 20 19:48:24 arch gdm-Xorg-:0[216]: (==) Matched modesetting as autoconfigured driver 2
    Jul 20 19:48:24 arch gdm-Xorg-:0[216]: (==) Matched fbdev as autoconfigured driver 3
    Jul 20 19:48:24 arch gdm-Xorg-:0[216]: (==) Matched vesa as autoconfigured driver 4
    As long as one of the drivers gets loaded, which it apparently does the failing of the others is fine.
    Was there an update maybe ?

  • My app store is saying i have to change date and time setting to get a secure connection but the date and time are correct please help?

    My app store is telling me i have yo change date and time setting to download apps and idk what is wrong cause date and time are correct

    Is the Time Zone also correct?
    Also see:
    Can't connect to the iTunes Store

  • How to get the "last changed by" for a set of function modules?

    How to get the "last changed by" for a set of function modules?
    is there any table to get it??

    See [this|Re: Date of creation of function module] I posted earlier.
    >TFDIR will give you the name of the function group program and the include number.
    >E.g. SAPLZFUNCGROUP Include 01.
    >From this you can construct the include name: LZFUNCGROUPU01.
    >You can look this up in TRDIR to find the creation date (CDAT) of the function module.
    In your case, you need unam and udat.
    matt

  • How to get the latest credit limit values per each customer in the report.

    Hi All,
    Can anybody give me an idea on how to get the latest credit limit values per each customer in the report.
    I have below requiremnt.
    I have cube which is having transactional data on document and customer level .and it also having master data info object in the cube which is credit management view having all the customer numbers .
    This credit management view is master data info object having credit limit key figure as attribute.These credit limit are per each customer.
    So we need these credit limits in the report as dynamic values .(I mean whatever be the current credit limit in the master data table for that paricular customer that should show up in the reporting).
    one more thing these credit limits should roll up correctly at the HTR level.
    One HTR having number of customers .
    for example HTR 100 can have customer number 200,300,400.
    Those 200,300,400 customer credit limits should roolup correctly at the HTR 100 level.
    Example below :
    Cube DATA :
    HTR Customer Doct number Credit managment view
    100 200 10001 200
    100 200 10002 200
    100 300 10004 300
    100 300 10005 300
    100 400 10006 400
    100 400 10007 400
    100 400 10008 400
    Master data tabel (P Table)(Credit managment view)
    Credit managment view Credit limits
    200 1000.00
    300 50000.00
    400 90000.00
    Please remeber :
    We can not make these credit limits as navigational becasue these are keyfigure attributes not characteristics.
    one more thing we can not make them as charatistics because we need use these credit limits to derive other calkculation. so it is not possibel to derive calculations on charactristics .

    Create a formula variable of type replacement path with reference as attibutes of Credit management view and choose your key figure credit limit,say zcredit.
    Now create a formula or CKF and use zcredit.
    This should display the credit limit in your report as normal key figure.
    I didnot get this part "one more thing these credit limits should roll up correctly at the HTR level.", may be the above will solve this too.Try it.
    Hope this helps.

  • How to get the latest creditlimits in the reporting

    Hi All,
    Can anybody give me an idea on how to  get the latest credit limit values per each customer in the report.
    I have below requiremnt.
    I have cube which is having transactional data on document and customer level .and it also having master data info object in the cube  which is credit management view having all the customer numbers .
    This credit management view is master data info object having credit limit key figure as attribute.These credit limit  are per each customer.
    So we need these credit limits in the report  as dynamic values .(I mean whatever be the current credit limit in the master data table for that paricular customer that should show up in the reporting).
    one more thing these credit limits should roll up correctly at the HTR level.
    One HTR having number of customers .
    for example HTR 100 can have  customer number 200,300,400.
    Those 200,300,400 customer credit limits should roolup correctly at the HTR 100 level.
    Example below :
    Cube DATA :
    HTR         Customer     Doct number  Credit managment view
    100            200                10001             200
    100            200                10002             200
    100            300                10004             300
    100            300                10005             300
    100            400                10006             400
    100            400                10007             400
    100            400                10008             400
    Master data tabel (P Table)(Credit managment view)
    Credit managment view       Credit limits
    200                                           1000.00
    300                                           50000.00
    400                                           90000.00
    Please remeber :
    We can not make these credit limits as navigational becasue these are keyfigure attributes not characteristics.
    one more thing we can not make them as charatistics because we need use these credit limits to derive other calkculation. so it is not possibel to derive calculations on charactristics .
    Edited by: sirisha Nekkanti on Oct 30, 2008 6:27 PM
    Edited by: sirisha Nekkanti on Oct 30, 2008 6:35 PM

    This is duplicate of
    how to get the latest credit limit values per each customer in the report.
    thread.

  • Unable to Determine the Change Date and Time for records in infotype 2011

    Hi Everyone,
    We need to know on when the clock-in and clock-out records were interfaced to SAP in infotype 2011.
    The change date/time field in infotype 2011 is blank/not populated. Hence, we're unable to determine on when the clock-in records were updated in infotype 2011.
    It is not possible to get the audit logs for infotype 2011 as it is switched off.
    We found this table TEVEN and just the same thing, the field "change on" is blank.
    Kindly help us on how we can determine the change date and time for records in infotype 2011.

    Hi Prasad,
    Here's the scenario.
    On June 3, it was reported that staff's clock-in record on june 1, 7:00AM is missing in infotype 2011.
    However, when I checked infotype 2011, the record is there.
    So, they are now asking me on when this record was updated in infotype 2011 as they are thinking that there might be some delays in sending of the data to SAP.
    The created on and created at in table TEVEN shows the same, june 1, 7:00AM which seems to be not true as on june 3, it was reported to be missing.
    Can you help further on this?

  • How to get the latest versions of Internet Explorer t

    We are running Single Primary Site with SCCM 2012 R2. 
    I
    cant seem to find out how to get the latest versions of Internet Explorer to be included in software updates?  Do you have to download this separately and install manually?

    Like Henrik said, make sure you have the Classifications selected that you want to address. IE 11 is the current browser, that was added to the catalog a few months back. If you are searching for this month you wont find it.

  • How to get the user entered data?

    Hi all,
    I have created an HTMLB DynPage component.
    In That i have created my input screen with textboxes using response.write method.
    i have added one onConfirm event on which the data whould validate.
    so onConfirm method im trying to get the data with request.getParameter method which returns null...
    how to do...how to get the user entered data to do my validations...can anyone plz advice.
    Thanks,
    Viswes

    Hi
    inputfield or textbox component entered directly using response.write(...) are not htmlb , but html.
    to create portal input field (ie HTMLB), you should do something like
    this in the doProcessBeforeOutput member function
    InputField field1 = new InputField("Id1");
    field1.setSize(8); // 8 characters
    this.getForm().addComponent(field1);
    and in doProcessAfterInput member function
    InputField field1 =
    (InputField) this.getComponentByName("Id1");
    you can then manipulate the content of the field.
    Hope this help,
    Guillaume

Maybe you are looking for