<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Sorting Date and Time in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-date-and-time/m-p/3489465#M839017</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Clemens,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;50% achieved, but I need to retain the values of the date and time and changenr. Once they are copied to itab2,&lt;/P&gt;&lt;P&gt;the values are set to '*' . Any pointer as to how to retain the values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 09 Mar 2008 14:57:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-09T14:57:14Z</dc:date>
    <item>
      <title>Sorting Date and Time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-date-and-time/m-p/3489461#M839013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have requirement to sort date and time fiields in an internal table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The internal table looks something like this during runtime. &lt;/P&gt;&lt;P&gt;Line  Objectclass      UDATE            UTIME   OBJECTID         CHANGENR   CHANGE_IND&lt;/P&gt;&lt;P&gt;8	ISU_EEIN	20080305	144814	000000000111	0000035262	  I&lt;/P&gt;&lt;P&gt;9	ISU_EEIN	20080305	145735	000000000112	0000035281	  I&lt;/P&gt;&lt;P&gt;10	ISU_EEIN	20080305	151418	000000000113	0000035319 	 I&lt;/P&gt;&lt;P&gt;11	ISU_EEIN	20080305	154931	000000000114	0000035378	 I&lt;/P&gt;&lt;P&gt;12	ISU_EEIN	20080305	155002	000000000115	0000035389	 I&lt;/P&gt;&lt;P&gt;13	ISU_EEIN	20080305	162803	000000000116	0000035400	 I&lt;/P&gt;&lt;P&gt;14	ISU_EEIN	20080306	095028	000000000113	0000035450 	 U&lt;/P&gt;&lt;P&gt;15	ISU_EEIN	20080306	123835	000000000117	0000035613	 I&lt;/P&gt;&lt;P&gt;16	ISU_EEIN	20080306	133532	000000000118	0000035628	 I&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now if you observe Line 10 and Line 14. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OBJECT ID has two entries. One with Change_Ind 'I' on 05.03.2008 and 'U' on 06.03.2008 , &lt;/P&gt;&lt;P&gt;so here I need to have only ie... Line 14 for objectid 113 after sorting and deleting.&lt;/P&gt;&lt;P&gt;The current sort stmt which i am using is not solving the purpose, &lt;/P&gt;&lt;P&gt;Can you guys help me as how to achieve the result?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Awaiting your replies. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vinay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Mar 2008 15:45:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-date-and-time/m-p/3489461#M839013</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-08T15:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting Date and Time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-date-and-time/m-p/3489462#M839014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;    after select statement&lt;/P&gt;&lt;P&gt;   use sort itab by field1 field2  descending.&lt;/P&gt;&lt;P&gt;   delete adjacent duplicates from table itab comparing field1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards ,&lt;/P&gt;&lt;P&gt;venkat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Mar 2008 15:53:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-date-and-time/m-p/3489462#M839014</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-08T15:53:49Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting Date and Time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-date-and-time/m-p/3489463#M839015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did not achieve the desired,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just for your information the internal table is as follows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;objuectclas  udate      utime    objectid         changenr      change_ind&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; ISU_EEIN 20080305 144814 000000000111 0000035262     I&lt;/P&gt;&lt;P&gt; ISU_EEIN 20080305 145735 000000000112 0000035281     I&lt;/P&gt;&lt;P&gt; ISU_EEIN 20080305 151418 000000000113 0000035319     I&lt;/P&gt;&lt;P&gt; ISU_EEIN 20080305 154931 000000000114 0000035378     I&lt;/P&gt;&lt;P&gt; ISU_EEIN 20080305 155002 000000000115 0000035389     I&lt;/P&gt;&lt;P&gt; ISU_EEIN 20080305 162803 000000000116 0000035400     I&lt;/P&gt;&lt;P&gt; ISU_EEIN 20080306 095028 000000000113 0000035450    U&lt;/P&gt;&lt;P&gt; ISU_EEIN 20080306 123835 000000000117 0000035613     I&lt;/P&gt;&lt;P&gt; ISU_EEIN 20080306 133532 000000000118 0000035628     I&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i use the delete statements only 1 entry will remain.&lt;/P&gt;&lt;P&gt;Because i have to have only the latest record if it was updated,&lt;/P&gt;&lt;P&gt;since document 113 was updated on 06.03.2008. I should have only one record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My result should be as follows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; ISU_EEIN 20080305 144814 000000000111 0000035262     I&lt;/P&gt;&lt;P&gt; ISU_EEIN 20080305 145735 000000000112 0000035281     I&lt;/P&gt;&lt;P&gt; ISU_EEIN 20080305 154931 000000000114 0000035378     I&lt;/P&gt;&lt;P&gt; ISU_EEIN 20080305 155002 000000000115 0000035389     I&lt;/P&gt;&lt;P&gt; ISU_EEIN 20080305 162803 000000000116 0000035400     I&lt;/P&gt;&lt;P&gt; ISU_EEIN 20080306 095028 000000000113 0000035450    U&lt;/P&gt;&lt;P&gt; ISU_EEIN 20080306 123835 000000000117 0000035613     I&lt;/P&gt;&lt;P&gt; ISU_EEIN 20080306 133532 000000000118 0000035628     I&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Mar 2008 16:23:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-date-and-time/m-p/3489463#M839015</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-08T16:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting Date and Time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-date-and-time/m-p/3489464#M839016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vinay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope I get you right: You want to reduce the internal table to the last operation on one object id.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Arrange the fields in itab structure like  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Objectclass OBJECTID UDATE UTIME CHANGENR CHANGE_IND&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then create a second table itab2 with the same structure.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
sort itab.
loop at itab.
  at end of OBJECTID.
    append itab to itab2.
  endat.
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;itab[] = itab2[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you have what you want: Only one entry per Objectclass OBJECTID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Mar 2008 21:04:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-date-and-time/m-p/3489464#M839016</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2008-03-08T21:04:00Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting Date and Time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-date-and-time/m-p/3489465#M839017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Clemens,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;50% achieved, but I need to retain the values of the date and time and changenr. Once they are copied to itab2,&lt;/P&gt;&lt;P&gt;the values are set to '*' . Any pointer as to how to retain the values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Mar 2008 14:57:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-date-and-time/m-p/3489465#M839017</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-09T14:57:14Z</dc:date>
    </item>
  </channel>
</rss>

