<?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 How to Compare Data Files in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-compare-data-files/m-p/1328405#M167896</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; I've two files[txt] having data's [flat file]. I've to compare these 2 files files 'n' check both the files data's are same or not.&lt;/P&gt;&lt;P&gt;Kindly let me know how to compare, is there any standard function is available.....&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tina&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 May 2006 07:06:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-05-04T07:06:25Z</dc:date>
    <item>
      <title>How to Compare Data Files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-compare-data-files/m-p/1328405#M167896</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; I've two files[txt] having data's [flat file]. I've to compare these 2 files files 'n' check both the files data's are same or not.&lt;/P&gt;&lt;P&gt;Kindly let me know how to compare, is there any standard function is available.....&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tina&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 May 2006 07:06:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-compare-data-files/m-p/1328405#M167896</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-04T07:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to Compare Data Files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-compare-data-files/m-p/1328406#M167897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi tina,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. first upload both files data&lt;/P&gt;&lt;P&gt;  in two internal tables (say itab, ptab)&lt;/P&gt;&lt;P&gt;  of same type.&lt;/P&gt;&lt;P&gt;eg: data :&lt;/P&gt;&lt;P&gt;  begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;   f(500) type c,&lt;/P&gt;&lt;P&gt;end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. then just compare like this.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;  if itab[]  = ptab[]&amp;lt;/b&amp;gt;&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;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 May 2006 07:11:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-compare-data-files/m-p/1328406#M167897</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-04T07:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to Compare Data Files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-compare-data-files/m-p/1328407#M167898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tina,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Upload data from both the files into internal tables and then use function module COMPARE_TABLES.&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;Thanks&lt;/P&gt;&lt;P&gt;Lakshman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 May 2006 07:16:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-compare-data-files/m-p/1328407#M167898</guid>
      <dc:creator>Lakshmant1</dc:creator>
      <dc:date>2006-05-04T07:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to Compare Data Files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-compare-data-files/m-p/1328408#M167899</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;PRE&gt;&lt;CODE&gt;REPORT  ZTEST  message-id zz  .

data: itab1 type table of vbak,
      itab2 type table of vbak.
data: p_file1 type string,
      p_file2 type string.

      p_file1 = 'C:test.txt'.
      p_file2 = 'C:test1.txt'.
CALL FUNCTION 'GUI_UPLOAD'
  EXPORTING
    FILENAME                      = P_file1
   FILETYPE                      = 'ASC'
   HAS_FIELD_SEPARATOR           = 'X'
  TABLES
    DATA_TAB                      = itab1
 EXCEPTIONS
   FILE_OPEN_ERROR               = 1
   FILE_READ_ERROR               = 2
   NO_BATCH                      = 3
   GUI_REFUSE_FILETRANSFER       = 4
   INVALID_TYPE                  = 5
   NO_AUTHORITY                  = 6
   UNKNOWN_ERROR                 = 7
   BAD_DATA_FORMAT               = 8
   HEADER_NOT_ALLOWED            = 9
   SEPARATOR_NOT_ALLOWED         = 10
   HEADER_TOO_LONG               = 11
   UNKNOWN_DP_ERROR              = 12
   ACCESS_DENIED                 = 13
   DP_OUT_OF_MEMORY              = 14
   DISK_FULL                     = 15
   DP_TIMEOUT                    = 16
   OTHERS                        = 17
          .
IF SY-SUBRC &amp;lt;&amp;gt; 0.
 MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.


CALL FUNCTION 'GUI_UPLOAD'
  EXPORTING
    FILENAME                      = P_file2
   FILETYPE                      = 'ASC'
   HAS_FIELD_SEPARATOR           = 'X'
  TABLES
    DATA_TAB                      = itab2
 EXCEPTIONS
   FILE_OPEN_ERROR               = 1
   FILE_READ_ERROR               = 2
   NO_BATCH                      = 3
   GUI_REFUSE_FILETRANSFER       = 4
   INVALID_TYPE                  = 5
   NO_AUTHORITY                  = 6
   UNKNOWN_ERROR                 = 7
   BAD_DATA_FORMAT               = 8
   HEADER_NOT_ALLOWED            = 9
   SEPARATOR_NOT_ALLOWED         = 10
   HEADER_TOO_LONG               = 11
   UNKNOWN_DP_ERROR              = 12
   ACCESS_DENIED                 = 13
   DP_OUT_OF_MEMORY              = 14
   DISK_FULL                     = 15
   DP_TIMEOUT                    = 16
   OTHERS                        = 17
          .
IF SY-SUBRC &amp;lt;&amp;gt; 0.
 MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

if itab1[] &amp;lt;&amp;gt; itab2[].
message i000 with 'They are not same'.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 May 2006 07:16:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-compare-data-files/m-p/1328408#M167899</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-04T07:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to Compare Data Files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-compare-data-files/m-p/1328409#M167900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="53467"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 May 2006 07:18:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-compare-data-files/m-p/1328409#M167900</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-04T07:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to Compare Data Files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-compare-data-files/m-p/1328410#M167901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI&lt;/P&gt;&lt;P&gt;GOOD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF YOU WANT TO CHECK THE DATA BETWEEN TWO FILES THAN YOU HAVE COMPARE BETWEEN TWO FILES WHICH WILL RETRUN WHEATHER BOTH THE FILES ARE SAME OR DIFFERENT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THANKS&lt;/P&gt;&lt;P&gt;MRUTYUN&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 May 2006 07:20:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-compare-data-files/m-p/1328410#M167901</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-04T07:20:01Z</dc:date>
    </item>
  </channel>
</rss>

