Skip to Content
author's profile photo Former Member
Former Member

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Nov 30, 2005 at 06:01 PM

    What is not correct? I think your query should give you the output you wanted but only by date. If there are more in the same day, then you may need to add the aezeit also to the order by clause.

    It is not advisable to do GROUP functions such as this ORDER BY on a database table. Instead, bring all the records with the WHERE clause you have and then sort the internal table by AUFNR AEDAT AEZEIT descending.

    Srinivas

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 30, 2005 at 06:08 PM

    Hi

    Try to Use Sort insted of Order by .

    Performance will be increased.

    regards

    vijay

    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.