<?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 problem? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-problem/m-p/3776390#M908665</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 IN condition , it will fetch the data for the range( set of values in V_MA_NOS ). &lt;/P&gt;&lt;P&gt;if it is  MBLNR = MKPF-MBLNR , records matching the MBLNR is selected. ie for one value of MBLNR there can be one or more records matching MBLNR in MSEG&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Madhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Apr 2008 04:42:19 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-04-25T04:42:19Z</dc:date>
    <item>
      <title>Select Statement problem?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-problem/m-p/3776387#M908662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friends i want to know wht is the difference between MBLNR IN V_MA_NOS and wht is MBLNR = MKPF-MBLNR    AND   WERKS = V_PLANT AND  BWART IN V_MO_TY AND  LIFNR IN V_VENDOR.    I mean i want to know how the records are selected. My original two select statements are....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM MKPF WHERE MBLNR IN V_MA_NOS AND BLDAT IN V_D_DATE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM MSEG WHERE MBLNR = MKPF-MBLNR    AND   WERKS = V_PLANT AND                                 BWART IN V_MO_TY AND  LIFNR IN V_VENDOR.    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Apr 2008 04:33:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-problem/m-p/3776387#M908662</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-25T04:33:27Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement problem?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-problem/m-p/3776388#M908663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Venkat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; The first select statement fetches the data from MKPF based on MBLNR and BLDAT for the given ranges/select-options V_MA_NOS &amp;amp; V_D_DATE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM MKPF WHERE MBLNR IN V_MA_NOS AND BLDAT IN V_D_DATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;llarly the second select statement fetches the data from MSEG based on WERKS, BWART &amp;amp;  LIFNR for a given values in V_PLANT, V_MO_TY &amp;amp; V_VENDOR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM MSEG WHERE MBLNR = MKPF-MBLNR AND WERKS = V_PLANT AND BWART IN V_MO_TY AND LIFNR IN V_VENDOR.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Apr 2008 04:40:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-problem/m-p/3776388#M908663</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-25T04:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement problem?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-problem/m-p/3776389#M908664</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;MBLNR = MKPF-MBLNR  is used when you matches your condition with a single value i.e. parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;while BWART IN V_MO_TY  is used when you want to match your condition to a range i.e. select-option&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if helpful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Apr 2008 04:41:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-problem/m-p/3776389#M908664</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-25T04:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement problem?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-problem/m-p/3776390#M908665</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 IN condition , it will fetch the data for the range( set of values in V_MA_NOS ). &lt;/P&gt;&lt;P&gt;if it is  MBLNR = MKPF-MBLNR , records matching the MBLNR is selected. ie for one value of MBLNR there can be one or more records matching MBLNR in MSEG&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Madhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Apr 2008 04:42:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-problem/m-p/3776390#M908665</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-25T04:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement problem?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-problem/m-p/3776391#M908666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Venkat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;V_MA_NOS  might be select-options in the selection screen which will have a range of values or it can be a range declared in the program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MBLNR IN V_MA_NOS will see to that the select query will consider &lt;STRONG&gt;only&lt;/STRONG&gt; those MBLNRs which are declared in that range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The same with BWART IN V_MO_TY AND LIFNR IN V_VENDOR. ie only the valuation types and vendors declared in that range will only be considered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MBLNR = MKPF-MBLNR &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here all the MBLNRs in the table MKPF will be considered for further processing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WERKS = V_PLANT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here V_PLANT is a parameter declared in the selection screen,ie if you have entered XX as plant in the selection screen it will fetch only those records related to that plant only.&lt;/P&gt;&lt;P&gt;You can even initialize this V_PLANT in the program too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;K.Kiran.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Apr 2008 04:42:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-problem/m-p/3776391#M908666</guid>
      <dc:creator>kiran_k8</dc:creator>
      <dc:date>2008-04-25T04:42:39Z</dc:date>
    </item>
  </channel>
</rss>

