<?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 query in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/2970915#M701103</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi sai,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         In that internal table,  last record value will store into that workarea.&lt;/P&gt;&lt;P&gt;If the condition matches corresponding record will come other wise&lt;/P&gt;&lt;P&gt;that last record will be assigned to that variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Surya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Oct 2007 11:08:44 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-29T11:08:44Z</dc:date>
    <item>
      <title>select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/2970910#M701098</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;i have written a select query as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT SINGLE clear_flag INTO w_clearedflag&lt;/P&gt;&lt;P&gt;                            FROM zsales_cmpclear&lt;/P&gt;&lt;P&gt;                           WHERE doctype = bkpf-blart.&lt;/P&gt;&lt;P&gt;t_sales_comp-cleared_flag = w_clearedflag.&lt;/P&gt;&lt;P&gt;clear w_clearedflag.&lt;/P&gt;&lt;P&gt;if the select query does not return any record,then what will be the value moved to t_sales_comp-cleared_flag .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2007 11:02:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/2970910#M701098</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-29T11:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/2970911#M701099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What ever value was in w_clearedflag before the select statement was executed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are best clearing this field before the SQL.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2007 11:04:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/2970911#M701099</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-29T11:04:23Z</dc:date>
    </item>
    <item>
      <title>Re: select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/2970912#M701100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;it depnds on the declaration of the variable w_clearedflag&lt;/P&gt;&lt;P&gt;if it is type C it will be space&lt;/P&gt;&lt;P&gt;if it is Type I or P or some CURR then zeros&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;ANJI&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2007 11:04:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/2970912#M701100</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-29T11:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/2970913#M701101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if the select query fails then initial value that means a blank or any initialised value of w_clearedflag will be filled.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2007 11:06:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/2970913#M701101</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-29T11:06:24Z</dc:date>
    </item>
    <item>
      <title>Re: select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/2970914#M701102</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 are using the variable w_clearedflag for the first time then it will have the value space or else the previous value assigned in the program before if the select statement fails.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Muthu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2007 11:07:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/2970914#M701102</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-29T11:07:05Z</dc:date>
    </item>
    <item>
      <title>Re: select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/2970915#M701103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi sai,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         In that internal table,  last record value will store into that workarea.&lt;/P&gt;&lt;P&gt;If the condition matches corresponding record will come other wise&lt;/P&gt;&lt;P&gt;that last record will be assigned to that variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Surya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2007 11:08:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/2970915#M701103</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-29T11:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/2970916#M701104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Whilst all of the other answers are good and useful, did you not try this code for yourself debugging through it to see exactly what happens?  You will learn a lot more that way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gareth.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2007 11:08:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/2970916#M701104</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-29T11:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/2970917#M701105</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;sai prasad.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE clear_flag INTO w_clearedflag&lt;/P&gt;&lt;P&gt;FROM zsales_cmpclear&lt;/P&gt;&lt;P&gt;WHERE doctype = bkpf-blart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc eq  0.&lt;/P&gt;&lt;P&gt;t_sales_comp-cleared_flag = w_clearedflag.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;clear w_clearedflag.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if u write like this then if select query executed properly then t_sales_comp-cleared_flag contains the value of w_clearedflag.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;otherwise it contains default valu of the type decledred to t_sales_comp-cleared_flag.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2007 11:09:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/2970917#M701105</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-29T11:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/2970918#M701106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The value will be the initial value of w_clearedflag, which means the value for w_clearedflag will remain, the one, which is before the select query. Since the select query hasnt fetched any record, the value of w_clearedflag will not get populated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2007 11:11:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/2970918#M701106</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-29T11:11:27Z</dc:date>
    </item>
  </channel>
</rss>

