<?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: Select statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/2648115#M610206</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First u will get the details with the condition where knvh-hityp = "D" and knvh-hkunnr = cid..Store this in internal table..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then u can use the for all entries concept and combine a database table with a internal table...with the second condtion&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REWARD IF USEFUL&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Aug 2007 14:36:36 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-22T14:36:36Z</dc:date>
    <item>
      <title>Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/2648113#M610204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a condition :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to go to knvh and collect planning group from knvh-kunnr where knvh-hityp = "D" and knvh-hkunnr = cid, after that go to knvh and collect sold to party from knvh-kunnr where knvh-hityp = "D" and knvh-hkunnr = planning group&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so far I have written this thing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select kunnr into table it_knvh&lt;/P&gt;&lt;P&gt;    from knvh&lt;/P&gt;&lt;P&gt;    for all entries in it_header&lt;/P&gt;&lt;P&gt;    where hkunnr = it_header-cid&lt;/P&gt;&lt;P&gt;    and hityp = 'D'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please twll me what should be the further process to accomplish the desired result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Rajeev Gupta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2007 14:29:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/2648113#M610204</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-21T14:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/2648114#M610205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rajeev,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the code below will solve your problem,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of it_knvh_temp occurs 0,&lt;/P&gt;&lt;P&gt;       kunnr  like knvh-kunnr,&lt;/P&gt;&lt;P&gt;       hkunnr like knvh-hkunnr,&lt;/P&gt;&lt;P&gt;      end of it_knvh_temp. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of it_knvh occurs 0,&lt;/P&gt;&lt;P&gt;       kunnr  like knvh-kunnr,&lt;/P&gt;&lt;P&gt;       hkunnr like knvh-hkunnr,&lt;/P&gt;&lt;P&gt;      end of it_knvh. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select kunnr&lt;/P&gt;&lt;P&gt;       hkunnr&lt;/P&gt;&lt;P&gt;  from knvh&lt;/P&gt;&lt;P&gt;  into table it_knvh_temp&lt;/P&gt;&lt;P&gt; where hityp  = 'D'&lt;/P&gt;&lt;P&gt;   and hkunnr = 'cid'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;throw error message &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if it_knvh_temp[] is not initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select kunnr &lt;/P&gt;&lt;P&gt;  from knvh &lt;/P&gt;&lt;P&gt;  into table it_knvh&lt;/P&gt;&lt;P&gt;   for all entries in it_knvh_temp&lt;/P&gt;&lt;P&gt; where hityp = 'D'&lt;/P&gt;&lt;P&gt;   and hkunnr = it_knvh_temp-hkunnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;throw error message &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&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;Thanks,&lt;/P&gt;&lt;P&gt;Samantak. &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Rewards points for useful answers.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2007 12:51:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/2648114#M610205</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-22T12:51:33Z</dc:date>
    </item>
    <item>
      <title>Re: Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/2648115#M610206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First u will get the details with the condition where knvh-hityp = "D" and knvh-hkunnr = cid..Store this in internal table..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then u can use the for all entries concept and combine a database table with a internal table...with the second condtion&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REWARD IF USEFUL&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2007 14:36:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/2648115#M610206</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-22T14:36:36Z</dc:date>
    </item>
  </channel>
</rss>

