<?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 Re: Comparing workareas excluding some specific fields in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-workareas-excluding-some-specific-fields/m-p/7852443#M1592122</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Pawan, &lt;/P&gt;&lt;P&gt;Actually I "workarounded" in this way: since I'm dealing with workareas variables that can be modified, I simply clear the two fields I don't want to be relevant in comparison. This is a simple operation and meets my desiderata; I was anyway looking for an alternative abap construct to build a sort of "exclusion list" of field involved in a compare operation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 May 2011 09:58:07 GMT</pubDate>
    <dc:creator>matteo_montalto</dc:creator>
    <dc:date>2011-05-06T09:58:07Z</dc:date>
    <item>
      <title>Comparing workareas excluding some specific fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-workareas-excluding-some-specific-fields/m-p/7852441#M1592120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all gurus,&lt;/P&gt;&lt;P&gt;a silly question, I know, anyway: in my requirement I have to compare different workareas in a loop cycle with a model workarea. The aim is to identify if a workarea in a loop differs from the model workarea except for some specific fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In example; the workarea A has 100 fields, and I assume that this workarea is equal to the model one (B)  if all the fields in A contain the same value that corrisponding field have in B except for fields 'guid' and 'p_guid', which can contain different values.&lt;/P&gt;&lt;P&gt;So, A is EQ to B if the other 98 fields are filled with the same values.&lt;/P&gt;&lt;P&gt;Actually I can build a sequence of comparing condition:&lt;/P&gt;&lt;P&gt;IF A-field1 EQ B-field1 AND A-field2 EQ B-field2 ...&lt;/P&gt;&lt;P&gt;that's quite time-wasting and I wonder if there's a better solution to compare in the above described way.... a sort of exclusion for the compare operation maybe?&lt;/P&gt;&lt;P&gt;Sorry, I get that this is probably a very basic question, anyway I searched a bit without results.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2011 09:21:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-workareas-excluding-some-specific-fields/m-p/7852441#M1592120</guid>
      <dc:creator>matteo_montalto</dc:creator>
      <dc:date>2011-05-06T09:21:40Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing workareas excluding some specific fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-workareas-excluding-some-specific-fields/m-p/7852442#M1592121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you could change the definition of data type then this comparision can be done in single statement.&lt;/P&gt;&lt;P&gt;See example below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPES : BEGIN OF ty_d ,
          col01 TYPE char01 ,
          col02 TYPE char01 ,
          col98 TYPE char01 ,
        END OF ty_d .

TYPES : BEGIN OF ty_dd .
INCLUDE TYPE ty_d AS d .    "this will enable to refer all COL01.. COL98 by name 'd'
TYPES : guiid TYPE char05 ,
END OF ty_dd .


DATA : ls_dd1 TYPE ty_dd ,
       ls_dd2 TYPE ty_dd .

ls_dd1-col01 = 'A' .
ls_dd1-col02 = 'B' .
ls_dd1-col98 = 'C' .

ls_dd2-col01 = 'A' .
ls_dd2-col02 = 'B' .
ls_dd2-col98 = 'C' .

IF ls_dd1-d = ls_dd2-d .
  WRITE 'EQUAL' .
ELSE.
  WRITE 'NOT EQUAL'.
ENDIF.

ls_dd2-col01 = 'D' .

IF ls_dd1-d = ls_dd2-d .
  WRITE / 'EQUAL' .
ELSE.
  WRITE / 'NOT EQUAL'.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2011 09:40:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-workareas-excluding-some-specific-fields/m-p/7852442#M1592121</guid>
      <dc:creator>Pawan_Kesari</dc:creator>
      <dc:date>2011-05-06T09:40:20Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing workareas excluding some specific fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-workareas-excluding-some-specific-fields/m-p/7852443#M1592122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Pawan, &lt;/P&gt;&lt;P&gt;Actually I "workarounded" in this way: since I'm dealing with workareas variables that can be modified, I simply clear the two fields I don't want to be relevant in comparison. This is a simple operation and meets my desiderata; I was anyway looking for an alternative abap construct to build a sort of "exclusion list" of field involved in a compare operation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2011 09:58:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-workareas-excluding-some-specific-fields/m-p/7852443#M1592122</guid>
      <dc:creator>matteo_montalto</dc:creator>
      <dc:date>2011-05-06T09:58:07Z</dc:date>
    </item>
  </channel>
</rss>

