<?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 duplicate records in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/duplicate-records/m-p/1495142#M229928</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i need to transfer the records from three internal tables (header, item and adress data) into logical file.&lt;/P&gt;&lt;P&gt;here i need to send the email to the user whenever duplicate records exist in any one of the internal tables and suppose if there r duplicate records in all the internal tables then how should i approach.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;siri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Sep 2006 18:24:33 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-05T18:24:33Z</dc:date>
    <item>
      <title>duplicate records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/duplicate-records/m-p/1495142#M229928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i need to transfer the records from three internal tables (header, item and adress data) into logical file.&lt;/P&gt;&lt;P&gt;here i need to send the email to the user whenever duplicate records exist in any one of the internal tables and suppose if there r duplicate records in all the internal tables then how should i approach.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;siri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Sep 2006 18:24:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/duplicate-records/m-p/1495142#M229928</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-05T18:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: duplicate records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/duplicate-records/m-p/1495143#M229929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai Sireesha,&lt;/P&gt;&lt;P&gt;For Deletion of Duplicate Records from Internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE ADJACENT DUPLICATES FROM itab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Additions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. ... COMPARING f1 f2 ... &lt;/P&gt;&lt;P&gt;2. ... COMPARING ALL FIELDS &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Deletes neighboring, duplicate entries from the internal table itab . If there are n duplicate entries, the first entry is retained and the other n - 1 entries are deleted. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Two lines are considered to be duplicated if their default keys match. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The return code value is set as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-SUBRC = 0 At least one duplicate exists, at least one entry deleted. &lt;/P&gt;&lt;P&gt;SY_SUBRC = 4 No duplicates exist, no entry deleted. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 1&lt;/P&gt;&lt;P&gt;... COMPARING f1 f2 ... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Two lines of the internal table itab are considered to be duplicates if the specified fields f1 , f2 , .... match. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 2&lt;/P&gt;&lt;P&gt;... COMPARING ALL FIELDS &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Two lines are considered to be duplicates if all fields of the table entries match. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes&lt;/P&gt;&lt;P&gt;The DELETE ADJACENT DUPLICATES statement is especially useful if the internal table itab is sorted by fields (whether in ascending or descending order) which were compared during duplicate determination. In this case, the deletion of neighbouring duplicates is the same as the deletion of all duplicates. &lt;/P&gt;&lt;P&gt;If a comparison criterion is only known at runtime, it can be specified dynamically as the content of a field name by using COMPARING ... (name) ... . If name is blank at runtime, the comparison criterion is ignored. If name contains an invalid component name, a runtime error occurs. &lt;/P&gt;&lt;P&gt;Comparison criteria - statistically or dynamically specified - can be further restriced by specifying the offset and/or length. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note&lt;/P&gt;&lt;P&gt;Performance &lt;/P&gt;&lt;P&gt;Deleting a line from an internal table incurs index maintenance costs which depend on the index of the line to be deleted. The runtime depends on the line width of the table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, deleting a line in the middle of an internal table with 200 entries requires about 10 msn (standardized microseconds). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Deleting a range of entries with " DELETE itab FROM idx1 TO idx2. " deleting a set of entries with " DELETE itab WHERE ... " only incur index maintenance costs once. Compared with a LOOP , which deletes line-by-line, this is much faster. &lt;/P&gt;&lt;P&gt;To delete neighboring, duplicate entries from an internal table, use the variant " DELETE ADJACENT DUPLICATES FROM itab. " instead of LOOP constructions. &lt;/P&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;&lt;P&gt;For Email&lt;/P&gt;&lt;P&gt;DATA: OBJPACK LIKE SOPCKLSTI1 OCCURS 2 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA: OBJHEAD LIKE SOLISTI1 OCCURS 1 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA: OBJBIN LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA: OBJTXT LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA: RECLIST LIKE SOMLRECI1 OCCURS 5 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA: DOC_CHNG LIKE SODOCCHGI1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DOC_CHNG-OBJ_NAME = 'TEST'.&lt;/P&gt;&lt;P&gt;DOC_CHNG-OBJ_DESCR = 'Test-Dokument fur API1 Test'(001).&lt;/P&gt;&lt;P&gt;OBJTXT = 'Mindestgebot : $250000'.&lt;/P&gt;&lt;P&gt;APPEND OBJTXT.&lt;/P&gt;&lt;P&gt;OBJTXT = 'Eine Abbildung des zur Versteigerung stehenden Bildes'.&lt;/P&gt;&lt;P&gt;APPEND OBJTXT.&lt;/P&gt;&lt;P&gt;OBJTXT = 'wurde als Anlage beigefugt.'.&lt;/P&gt;&lt;P&gt;APPEND OBJTXT.&lt;/P&gt;&lt;P&gt;DESCRIBE TABLE OBJTXT LINES TAB_LINES.&lt;/P&gt;&lt;P&gt;READ TABLE OBJTXT INDEX TAB_LINES.&lt;/P&gt;&lt;P&gt;DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;* ERSTELLEN DES EINTRAGS ZUM KOMPRIMIERTEN DOKUMENT&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CLEAR OBJPACK-TRANSF_BIN.&lt;/P&gt;&lt;P&gt;OBJPACK-HEAD_START = 1.&lt;/P&gt;&lt;P&gt;OBJPACK-HEAD_NUM = 0.&lt;/P&gt;&lt;P&gt;OBJPACK-BODY_START = 1.&lt;/P&gt;&lt;P&gt;OBJPACK-BODY_NUM = TAB_LINES.&lt;/P&gt;&lt;P&gt;OBJPACK-DOC_TYPE = 'RAW'.&lt;/P&gt;&lt;P&gt;APPEND OBJPACK.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;* ERSTELLEN DER ANLAGE FUR DAS DOKUMENT&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;OBJBIN = '\O/ '. APPEND OBJBIN.&lt;/P&gt;&lt;P&gt;OBJBIN = ' '. APPEND OBJBIN.&lt;/P&gt;&lt;P&gt;OBJBIN = ' / \ '. APPEND OBJBIN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DESCRIBE TABLE OBJBIN LINES TAB_LINES.&lt;/P&gt;&lt;P&gt;OBJHEAD = 'picasso.txt'. APPEND OBJHEAD.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;* Erstellen des Eintrags zur komprimierten Anlage&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;OBJPACK-TRANSF_BIN = 'X'.&lt;/P&gt;&lt;P&gt;OBJPACK-HEAD_START = 1.&lt;/P&gt;&lt;P&gt;OBJPACK-HEAD_NUM = 1.&lt;/P&gt;&lt;P&gt;OBJPACK-BODY_START = 1.&lt;/P&gt;&lt;P&gt;OBJPACK-BODY_NUM = TAB_LINES.&lt;/P&gt;&lt;P&gt;OBJPACK-DOC_TYPE = 'TXT'.&lt;/P&gt;&lt;P&gt;OBJPACK-OBJ_NAME = 'ANLAGE'.&lt;/P&gt;&lt;P&gt;OBJPACK-OBJ_DESCR = 'Abbildung Objekt 138'.&lt;/P&gt;&lt;P&gt;OBJPACK-DOC_SIZE = TAB_LINES * 255.&lt;/P&gt;&lt;P&gt;APPEND OBJPACK.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;* Fullen der Empfangerliste&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;RECLIST-RECEIVER = SY-UNAME.&lt;/P&gt;&lt;P&gt;RECLIST-REC_TYPE = 'B'.&lt;/P&gt;&lt;P&gt;APPEND RECLIST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;DOCUMENT_DATA = DOC_CHNG&lt;/P&gt;&lt;P&gt;PUT_IN_OUTBOX = 'X'&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;PACKING_LIST = OBJPACK&lt;/P&gt;&lt;P&gt;OBJECT_HEADER = OBJHEAD&lt;/P&gt;&lt;P&gt;CONTENTS_BIN = OBJBIN&lt;/P&gt;&lt;P&gt;CONTENTS_TXT = OBJTXT&lt;/P&gt;&lt;P&gt;RECEIVERS = RECLIST&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;TOO_MANY_RECEIVERS = 1&lt;/P&gt;&lt;P&gt;DOCUMENT_NOT_SENT = 2&lt;/P&gt;&lt;P&gt;OPERATION_NO_AUTHORIZATION = 4&lt;/P&gt;&lt;P&gt;OTHERS = 99.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sreeni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Sep 2006 18:28:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/duplicate-records/m-p/1495143#M229929</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-05T18:28:37Z</dc:date>
    </item>
    <item>
      <title>Re: duplicate records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/duplicate-records/m-p/1495144#M229930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Suppose you have an internal table t_header and work area s_header defined like your table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear l_dup_fnd.&lt;/P&gt;&lt;P&gt;sort t_header.&lt;/P&gt;&lt;P&gt;loop at t_header.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if t_header = s_header.&lt;/P&gt;&lt;P&gt;    l_dup_fnd = 'X'.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  move t_header to s_header.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Sep 2006 18:32:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/duplicate-records/m-p/1495144#M229930</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-05T18:32:31Z</dc:date>
    </item>
  </channel>
</rss>

