<?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: How to compare two similar complex structures generically? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-compare-two-similar-complex-structures-generically/m-p/1237748#M141276</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can discover the fields belonging to a structure by using a variant of describe:&lt;/P&gt;&lt;P&gt;eg, &lt;/P&gt;&lt;P&gt;data       td       TYPE sydes_desc.&lt;/P&gt;&lt;P&gt;*.. get attributes of component field&lt;/P&gt;&lt;P&gt;        DESCRIBE FIELD &amp;lt;field&amp;gt; INTO td.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The structure is quite complex but have a play around in debug and it may become clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you'd need to loop at the components of the structures and make comparisons.&lt;/P&gt;&lt;P&gt;something like:&lt;/P&gt;&lt;P&gt;      DO.&lt;/P&gt;&lt;P&gt;*... work through all structure's components...&lt;/P&gt;&lt;P&gt;        ASSIGN COMPONENT sy-index  OF STRUCTURE &amp;lt;in_content&amp;gt; TO &amp;lt;field&amp;gt;.&lt;/P&gt;&lt;P&gt;        IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;*... exit when reaching the end of components&lt;/P&gt;&lt;P&gt;          EXIT.&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;enddo.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Mar 2006 07:49:21 GMT</pubDate>
    <dc:creator>former_member186741</dc:creator>
    <dc:date>2006-03-21T07:49:21Z</dc:date>
    <item>
      <title>How to compare two similar complex structures generically?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-compare-two-similar-complex-structures-generically/m-p/1237745#M141273</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;&lt;/P&gt;&lt;P&gt;I have a problem.  I want to write a function module (or method) which imports two similar complex structures.  Inside the module, I want to compare every field of every sub-structure and fill some table.  How can I do this generically(meaning I do not know the type of the complex structure imported into the module)?&lt;/P&gt;&lt;P&gt;e.g.  the module imports bus_ei_extern1 and bus_ei_extern2 structures.  These structures have sub-structures like central_data, address etc.  These sub-structures have fields inside that i want to compare.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Mar 2006 06:28:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-compare-two-similar-complex-structures-generically/m-p/1237745#M141273</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-21T06:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare two similar complex structures generically?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-compare-two-similar-complex-structures-generically/m-p/1237746#M141274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;have a look at abap RADVVTB2 which is used by the dictionary 'compare versions' utility.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Mar 2006 06:48:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-compare-two-similar-complex-structures-generically/m-p/1237746#M141274</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2006-03-21T06:48:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare two similar complex structures generically?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-compare-two-similar-complex-structures-generically/m-p/1237747#M141275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Neil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not want to compare the structures themselves (because they will be same for sure), but the values of the fields in the sub-structures.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg. consider two complex structures st1 and st2&lt;/P&gt;&lt;P&gt;they both have sub-structure 'central' which has fields name1, name2 and name3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;st1                              &lt;/P&gt;&lt;P&gt; central                          &lt;/P&gt;&lt;P&gt;   name1 = 'abc'                    &lt;/P&gt;&lt;P&gt;   name2 = 'xyz'                    &lt;/P&gt;&lt;P&gt;   name3 = 'pqr'                    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;st2&lt;/P&gt;&lt;P&gt; central&lt;/P&gt;&lt;P&gt;   name1 = 'abc'&lt;/P&gt;&lt;P&gt;   name2 = 'mno'&lt;/P&gt;&lt;P&gt;   name3 = 'pqr'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the above two structure, name2 field is unequal.  I somehow first want to find out the sub-structures of st1 and st2 (which is central) and fields in the substructure and finally compare them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Vikram Nagendra&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Mar 2006 06:59:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-compare-two-similar-complex-structures-generically/m-p/1237747#M141275</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-21T06:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare two similar complex structures generically?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-compare-two-similar-complex-structures-generically/m-p/1237748#M141276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can discover the fields belonging to a structure by using a variant of describe:&lt;/P&gt;&lt;P&gt;eg, &lt;/P&gt;&lt;P&gt;data       td       TYPE sydes_desc.&lt;/P&gt;&lt;P&gt;*.. get attributes of component field&lt;/P&gt;&lt;P&gt;        DESCRIBE FIELD &amp;lt;field&amp;gt; INTO td.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The structure is quite complex but have a play around in debug and it may become clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you'd need to loop at the components of the structures and make comparisons.&lt;/P&gt;&lt;P&gt;something like:&lt;/P&gt;&lt;P&gt;      DO.&lt;/P&gt;&lt;P&gt;*... work through all structure's components...&lt;/P&gt;&lt;P&gt;        ASSIGN COMPONENT sy-index  OF STRUCTURE &amp;lt;in_content&amp;gt; TO &amp;lt;field&amp;gt;.&lt;/P&gt;&lt;P&gt;        IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;*... exit when reaching the end of components&lt;/P&gt;&lt;P&gt;          EXIT.&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;enddo.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Mar 2006 07:49:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-compare-two-similar-complex-structures-generically/m-p/1237748#M141276</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2006-03-21T07:49:21Z</dc:date>
    </item>
  </channel>
</rss>

