<?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 validate my select stmt in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-validate-my-select-stmt/m-p/1555909#M251742</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;  Nothing is wrong the select statement..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Compare the values you give in SE11 with the values in the where clause..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Check your values in r_cpudt and r_blart..looks like you are populating manually in your program..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Populate the range only if the value is present..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example..&lt;/P&gt;&lt;P&gt;  RANGES r_matnr for mara-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if not v_matnr is initial.&lt;/P&gt;&lt;P&gt;    r_matnr-sign = 'I'.&lt;/P&gt;&lt;P&gt;    r_matnr-option = 'EQ'.&lt;/P&gt;&lt;P&gt;    r_matnr-low = v_matnr.&lt;/P&gt;&lt;P&gt;    append r_matnr.&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;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Sep 2006 22:32:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-15T22:32:14Z</dc:date>
    <item>
      <title>Please validate my select stmt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-validate-my-select-stmt/m-p/1555908#M251741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SELECT *   " bukrs lifnr gjahr belnr blart&lt;/P&gt;&lt;P&gt;           FROM bsak&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          appending table gt_bsak&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;           INTO CORRESPONDING FIELDS OF TABLE gt_bsak&lt;/P&gt;&lt;P&gt;           WHERE cpudt in r_cpudt&lt;/P&gt;&lt;P&gt;           AND   blart in r_blart&lt;/P&gt;&lt;P&gt;           AND   bukrs in s_bukrs&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          AND   lifnr in s_lifnr&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;           AND   belnr in s_belnr&lt;/P&gt;&lt;P&gt;           AND   gjahr in s_gjahr&lt;/P&gt;&lt;P&gt;What is wrong in above stmt .&lt;/P&gt;&lt;P&gt;As one record is selecting from db table (se11) bsak with the set of values of &lt;/P&gt;&lt;P&gt;r_cpudt, r_blart, s_bukrs, s_belnr, s_gjahr .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Sep 2006 22:25:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-validate-my-select-stmt/m-p/1555908#M251741</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-15T22:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: Please validate my select stmt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-validate-my-select-stmt/m-p/1555909#M251742</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;  Nothing is wrong the select statement..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Compare the values you give in SE11 with the values in the where clause..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Check your values in r_cpudt and r_blart..looks like you are populating manually in your program..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Populate the range only if the value is present..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example..&lt;/P&gt;&lt;P&gt;  RANGES r_matnr for mara-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if not v_matnr is initial.&lt;/P&gt;&lt;P&gt;    r_matnr-sign = 'I'.&lt;/P&gt;&lt;P&gt;    r_matnr-option = 'EQ'.&lt;/P&gt;&lt;P&gt;    r_matnr-low = v_matnr.&lt;/P&gt;&lt;P&gt;    append r_matnr.&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;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Sep 2006 22:32:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-validate-my-select-stmt/m-p/1555909#M251742</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-15T22:32:14Z</dc:date>
    </item>
    <item>
      <title>Re: Please validate my select stmt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-validate-my-select-stmt/m-p/1555910#M251743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It would be correct if you left it by selecting on lifnr. But since you are now selecting on bukrs, belnr and gjahr, you should select against BSEG and not BSAK. This way you will use the primary index. As coded, you will not. If you only want cleared items (what you would get if you kept it against BSAK) you should also add AUGDT &amp;lt;&amp;gt; ' ' and KUART = 'K'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Sep 2006 03:05:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-validate-my-select-stmt/m-p/1555910#M251743</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-16T03:05:59Z</dc:date>
    </item>
  </channel>
</rss>

