<?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: Please advise on SELECT --- CORRESPONDING ... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-advise-on-select-corresponding/m-p/2185370#M465247</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do not use Corresponding field statement ( It has Preformance issue ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First Declare your Internal Table like :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Structure&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;TYPES: BEGIN OF ty_data,&lt;/P&gt;&lt;P&gt;Field2 like table-field2,&lt;/P&gt;&lt;P&gt;Field3 like table-field3,&lt;/P&gt;&lt;P&gt;end of ty_data.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal Table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: t_data TYPE TABLE OF ty_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Work Area&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Data : wa_data like line of t_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Structure&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;TYPES: BEGIN OF ty_data1,&lt;/P&gt;&lt;P&gt;Field1 like table-field1,&lt;/P&gt;&lt;P&gt; end of ty_data1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal Table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: t_data1 TYPE TABLE OF ty_data1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Work Area&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Data : wa_data1 like line of t_data1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT field2 field3&lt;/P&gt;&lt;P&gt;INTO  TABLE t_data&lt;/P&gt;&lt;P&gt;FROM table&lt;/P&gt;&lt;P&gt;WHERE a &amp;lt;&amp;gt; ''&lt;/P&gt;&lt;P&gt;AND b = 'CO'&lt;/P&gt;&lt;P&gt;AND c = '01'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now loop your internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at t_data into wa_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;	Do the your comparision &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    And modify the data into one more internal table&lt;/P&gt;&lt;P&gt;T_data1 has value now.&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;Reward Points if it is helpful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Seshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 May 2007 16:27:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-07T16:27:56Z</dc:date>
    <item>
      <title>Please advise on SELECT --- CORRESPONDING ...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-advise-on-select-corresponding/m-p/2185365#M465242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;TYPES: BEGIN OF ty_data,&lt;/P&gt;&lt;P&gt;       Field1 like table-field1,&lt;/P&gt;&lt;P&gt;       Field2 like table-field2,&lt;/P&gt;&lt;P&gt;       Field3 like table-field3,&lt;/P&gt;&lt;P&gt;            end of ty_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: t_data TYPE TABLE OF ty_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT field2 field3&lt;/P&gt;&lt;P&gt;        INTO CORRESPONDING FIELDS OF TABLE t_data&lt;/P&gt;&lt;P&gt;        FROM table&lt;/P&gt;&lt;P&gt;                    WHERE a &amp;lt;&amp;gt; ''&lt;/P&gt;&lt;P&gt;                      AND b = 'CO'&lt;/P&gt;&lt;P&gt;                      AND c = '01'.&lt;/P&gt;&lt;P&gt;While I use the above SELECT statement I do not get any data in my internal table . All the columns are blanks though it shows that there are 1000 records . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT field2 field3&lt;/P&gt;&lt;P&gt;        INTO TABLE t_data&lt;/P&gt;&lt;P&gt;        FROM table&lt;/P&gt;&lt;P&gt;                    WHERE a &amp;lt;&amp;gt; ''&lt;/P&gt;&lt;P&gt;                      AND b = 'CO'&lt;/P&gt;&lt;P&gt;                      AND c = '01'.&lt;/P&gt;&lt;P&gt;When I use the one above I get the data for all the 1000 records but they are not populated in the right column in the internal table . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advise where I am going wrong . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also After I get all the data for  field2 and field3 . I need to loop again at t_data and create a relationship between field2 and field3 which is going to be field1 = &amp;#145;zzzz&amp;#146;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advise . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2007 15:50:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-advise-on-select-corresponding/m-p/2185365#M465242</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-07T15:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: Please advise on SELECT --- CORRESPONDING ...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-advise-on-select-corresponding/m-p/2185366#M465243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Make your fields lower case:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF ty_data,&lt;/P&gt;&lt;P&gt;field1 like table-field1,&lt;/P&gt;&lt;P&gt;field2 like table-field2,&lt;/P&gt;&lt;P&gt;field3 like table-field3,&lt;/P&gt;&lt;P&gt;end of ty_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;They must match the DB  table exactly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2007 15:55:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-advise-on-select-corresponding/m-p/2185366#M465243</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-07T15:55:08Z</dc:date>
    </item>
    <item>
      <title>Re: Please advise on SELECT --- CORRESPONDING ...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-advise-on-select-corresponding/m-p/2185367#M465244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The table only has field2 and field3 . &lt;/P&gt;&lt;P&gt;After getting field2 and field3 I need to create a relationship 'ZZZZ' between fields2 and field3 which will field1 = 'ZZZZ'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks ,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2007 15:57:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-advise-on-select-corresponding/m-p/2185367#M465244</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-07T15:57:25Z</dc:date>
    </item>
    <item>
      <title>Re: Please advise on SELECT --- CORRESPONDING ...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-advise-on-select-corresponding/m-p/2185368#M465245</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;P&gt;If you use INTO TABLE the sequence has to match..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So Move the FIELD1 declaration to the third position..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF ty_data,&lt;/P&gt;&lt;P&gt;Field2 like table-field2,&lt;/P&gt;&lt;P&gt;Field3 like table-field3,&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Field1 like table-field1,&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;end of ty_data.&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;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2007 16:00:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-advise-on-select-corresponding/m-p/2185368#M465245</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-07T16:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: Please advise on SELECT --- CORRESPONDING ...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-advise-on-select-corresponding/m-p/2185369#M465246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Where does the ZZZZ come from?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2007 16:02:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-advise-on-select-corresponding/m-p/2185369#M465246</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-07T16:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: Please advise on SELECT --- CORRESPONDING ...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-advise-on-select-corresponding/m-p/2185370#M465247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do not use Corresponding field statement ( It has Preformance issue ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First Declare your Internal Table like :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Structure&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;TYPES: BEGIN OF ty_data,&lt;/P&gt;&lt;P&gt;Field2 like table-field2,&lt;/P&gt;&lt;P&gt;Field3 like table-field3,&lt;/P&gt;&lt;P&gt;end of ty_data.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal Table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: t_data TYPE TABLE OF ty_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Work Area&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Data : wa_data like line of t_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Structure&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;TYPES: BEGIN OF ty_data1,&lt;/P&gt;&lt;P&gt;Field1 like table-field1,&lt;/P&gt;&lt;P&gt; end of ty_data1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal Table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: t_data1 TYPE TABLE OF ty_data1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Work Area&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Data : wa_data1 like line of t_data1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT field2 field3&lt;/P&gt;&lt;P&gt;INTO  TABLE t_data&lt;/P&gt;&lt;P&gt;FROM table&lt;/P&gt;&lt;P&gt;WHERE a &amp;lt;&amp;gt; ''&lt;/P&gt;&lt;P&gt;AND b = 'CO'&lt;/P&gt;&lt;P&gt;AND c = '01'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now loop your internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at t_data into wa_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;	Do the your comparision &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    And modify the data into one more internal table&lt;/P&gt;&lt;P&gt;T_data1 has value now.&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;Reward Points if it is helpful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Seshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2007 16:27:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-advise-on-select-corresponding/m-p/2185370#M465247</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-07T16:27:56Z</dc:date>
    </item>
  </channel>
</rss>

