<?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 Sort inernal table using 2 fields and only modify first record from a list in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-inernal-table-using-2-fields-and-only-modify-first-record-from-a-list/m-p/8872466#M1687264</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a requirement in BW to transform HR related data for internal use. For this purpose i have created an APD (Analysis Process Designer) which reads data from a database table and writes it into a CSV file by trasnforming only some records using an ABAP routine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Exmaple.&lt;/STRONG&gt;&lt;/SPAN&gt; I have ORGUNIT and DATETO as 2 fields in the source table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ORGUNIT | DATETO |&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;12345678 | 31.12.2011&lt;/P&gt;&lt;P&gt;12345678 | 31.11.2010&lt;/P&gt;&lt;P&gt;12345678 | 31.10.2009&lt;/P&gt;&lt;P&gt;12345678 | 31.08.2008&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;87654321 | 31.12.9999&lt;/P&gt;&lt;P&gt;87654321 | 31.12.2012&lt;/P&gt;&lt;P&gt;87654321 | 31.10.2011&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Target CSV file should have output like below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;12345678 | 31.12.9999&lt;/P&gt;&lt;P&gt;12345678 | 31.11.2010&lt;/P&gt;&lt;P&gt;12345678 | 31.10.2009&lt;/P&gt;&lt;P&gt;12345678 | 31.08.2008&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;87654321 | 31.12.9999&lt;/P&gt;&lt;P&gt;87654321 | 31.12.2012&lt;/P&gt;&lt;P&gt;87654321 | 31.10.2011&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the above example ORGUIT 87654321 has no change, where as in 12345678 we need to sort the ORGUNIT by DATETO field in DESCENDING ORDER and check the first record's DATETO value. IF first record's DATETO value is not equal to 31.12.9999, we only need to modify the first record with value as 31.12.9999. rest of the records will remain same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this requirement i used the below code in my routine and struggling to get the logic working.&lt;SPAN __jive_emoticon_name="silly" __jive_macro_name="emoticon" class="jive_macro jive_macro_emoticon jive_emote" src="https://community.sap.com/843/images/emoticons/silly.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: ls_ source type y_source_fields,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ls_target type y_target_feilds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT itab by ORGUNIT ASCENDING DATETO DESCENDING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab into ls_source.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move-corresponsing ls_source to ls_target.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if ls_source-DATETO ne '99991231'&lt;/P&gt;&lt;P&gt;ls_target-DATETO = '99991231'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Append ls_target to et_target.&lt;/P&gt;&lt;P&gt;Endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not an ABAPer .but trying to do this by myself. The above code gives me DATETO fields for each record as 31.12.9999.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any one help me here please.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Aug 2012 01:37:28 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-08-02T01:37:28Z</dc:date>
    <item>
      <title>Sort inernal table using 2 fields and only modify first record from a list</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-inernal-table-using-2-fields-and-only-modify-first-record-from-a-list/m-p/8872466#M1687264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a requirement in BW to transform HR related data for internal use. For this purpose i have created an APD (Analysis Process Designer) which reads data from a database table and writes it into a CSV file by trasnforming only some records using an ABAP routine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Exmaple.&lt;/STRONG&gt;&lt;/SPAN&gt; I have ORGUNIT and DATETO as 2 fields in the source table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ORGUNIT | DATETO |&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;12345678 | 31.12.2011&lt;/P&gt;&lt;P&gt;12345678 | 31.11.2010&lt;/P&gt;&lt;P&gt;12345678 | 31.10.2009&lt;/P&gt;&lt;P&gt;12345678 | 31.08.2008&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;87654321 | 31.12.9999&lt;/P&gt;&lt;P&gt;87654321 | 31.12.2012&lt;/P&gt;&lt;P&gt;87654321 | 31.10.2011&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Target CSV file should have output like below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;12345678 | 31.12.9999&lt;/P&gt;&lt;P&gt;12345678 | 31.11.2010&lt;/P&gt;&lt;P&gt;12345678 | 31.10.2009&lt;/P&gt;&lt;P&gt;12345678 | 31.08.2008&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;87654321 | 31.12.9999&lt;/P&gt;&lt;P&gt;87654321 | 31.12.2012&lt;/P&gt;&lt;P&gt;87654321 | 31.10.2011&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the above example ORGUIT 87654321 has no change, where as in 12345678 we need to sort the ORGUNIT by DATETO field in DESCENDING ORDER and check the first record's DATETO value. IF first record's DATETO value is not equal to 31.12.9999, we only need to modify the first record with value as 31.12.9999. rest of the records will remain same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this requirement i used the below code in my routine and struggling to get the logic working.&lt;SPAN __jive_emoticon_name="silly" __jive_macro_name="emoticon" class="jive_macro jive_macro_emoticon jive_emote" src="https://community.sap.com/843/images/emoticons/silly.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: ls_ source type y_source_fields,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ls_target type y_target_feilds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT itab by ORGUNIT ASCENDING DATETO DESCENDING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab into ls_source.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move-corresponsing ls_source to ls_target.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if ls_source-DATETO ne '99991231'&lt;/P&gt;&lt;P&gt;ls_target-DATETO = '99991231'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Append ls_target to et_target.&lt;/P&gt;&lt;P&gt;Endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not an ABAPer .but trying to do this by myself. The above code gives me DATETO fields for each record as 31.12.9999.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any one help me here please.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 01:37:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-inernal-table-using-2-fields-and-only-modify-first-record-from-a-list/m-p/8872466#M1687264</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-08-02T01:37:28Z</dc:date>
    </item>
    <item>
      <title>Re: Sort inernal table using 2 fields and only modify first record from a list</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-inernal-table-using-2-fields-and-only-modify-first-record-from-a-list/m-p/8872467#M1687265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear &lt;STRONG style="font-size: 11px; background-color: #ffffff; color: #333333;"&gt;Former Member&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;DATA: ls_ source type y_source_fields,&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ls_target type y_target_feilds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;SORT itab by ORGUNIT ASCENDING DATETO DESCENDING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;loop at itab into ls_source.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;At New&amp;nbsp; &lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;ORGUNIT&lt;/SPAN&gt;.&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;if ls_source-DATETO ne '99991231'&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;ls_target-DATETO = '99991231'&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;end at.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;Append ls_target to et_target.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;Endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;With Regards,&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;Akshay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 04:57:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-inernal-table-using-2-fields-and-only-modify-first-record-from-a-list/m-p/8872467#M1687265</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-08-02T04:57:30Z</dc:date>
    </item>
    <item>
      <title>Re: Sort inernal table using 2 fields and only modify first record from a list</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-inernal-table-using-2-fields-and-only-modify-first-record-from-a-list/m-p/8872468#M1687266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But that doesn't solve my problem. The result is not what i wanted. if i don't use move corresponding statement at the start of the loop, that will write all other field values to zero except DATETO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any other thougths please ??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 06:25:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-inernal-table-using-2-fields-and-only-modify-first-record-from-a-list/m-p/8872468#M1687266</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-08-02T06:25:00Z</dc:date>
    </item>
    <item>
      <title>Re: Sort inernal table using 2 fields and only modify first record from a list</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-inernal-table-using-2-fields-and-only-modify-first-record-from-a-list/m-p/8872469#M1687267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any one please help me with the code here please.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the code as below, but it is not working as i wanted.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;DATA&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt;"&gt;: &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;LS_SOURCE &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;y_source_fields&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LS_TARGET &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;y_target_fields&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;SORT &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;it_SOURCE &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;BY &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;ORGUNIT &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;ASCENDING &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;DATETO &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;DESCENDING&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;LOOP AT &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;IT_SOURCE &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;into &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;ls_source&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt;"&gt;. &lt;/SPAN&gt;&lt;EM style="color: #808080; font-size: 10pt;"&gt;&lt;EM style="color: #808080; font-size: 10pt;"&gt;..&lt;/EM&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;&lt;SPAN style=": ; color: #0000ff; font-size: 10pt;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;MOVE-CORRESPONDING &lt;/P&gt;&lt;SPAN style="font-size: 10pt;"&gt;ls_source &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;to &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;ls_target&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;at new &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;ORGUNIT&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;ls_source&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;dateto &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;ne &lt;/SPAN&gt;&lt;SPAN style="color: #4da619; font-size: 10pt;"&gt;'99991231'&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ls_target&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;dateto &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt;"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #4da619; font-size: 10pt;"&gt;'99991231'&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;endif&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;endat&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;append &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;ls_target &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;to &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;et_target&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;SORT &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;ET_TARGET &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;BY &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;NODEID &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;ASCENDING&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;ENDLOOP.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2012 01:03:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-inernal-table-using-2-fields-and-only-modify-first-record-from-a-list/m-p/8872469#M1687267</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-08-09T01:03:19Z</dc:date>
    </item>
    <item>
      <title>Re: Sort inernal table using 2 fields and only modify first record from a list</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-inernal-table-using-2-fields-and-only-modify-first-record-from-a-list/m-p/8872470#M1687268</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;Could you please show how have you defined the types y_source_fields and y_target_fields?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kumud&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2012 05:16:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-inernal-table-using-2-fields-and-only-modify-first-record-from-a-list/m-p/8872470#M1687268</guid>
      <dc:creator>kumud</dc:creator>
      <dc:date>2012-08-09T05:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: Sort inernal table using 2 fields and only modify first record from a list</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-inernal-table-using-2-fields-and-only-modify-first-record-from-a-list/m-p/8872471#M1687269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi POPS,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What output you are getting..?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you getting " ****** " in date field....???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you are getting " ****** " in date filed than go for the following modified code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12.222222328186035px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #0000ff;"&gt;DATA&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #800080;"&gt;: &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;LS_SOURCE &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #0000ff;"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;y_source_fields&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #800080;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LS_TARGET &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #0000ff;"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;y_target_fields&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #800080;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.222222328186035px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;DATA: Old_date type&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;ls_target&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #808080;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;dateto&lt;/SPAN&gt;&lt;SPAN style="font-family: inherit; font-size: 10pt; font-style: inherit;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.222222328186035px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; New_date type &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;ls_target&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #808080;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;dateto.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.222222328186035px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.222222328186035px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #0000ff;"&gt;SORT &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;it_SOURCE &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #0000ff;"&gt;BY &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;ORGUNIT &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #0000ff;"&gt;ASCENDING &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;DATETO &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #0000ff;"&gt;DESCENDING&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #800080;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #0000ff;"&gt;LOOP AT &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;IT_SOURCE &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #0000ff;"&gt;into &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;ls_source&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #800080;"&gt;. &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: inherit; color: #808080;"&gt;&lt;EM&gt;..&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.222222328186035px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #0000ff;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12.222222328186035px; background-color: #ffffff; color: #333333;"&gt;MOVE-CORRESPONDING&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; background-color: #ffffff; color: #333333;"&gt;ls_source &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background-color: #ffffff; color: #0000ff;"&gt;to &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background-color: #ffffff; color: #333333;"&gt;ls_target&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background-color: #ffffff; color: #800080;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12.222222328186035px; background-color: #ffffff; color: #333333;"&gt;old_date = &lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;ls_target&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #808080;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;dateto.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12.222222328186035px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #0000ff;"&gt;at new &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;ORGUNIT&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #800080;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if old_date&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #0000ff;"&gt;ne &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #4da619;"&gt;'99991231'&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #800080;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new_date &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #800080;"&gt;= &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #4da619;"&gt;'99991231'&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #800080;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.222222328186035px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #333333; background-color: #ffffff;"&gt;new_date&lt;/SPAN&gt; =&amp;nbsp; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;old_date&lt;/SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.222222328186035px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; endif&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #800080;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #0000ff;"&gt;endat&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #800080;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.222222328186035px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #800080;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;ls_target&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #808080;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;dateto = new_date.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;clear new_date.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;clear old_date.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12.222222328186035px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #0000ff;"&gt;append &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;ls_target &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #0000ff;"&gt;to &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;et_target&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #800080;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #0000ff;"&gt;SORT &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;ET_TARGET &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #0000ff;"&gt;BY &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;NODEID &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #0000ff;"&gt;ASCENDING&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #800080;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit; color: #0000ff;"&gt;ENDLOOP.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With Regards,&lt;/P&gt;&lt;P&gt;Akshay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2012 05:37:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-inernal-table-using-2-fields-and-only-modify-first-record-from-a-list/m-p/8872471#M1687269</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-08-09T05:37:39Z</dc:date>
    </item>
  </channel>
</rss>

