<?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 data selection and sorting. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-selection-and-sorting/m-p/1299670#M158015</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear friends,, &lt;/P&gt;&lt;P&gt;  I m working on problem to fetch data from the database to the internal table based on the selection criteria would you like to give me some idea on it..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what i m doing is, I m searching records from 4 tables and checking first by title if title is match then initial if initial is match then by name_last if the name_last is match then by idnumber then by type then by istype then by zzacc_num so here if i found all seven entries match then it should be moved to one internal table and among seven record if n e one entry is failed to match then it should be moved to another internal table, and if i m found 5 entries matching then it should be left...&lt;/P&gt;&lt;P&gt;so here the problem is &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i. to search the records which are matched 0n 7 entries should move to one internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ii. to search the records which are matched on 6 entries and not less than 6 then it should be moved to another internal table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;iii. rest of the entries left..&lt;/P&gt;&lt;P&gt;thanking you for your time and intrest in my problem i ll be greatfull if you give me some idea. or suggestion or code,, to fix this thing...&lt;/P&gt;&lt;P&gt;thanking you..&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;naim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 May 2006 20:19:16 GMT</pubDate>
    <dc:creator>naimkhans_babi</dc:creator>
    <dc:date>2006-05-30T20:19:16Z</dc:date>
    <item>
      <title>data selection and sorting.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-selection-and-sorting/m-p/1299670#M158015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear friends,, &lt;/P&gt;&lt;P&gt;  I m working on problem to fetch data from the database to the internal table based on the selection criteria would you like to give me some idea on it..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what i m doing is, I m searching records from 4 tables and checking first by title if title is match then initial if initial is match then by name_last if the name_last is match then by idnumber then by type then by istype then by zzacc_num so here if i found all seven entries match then it should be moved to one internal table and among seven record if n e one entry is failed to match then it should be moved to another internal table, and if i m found 5 entries matching then it should be left...&lt;/P&gt;&lt;P&gt;so here the problem is &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i. to search the records which are matched 0n 7 entries should move to one internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ii. to search the records which are matched on 6 entries and not less than 6 then it should be moved to another internal table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;iii. rest of the entries left..&lt;/P&gt;&lt;P&gt;thanking you for your time and intrest in my problem i ll be greatfull if you give me some idea. or suggestion or code,, to fix this thing...&lt;/P&gt;&lt;P&gt;thanking you..&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;naim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 May 2006 20:19:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-selection-and-sorting/m-p/1299670#M158015</guid>
      <dc:creator>naimkhans_babi</dc:creator>
      <dc:date>2006-05-30T20:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: data selection and sorting.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-selection-and-sorting/m-p/1299671#M158016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naim,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is my vague idea (from what i understood).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) when you do the first matching, keep a "flag" active and keep the flag active if subsequent conditions are met. If any matching fails, then track the number of fails using another variable "count".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) once the matching is completed for all the 7 conditions, then check for flag active and count. if the count is "0" and flag is active, move it to first_itab. if the count is "1" and flag is active, move it to second_itab. if count is more than 1, ignore them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I might not be clear but my intention is to use a flag and a counter to keep track of number of matching conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vicky&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: Award points if helpful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 May 2006 20:37:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-selection-and-sorting/m-p/1299671#M158016</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-30T20:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: data selection and sorting.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-selection-and-sorting/m-p/1299672#M158017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. First we fetch all the data from 4 database tables into 4 corresponding internal tables ( itab1, itab2, itab3, itab4 ).&lt;/P&gt;&lt;P&gt;2. We have 2 internal tables declared to store entries that match 7 fields and 6 fields ( itab_7match, itab_6match ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. We declare two variables as flags ( W_FLAG7, W_FLAG6 ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Now to check if all seven entries are matching.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab1.&lt;/P&gt;&lt;P&gt;read table itab2 with key &amp;lt;field1&amp;gt; = itab-&amp;lt;field1&amp;gt;&lt;/P&gt;&lt;P&gt;                          &amp;lt;field2&amp;gt; = itab-&amp;lt;field2&amp;gt;&lt;/P&gt;&lt;P&gt;                          ......&lt;/P&gt;&lt;P&gt;                          &amp;lt;field7&amp;gt; = itab-&amp;lt;field7&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;w_flag7 = 'X'.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;clear w_flag7.&lt;/P&gt;&lt;P&gt;read table itab2 with key &amp;lt;field1&amp;gt; = itab-&amp;lt;field1&amp;gt;&lt;/P&gt;&lt;P&gt;                          &amp;lt;field2&amp;gt; = itab-&amp;lt;field2&amp;gt;&lt;/P&gt;&lt;P&gt;                          ......&lt;/P&gt;&lt;P&gt;                          &amp;lt;field6&amp;gt; = itab-&amp;lt;field6&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;w_flag6 = 'X'.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;clear w_flag6.&lt;/P&gt;&lt;P&gt;continue.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*C-- Now check if W_FLAG7 or W_FLAG6 is checked, if W_FLAG7 is checked then read itab3 and itab4 with 7 key fields and if the read is successfull populate the entries into itab_7match, if the read is not successfull then clear W_FLAG7 and go to next iteration. (CONTINUE).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or if W_FLAG6 is checked then do read on itab3 and itab4 with 6 fields and populate it to ITAB_6MATCH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 May 2006 01:53:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-selection-and-sorting/m-p/1299672#M158017</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-31T01:53:31Z</dc:date>
    </item>
  </channel>
</rss>

