<?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 internal table searching... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-searching/m-p/1453476#M214510</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear firends!!!&lt;/P&gt;&lt;P&gt;            I am working on a problem in which i am supposed to collect exact similar records and almost similar record in two seprate internal table... say for example i have 7 fields if they are match 7/7 they should move to one internal table where i have 6/7 matching fields then they should move to another internal table here i have the 7/7 matching fields in one internal tale but where i am trying to fetch another 6/7 it gives me all the matching entries where i am supposed to have only entries which are 6/7 matching... if 5/7 is there the i am not supposed to transfer the entries...  i am giving you my code... please help me in this regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Types: begin of L_ST_BP_P,&lt;/P&gt;&lt;P&gt;       partner like but000-partner, " BP ID&lt;/P&gt;&lt;P&gt;       title like but000-title, " Title&lt;/P&gt;&lt;P&gt;       initials like but000-initials, " Initials&lt;/P&gt;&lt;P&gt;       name_last type But000-NAME_LAST,"Surname&lt;/P&gt;&lt;P&gt;       idnumber like but0id-idnumber,"ID Number&lt;/P&gt;&lt;P&gt;       idtype type but0id-type," ID type&lt;/P&gt;&lt;P&gt;       rbcode like but0is-istype,&lt;/P&gt;&lt;P&gt;       f50code like but0is-istype,&lt;/P&gt;&lt;P&gt;       end of l_st_bp_p.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data: i_bp_p100 type standard table of l_st_bp_p with header line,"Internal table for 100% matching persons.&lt;/P&gt;&lt;P&gt;      i_bp_p90 type standard table of l_st_bp_p with header line, "Internal table for 90% matching persons.&lt;/P&gt;&lt;P&gt;      i_bp_p type standard table of l_st_bp_p with header line, " Internal table for similar records&lt;/P&gt;&lt;P&gt;      i_bp_p2 type standard table of l_st_bp_p with header line. "Internal table for similar records&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                         Data Classification                                  *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                     Data Classification for person.                          *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Similar record searching from the internal table and populating the           *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*i_bp_p internal table fro further 100% matching and 90 % matching operations   *&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort i_but000 by partner.&lt;/P&gt;&lt;P&gt;sort i_but0id by partner.&lt;/P&gt;&lt;P&gt;sort i_but0is by partner.&lt;/P&gt;&lt;P&gt;sort i_profile by partner.&lt;/P&gt;&lt;P&gt;Loop at i_but000 into wa_but000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         lv_tabix = sy-tabix.&lt;/P&gt;&lt;P&gt;         lv_tabix = lv_tabix + 1.&lt;/P&gt;&lt;P&gt;         read table i_but000 index lv_tabix into wa_but000.&lt;/P&gt;&lt;P&gt;         read table i_but0id into wa_but0id with key partner = wa_but000-partner.&lt;/P&gt;&lt;P&gt;         read table i_but0is into wa_but0is with key partner = wa_but000-partner.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        read table i_profile into wa_profile with key partner = wa_but000-partner.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;         if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;               move-corresponding wa_but000 to i_bp_p.&lt;/P&gt;&lt;P&gt;               move-corresponding wa_but0id to i_bp_p.&lt;/P&gt;&lt;P&gt;               move-corresponding wa_but0is to i_bp_p.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;              move-corresponding wa_profile to i_bp_p.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;               append i_bp_p.&lt;/P&gt;&lt;P&gt;            clear i_bp_p.&lt;/P&gt;&lt;P&gt;         endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Searching for 100% match  and 90% matching.                                                         *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;100 % matching records.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;sort i_bp_p by title initials name_last idnumber idtype f50code rbcode. "acc_num.&lt;/P&gt;&lt;P&gt;data: wa_i_bp_p_read1 like wa_i_bp_p.&lt;/P&gt;&lt;P&gt;loop at i_bp_p into wa_i_bp_p.&lt;/P&gt;&lt;P&gt;     lv_tabix = sy-tabix.&lt;/P&gt;&lt;P&gt;     lv_tabix = lv_tabix + 1.&lt;/P&gt;&lt;P&gt;     read table i_bp_p index lv_tabix into wa_i_bp_p_read1&lt;/P&gt;&lt;P&gt;                comparing idnumber&lt;/P&gt;&lt;P&gt;                          idtype&lt;/P&gt;&lt;P&gt;                          title&lt;/P&gt;&lt;P&gt;                          initials&lt;/P&gt;&lt;P&gt;                          name_last&lt;/P&gt;&lt;P&gt;                          f50code&lt;/P&gt;&lt;P&gt;                          rbcode&lt;/P&gt;&lt;P&gt;                          transporting partner&lt;/P&gt;&lt;P&gt;                                       idnumber&lt;/P&gt;&lt;P&gt;                                       idtype&lt;/P&gt;&lt;P&gt;                                       title&lt;/P&gt;&lt;P&gt;                                       initials&lt;/P&gt;&lt;P&gt;                                       name_last&lt;/P&gt;&lt;P&gt;                                       f50code&lt;/P&gt;&lt;P&gt;                                       rbcode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;       move-corresponding wa_i_bp_p to i_bp_p100.&lt;/P&gt;&lt;P&gt;       append i_bp_p100.&lt;/P&gt;&lt;P&gt;       clear i_bp_p100.&lt;/P&gt;&lt;P&gt;       move-corresponding wa_i_bp_p_read1 to i_bp_p100.&lt;/P&gt;&lt;P&gt;       append i_bp_p100.&lt;/P&gt;&lt;P&gt;       clear i_bp_p100.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;90% matching records.                                      .&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;          move-corresponding wa_i_bp_p to i_bp_p2.&lt;/P&gt;&lt;P&gt;          append i_bp_p2.&lt;/P&gt;&lt;P&gt;          clear i_bp_p2.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;        sort i_bp_p2 by idnumber idtype title initials name_last f50code rbcode.&lt;/P&gt;&lt;P&gt;        read table i_bp_p2 into wa_i_bp_p2 with key idnumber = wa_i_bp_p-idnumber&lt;/P&gt;&lt;P&gt;                                                    idtype = wa_i_bp_p-idtype&lt;/P&gt;&lt;P&gt;                                                    f50code = wa_i_bp_p-f50code&lt;/P&gt;&lt;P&gt;                                                    rbcode = wa_i_bp_p-rbcode&lt;/P&gt;&lt;P&gt;                                                    name_last = wa_i_bp_p-name_last&lt;/P&gt;&lt;P&gt;                                                    initials = wa_i_bp_p-initials&lt;/P&gt;&lt;P&gt;                                                    title = wa_i_bp_p-title.&lt;/P&gt;&lt;P&gt;         if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;            move-corresponding wa_i_bp_p2 to i_bp_p90.&lt;/P&gt;&lt;P&gt;            append i_bp_p90.&lt;/P&gt;&lt;P&gt;            clear i_bp_p90.&lt;/P&gt;&lt;P&gt;         endif.&lt;/P&gt;&lt;P&gt;         if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                sort i_bp_p2 by idnumber idtype title initials name_last f50code.&lt;/P&gt;&lt;P&gt;                read table i_bp_p2 into wa_i_bp_p2 with key idnumber = wa_i_bp_p-idnumber&lt;/P&gt;&lt;P&gt;                                                    idtype = wa_i_bp_p-idtype&lt;/P&gt;&lt;P&gt;                                                    f50code = wa_i_bp_p-f50code&lt;/P&gt;&lt;P&gt;                                                    title = wa_i_bp_p-title&lt;/P&gt;&lt;P&gt;                                                    name_last = wa_i_bp_p-name_last&lt;/P&gt;&lt;P&gt;                                                    initials = wa_i_bp_p-initials.&lt;/P&gt;&lt;P&gt;         if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;            move-corresponding wa_i_bp_p2 to i_bp_p90.&lt;/P&gt;&lt;P&gt;            append i_bp_p90.&lt;/P&gt;&lt;P&gt;            clear i_bp_p90.&lt;/P&gt;&lt;P&gt;         endif.&lt;/P&gt;&lt;P&gt;         elseif sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;                 sort i_bp_p2 by idnumber idtype title initials name_last.&lt;/P&gt;&lt;P&gt;                 read table i_bp_p2 into wa_i_bp_p2 with key idnumber = wa_i_bp_p-idnumber&lt;/P&gt;&lt;P&gt;                                                             idtype = wa_i_bp_p-idtype&lt;/P&gt;&lt;P&gt;                                                             name_last = wa_i_bp_p-name_last&lt;/P&gt;&lt;P&gt;                                                             initials = wa_i_bp_p-initials&lt;/P&gt;&lt;P&gt;                                                             title = wa_i_bp_p-title.&lt;/P&gt;&lt;P&gt;         if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;            move-corresponding wa_i_bp_p2 to i_bp_p90.&lt;/P&gt;&lt;P&gt;            append i_bp_p90.&lt;/P&gt;&lt;P&gt;            clear i_bp_p90.&lt;/P&gt;&lt;P&gt;         endif.&lt;/P&gt;&lt;P&gt;         elseif sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;                 sort i_bp_p2 by idnumber idtype title initials.&lt;/P&gt;&lt;P&gt;                 read table i_bp_p2 into wa_i_bp_p2 with key idnumber = wa_i_bp_p-idnumber&lt;/P&gt;&lt;P&gt;                                                             idtype = wa_i_bp_p-idtype&lt;/P&gt;&lt;P&gt;                                                             initials = wa_i_bp_p-initials&lt;/P&gt;&lt;P&gt;                                                             title = wa_i_bp_p-title.&lt;/P&gt;&lt;P&gt;         if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;            move-corresponding wa_i_bp_p2 to i_bp_p90.&lt;/P&gt;&lt;P&gt;            append i_bp_p90.&lt;/P&gt;&lt;P&gt;            clear i_bp_p90.&lt;/P&gt;&lt;P&gt;         endif.&lt;/P&gt;&lt;P&gt;         elseif sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;                sort i_bp_p2 by idnumber idtype title.&lt;/P&gt;&lt;P&gt;                read table i_bp_p2 into wa_i_bp_p2 with key idnumber = wa_i_bp_p-idnumber&lt;/P&gt;&lt;P&gt;                                                            idtype = wa_i_bp_p-idtype&lt;/P&gt;&lt;P&gt;                                                            title = wa_i_bp_p-title.&lt;/P&gt;&lt;P&gt;         if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;            move-corresponding wa_i_bp_p2 to i_bp_p90.&lt;/P&gt;&lt;P&gt;            append i_bp_p90.&lt;/P&gt;&lt;P&gt;            clear i_bp_p90.&lt;/P&gt;&lt;P&gt;         endif.&lt;/P&gt;&lt;P&gt;         elseif sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;                 sort i_bp_p2 by idnumber idtype.&lt;/P&gt;&lt;P&gt;                 read table i_bp_p2 into wa_i_bp_p2 with key idnumber = wa_i_bp_p-idnumber&lt;/P&gt;&lt;P&gt;                                                             idtype = wa_i_bp_p-idtype.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;            move-corresponding wa_i_bp_p2 to i_bp_p90.&lt;/P&gt;&lt;P&gt;            append i_bp_p90.&lt;/P&gt;&lt;P&gt;            clear i_bp_p90.&lt;/P&gt;&lt;P&gt;         endif.&lt;/P&gt;&lt;P&gt;         elseif sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;                sort i_bp_p2 by idnumber.&lt;/P&gt;&lt;P&gt;                read table i_bp_p2 into wa_i_bp_p2 with key idnumber = wa_i_bp_p-idnumber.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;            move-corresponding wa_i_bp_p2 to i_bp_p90.&lt;/P&gt;&lt;P&gt;            append i_bp_p90.&lt;/P&gt;&lt;P&gt;            clear i_bp_p90.&lt;/P&gt;&lt;P&gt;         endif.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;delete adjacent duplicates from i_bp_p100.&lt;/P&gt;&lt;P&gt;delete adjacent duplicates from i_bp_p90.&lt;/P&gt;&lt;P&gt;sort i_bp_p90 by partner&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here i have the 100% matching records but dont have the 90% matching record...&lt;/P&gt;&lt;P&gt;please help me...&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, 20 Jun 2006 20:57:06 GMT</pubDate>
    <dc:creator>naimkhans_babi</dc:creator>
    <dc:date>2006-06-20T20:57:06Z</dc:date>
    <item>
      <title>internal table searching...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-searching/m-p/1453476#M214510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear firends!!!&lt;/P&gt;&lt;P&gt;            I am working on a problem in which i am supposed to collect exact similar records and almost similar record in two seprate internal table... say for example i have 7 fields if they are match 7/7 they should move to one internal table where i have 6/7 matching fields then they should move to another internal table here i have the 7/7 matching fields in one internal tale but where i am trying to fetch another 6/7 it gives me all the matching entries where i am supposed to have only entries which are 6/7 matching... if 5/7 is there the i am not supposed to transfer the entries...  i am giving you my code... please help me in this regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Types: begin of L_ST_BP_P,&lt;/P&gt;&lt;P&gt;       partner like but000-partner, " BP ID&lt;/P&gt;&lt;P&gt;       title like but000-title, " Title&lt;/P&gt;&lt;P&gt;       initials like but000-initials, " Initials&lt;/P&gt;&lt;P&gt;       name_last type But000-NAME_LAST,"Surname&lt;/P&gt;&lt;P&gt;       idnumber like but0id-idnumber,"ID Number&lt;/P&gt;&lt;P&gt;       idtype type but0id-type," ID type&lt;/P&gt;&lt;P&gt;       rbcode like but0is-istype,&lt;/P&gt;&lt;P&gt;       f50code like but0is-istype,&lt;/P&gt;&lt;P&gt;       end of l_st_bp_p.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data: i_bp_p100 type standard table of l_st_bp_p with header line,"Internal table for 100% matching persons.&lt;/P&gt;&lt;P&gt;      i_bp_p90 type standard table of l_st_bp_p with header line, "Internal table for 90% matching persons.&lt;/P&gt;&lt;P&gt;      i_bp_p type standard table of l_st_bp_p with header line, " Internal table for similar records&lt;/P&gt;&lt;P&gt;      i_bp_p2 type standard table of l_st_bp_p with header line. "Internal table for similar records&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                         Data Classification                                  *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                     Data Classification for person.                          *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Similar record searching from the internal table and populating the           *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*i_bp_p internal table fro further 100% matching and 90 % matching operations   *&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort i_but000 by partner.&lt;/P&gt;&lt;P&gt;sort i_but0id by partner.&lt;/P&gt;&lt;P&gt;sort i_but0is by partner.&lt;/P&gt;&lt;P&gt;sort i_profile by partner.&lt;/P&gt;&lt;P&gt;Loop at i_but000 into wa_but000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         lv_tabix = sy-tabix.&lt;/P&gt;&lt;P&gt;         lv_tabix = lv_tabix + 1.&lt;/P&gt;&lt;P&gt;         read table i_but000 index lv_tabix into wa_but000.&lt;/P&gt;&lt;P&gt;         read table i_but0id into wa_but0id with key partner = wa_but000-partner.&lt;/P&gt;&lt;P&gt;         read table i_but0is into wa_but0is with key partner = wa_but000-partner.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        read table i_profile into wa_profile with key partner = wa_but000-partner.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;         if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;               move-corresponding wa_but000 to i_bp_p.&lt;/P&gt;&lt;P&gt;               move-corresponding wa_but0id to i_bp_p.&lt;/P&gt;&lt;P&gt;               move-corresponding wa_but0is to i_bp_p.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;              move-corresponding wa_profile to i_bp_p.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;               append i_bp_p.&lt;/P&gt;&lt;P&gt;            clear i_bp_p.&lt;/P&gt;&lt;P&gt;         endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Searching for 100% match  and 90% matching.                                                         *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;100 % matching records.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;sort i_bp_p by title initials name_last idnumber idtype f50code rbcode. "acc_num.&lt;/P&gt;&lt;P&gt;data: wa_i_bp_p_read1 like wa_i_bp_p.&lt;/P&gt;&lt;P&gt;loop at i_bp_p into wa_i_bp_p.&lt;/P&gt;&lt;P&gt;     lv_tabix = sy-tabix.&lt;/P&gt;&lt;P&gt;     lv_tabix = lv_tabix + 1.&lt;/P&gt;&lt;P&gt;     read table i_bp_p index lv_tabix into wa_i_bp_p_read1&lt;/P&gt;&lt;P&gt;                comparing idnumber&lt;/P&gt;&lt;P&gt;                          idtype&lt;/P&gt;&lt;P&gt;                          title&lt;/P&gt;&lt;P&gt;                          initials&lt;/P&gt;&lt;P&gt;                          name_last&lt;/P&gt;&lt;P&gt;                          f50code&lt;/P&gt;&lt;P&gt;                          rbcode&lt;/P&gt;&lt;P&gt;                          transporting partner&lt;/P&gt;&lt;P&gt;                                       idnumber&lt;/P&gt;&lt;P&gt;                                       idtype&lt;/P&gt;&lt;P&gt;                                       title&lt;/P&gt;&lt;P&gt;                                       initials&lt;/P&gt;&lt;P&gt;                                       name_last&lt;/P&gt;&lt;P&gt;                                       f50code&lt;/P&gt;&lt;P&gt;                                       rbcode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;       move-corresponding wa_i_bp_p to i_bp_p100.&lt;/P&gt;&lt;P&gt;       append i_bp_p100.&lt;/P&gt;&lt;P&gt;       clear i_bp_p100.&lt;/P&gt;&lt;P&gt;       move-corresponding wa_i_bp_p_read1 to i_bp_p100.&lt;/P&gt;&lt;P&gt;       append i_bp_p100.&lt;/P&gt;&lt;P&gt;       clear i_bp_p100.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;90% matching records.                                      .&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;          move-corresponding wa_i_bp_p to i_bp_p2.&lt;/P&gt;&lt;P&gt;          append i_bp_p2.&lt;/P&gt;&lt;P&gt;          clear i_bp_p2.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;        sort i_bp_p2 by idnumber idtype title initials name_last f50code rbcode.&lt;/P&gt;&lt;P&gt;        read table i_bp_p2 into wa_i_bp_p2 with key idnumber = wa_i_bp_p-idnumber&lt;/P&gt;&lt;P&gt;                                                    idtype = wa_i_bp_p-idtype&lt;/P&gt;&lt;P&gt;                                                    f50code = wa_i_bp_p-f50code&lt;/P&gt;&lt;P&gt;                                                    rbcode = wa_i_bp_p-rbcode&lt;/P&gt;&lt;P&gt;                                                    name_last = wa_i_bp_p-name_last&lt;/P&gt;&lt;P&gt;                                                    initials = wa_i_bp_p-initials&lt;/P&gt;&lt;P&gt;                                                    title = wa_i_bp_p-title.&lt;/P&gt;&lt;P&gt;         if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;            move-corresponding wa_i_bp_p2 to i_bp_p90.&lt;/P&gt;&lt;P&gt;            append i_bp_p90.&lt;/P&gt;&lt;P&gt;            clear i_bp_p90.&lt;/P&gt;&lt;P&gt;         endif.&lt;/P&gt;&lt;P&gt;         if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                sort i_bp_p2 by idnumber idtype title initials name_last f50code.&lt;/P&gt;&lt;P&gt;                read table i_bp_p2 into wa_i_bp_p2 with key idnumber = wa_i_bp_p-idnumber&lt;/P&gt;&lt;P&gt;                                                    idtype = wa_i_bp_p-idtype&lt;/P&gt;&lt;P&gt;                                                    f50code = wa_i_bp_p-f50code&lt;/P&gt;&lt;P&gt;                                                    title = wa_i_bp_p-title&lt;/P&gt;&lt;P&gt;                                                    name_last = wa_i_bp_p-name_last&lt;/P&gt;&lt;P&gt;                                                    initials = wa_i_bp_p-initials.&lt;/P&gt;&lt;P&gt;         if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;            move-corresponding wa_i_bp_p2 to i_bp_p90.&lt;/P&gt;&lt;P&gt;            append i_bp_p90.&lt;/P&gt;&lt;P&gt;            clear i_bp_p90.&lt;/P&gt;&lt;P&gt;         endif.&lt;/P&gt;&lt;P&gt;         elseif sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;                 sort i_bp_p2 by idnumber idtype title initials name_last.&lt;/P&gt;&lt;P&gt;                 read table i_bp_p2 into wa_i_bp_p2 with key idnumber = wa_i_bp_p-idnumber&lt;/P&gt;&lt;P&gt;                                                             idtype = wa_i_bp_p-idtype&lt;/P&gt;&lt;P&gt;                                                             name_last = wa_i_bp_p-name_last&lt;/P&gt;&lt;P&gt;                                                             initials = wa_i_bp_p-initials&lt;/P&gt;&lt;P&gt;                                                             title = wa_i_bp_p-title.&lt;/P&gt;&lt;P&gt;         if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;            move-corresponding wa_i_bp_p2 to i_bp_p90.&lt;/P&gt;&lt;P&gt;            append i_bp_p90.&lt;/P&gt;&lt;P&gt;            clear i_bp_p90.&lt;/P&gt;&lt;P&gt;         endif.&lt;/P&gt;&lt;P&gt;         elseif sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;                 sort i_bp_p2 by idnumber idtype title initials.&lt;/P&gt;&lt;P&gt;                 read table i_bp_p2 into wa_i_bp_p2 with key idnumber = wa_i_bp_p-idnumber&lt;/P&gt;&lt;P&gt;                                                             idtype = wa_i_bp_p-idtype&lt;/P&gt;&lt;P&gt;                                                             initials = wa_i_bp_p-initials&lt;/P&gt;&lt;P&gt;                                                             title = wa_i_bp_p-title.&lt;/P&gt;&lt;P&gt;         if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;            move-corresponding wa_i_bp_p2 to i_bp_p90.&lt;/P&gt;&lt;P&gt;            append i_bp_p90.&lt;/P&gt;&lt;P&gt;            clear i_bp_p90.&lt;/P&gt;&lt;P&gt;         endif.&lt;/P&gt;&lt;P&gt;         elseif sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;                sort i_bp_p2 by idnumber idtype title.&lt;/P&gt;&lt;P&gt;                read table i_bp_p2 into wa_i_bp_p2 with key idnumber = wa_i_bp_p-idnumber&lt;/P&gt;&lt;P&gt;                                                            idtype = wa_i_bp_p-idtype&lt;/P&gt;&lt;P&gt;                                                            title = wa_i_bp_p-title.&lt;/P&gt;&lt;P&gt;         if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;            move-corresponding wa_i_bp_p2 to i_bp_p90.&lt;/P&gt;&lt;P&gt;            append i_bp_p90.&lt;/P&gt;&lt;P&gt;            clear i_bp_p90.&lt;/P&gt;&lt;P&gt;         endif.&lt;/P&gt;&lt;P&gt;         elseif sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;                 sort i_bp_p2 by idnumber idtype.&lt;/P&gt;&lt;P&gt;                 read table i_bp_p2 into wa_i_bp_p2 with key idnumber = wa_i_bp_p-idnumber&lt;/P&gt;&lt;P&gt;                                                             idtype = wa_i_bp_p-idtype.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;            move-corresponding wa_i_bp_p2 to i_bp_p90.&lt;/P&gt;&lt;P&gt;            append i_bp_p90.&lt;/P&gt;&lt;P&gt;            clear i_bp_p90.&lt;/P&gt;&lt;P&gt;         endif.&lt;/P&gt;&lt;P&gt;         elseif sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;                sort i_bp_p2 by idnumber.&lt;/P&gt;&lt;P&gt;                read table i_bp_p2 into wa_i_bp_p2 with key idnumber = wa_i_bp_p-idnumber.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;            move-corresponding wa_i_bp_p2 to i_bp_p90.&lt;/P&gt;&lt;P&gt;            append i_bp_p90.&lt;/P&gt;&lt;P&gt;            clear i_bp_p90.&lt;/P&gt;&lt;P&gt;         endif.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;delete adjacent duplicates from i_bp_p100.&lt;/P&gt;&lt;P&gt;delete adjacent duplicates from i_bp_p90.&lt;/P&gt;&lt;P&gt;sort i_bp_p90 by partner&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here i have the 100% matching records but dont have the 90% matching record...&lt;/P&gt;&lt;P&gt;please help me...&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, 20 Jun 2006 20:57:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-searching/m-p/1453476#M214510</guid>
      <dc:creator>naimkhans_babi</dc:creator>
      <dc:date>2006-06-20T20:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: internal table searching...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-searching/m-p/1453477#M214511</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;Indeed a tricky task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One option (but sounds very slow): Do the same you did for 7 matches again - but this time only comparing the first 6 fields. Then sort again, compare leave the next field out of the comparison and so on (you need to select your 'current' entry again after the sorting).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Different way.&lt;/P&gt;&lt;P&gt;Make two tables with same content (and sorting). First will be 'source', in the second you will search for matches.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at source.
  l_tabix_src = sy-tabix + 1
  loop at second from l_tabix_src.
    clear l_cnt.
    if source-name = second-name.
      add 1 to l_cnt.
    endif.
" check for the other fields ...

    if l_cnt = 7.
      append source to match_100.  "?
      append second to match_100.
      continue.
    endif.
    if l_cnt = 6.
      append source to match_90.  "?
      append second to match_90.
    endif.
  endloop.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I don't know, how you will present the results - maybe you have to adjust the 'match'-table filling a little bit.&lt;/P&gt;&lt;P&gt;But at least you compare everything somehow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With ... from l_tabix_src you will compare the first entry with every other entry. The second (source) entry only starting from line 3 - because 1 - 2 was already checked, no need to check 2 - 1 again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should be easy to implement and reasonable fast.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jun 2006 15:11:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-searching/m-p/1453477#M214511</guid>
      <dc:creator>christian_wohlfahrt</dc:creator>
      <dc:date>2006-06-26T15:11:54Z</dc:date>
    </item>
    <item>
      <title>Re: internal table searching...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-searching/m-p/1453478#M214512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the following solution&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count  = 0.&lt;/P&gt;&lt;P&gt;loop at itab1 into wa1.&lt;/P&gt;&lt;P&gt;  read table itab2 into wa2&lt;/P&gt;&lt;P&gt;    with key f1 = itab1-f1.&lt;/P&gt;&lt;P&gt;   if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    count = count + 1.&lt;/P&gt;&lt;P&gt;   endif.&lt;/P&gt;&lt;P&gt;  read table itab2 into wa2&lt;/P&gt;&lt;P&gt;    with key f2 = itab1-f2. &lt;/P&gt;&lt;P&gt;   if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    count = count + 1.&lt;/P&gt;&lt;P&gt;   endif.  &lt;/P&gt;&lt;P&gt;  --&lt;/P&gt;&lt;P&gt;  --&lt;/P&gt;&lt;P&gt;  read table itab2 into wa2&lt;/P&gt;&lt;P&gt;    with key f7 = itab1-f7. &lt;/P&gt;&lt;P&gt;   if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    count = count + 1.&lt;/P&gt;&lt;P&gt;   endif.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;depending upon count insert the record into itab7by7 or itab6by7 etc&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;case count.&lt;/P&gt;&lt;P&gt;when 7.&lt;/P&gt;&lt;P&gt;   append wa1 to itab7by7.&lt;/P&gt;&lt;P&gt;when 6.&lt;/P&gt;&lt;P&gt;  ...&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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&gt;hope it helps.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;kinshuk&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jun 2006 15:24:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-searching/m-p/1453478#M214512</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-26T15:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: internal table searching...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-searching/m-p/1453479#M214513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kinshuk!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry, but won't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a) you would find the IDENTICAL entry all the time... but you could avoid this somehow&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;b) you compare with ANY entry - instead of counting, if ONE other entry matches 7 criteria, you would count if (maybe) SEVEN other entries match ONE criteria. Somehow the other way around...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still thanks for your thoughts and checking!&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jun 2006 15:38:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-searching/m-p/1453479#M214513</guid>
      <dc:creator>christian_wohlfahrt</dc:creator>
      <dc:date>2006-06-26T15:38:31Z</dc:date>
    </item>
  </channel>
</rss>

