<?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/1642440#M286084</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To exclude records like that,  use  subquery:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select * from jest into  table gt_jest
         for all entries in i_tmp_caufv
         where objnr = i_tmp_caufv-objnr
          and objnr not in ( select objnr from jest where stat in ('I0009', 'I0076')
                                                      and inact = ' ' )
          and inact eq ' '.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sridhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Oct 2006 20:52:41 GMT</pubDate>
    <dc:creator>sridhar_k1</dc:creator>
    <dc:date>2006-10-19T20:52:41Z</dc:date>
    <item>
      <title>Select Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1642437#M286081</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;for ex: obj id - OR0000123 is having &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I0001, I0002, I0003, I0009, I0005.&lt;/P&gt;&lt;P&gt;If I0009 I0076 is there I dont want to display the obj id.&lt;/P&gt;&lt;P&gt;even if the objid is having other statuses.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how should i write the select statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE * INTO I_JEST FROM JEST&lt;/P&gt;&lt;P&gt;WHERE OBJNR = I_TMP_CAUFV-OBJNR and STAT.... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Oct 2006 16:07:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1642437#M286081</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-19T16:07: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/1642438#M286082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Select * from jest&lt;/P&gt;&lt;P&gt;  into table i_jest&lt;/P&gt;&lt;P&gt;  where objnr = 'OR0000123' and&lt;/P&gt;&lt;P&gt;        ( stat &amp;lt;&amp;gt; 'I0009' OR &lt;/P&gt;&lt;P&gt;          stat &amp;lt;&amp;gt; 'I0076' ).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Oct 2006 16:19:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1642438#M286082</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-19T16:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1642439#M286083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if you are going to use select single to check &lt;/P&gt;&lt;P&gt;it's just :&lt;/P&gt;&lt;P&gt;SELECT SINGLE * INTO I_JEST FROM JEST&lt;/P&gt;&lt;P&gt;WHERE OBJNR = I_TMP_CAUFV-OBJNR and STAT in ('I0009','I0076')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc - 0 -&amp;gt; DO NOT DISPLAY this OBJID.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Oct 2006 18:30:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1642439#M286083</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-19T18:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1642440#M286084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To exclude records like that,  use  subquery:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select * from jest into  table gt_jest
         for all entries in i_tmp_caufv
         where objnr = i_tmp_caufv-objnr
          and objnr not in ( select objnr from jest where stat in ('I0009', 'I0076')
                                                      and inact = ' ' )
          and inact eq ' '.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sridhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Oct 2006 20:52:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1642440#M286084</guid>
      <dc:creator>sridhar_k1</dc:creator>
      <dc:date>2006-10-19T20:52:41Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1642441#M286085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kamlesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can write like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from jest into table itab&lt;/P&gt;&lt;P&gt;                   where objnr = I_TMP_CAUFV-OBJNR.&lt;/P&gt;&lt;P&gt; if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;   delete itab where stat = 'I0009' or stat = 'I0076'.&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Oct 2006 21:50:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1642441#M286085</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-19T21:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1642442#M286086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi kamlesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * into i_jest from jest&lt;/P&gt;&lt;P&gt;where objnr = i_tmp_caufv-objnr and&lt;/P&gt;&lt;P&gt;stat in ('I0001', 'I0002', 'I0003',&lt;/P&gt;&lt;P&gt;         'I0009', 'I0005') and&lt;/P&gt;&lt;P&gt;stat ne ('I0076')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope, you get the desired result.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Oct 2006 06:46:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1642442#M286086</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-21T06:46:22Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1642443#M286087</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;You the below logic for your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. First get all the Orders into an internal table with Statuses I0009, I0076.&lt;/P&gt;&lt;P&gt;   clear : i_jest, i_jest[].&lt;/P&gt;&lt;P&gt;   if not i_tmp_caufv[] is initial.&lt;/P&gt;&lt;P&gt;      select objnr&lt;/P&gt;&lt;P&gt;             stat&lt;/P&gt;&lt;P&gt;        into table i_jest&lt;/P&gt;&lt;P&gt;        from jest&lt;/P&gt;&lt;P&gt;        for all entries in i_tmp_caufv&lt;/P&gt;&lt;P&gt;      where objnr = i_tmp_caufv-objnr and&lt;/P&gt;&lt;P&gt;            ( stat  = 'I0009' or stat = 'I0076' ) and&lt;/P&gt;&lt;P&gt;            inact = ' '.&lt;/P&gt;&lt;P&gt;      if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;         sort i_jest by objnr stat.&lt;/P&gt;&lt;P&gt;      endf.&lt;/P&gt;&lt;P&gt;   endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Now while displaying the report you can use below logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at i_tmp_caufv.&lt;/P&gt;&lt;P&gt;    read table i_jest with key objnr = i_tmp_caufv-objnr&lt;/P&gt;&lt;P&gt;                                       binary search.&lt;/P&gt;&lt;P&gt;    if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;       continue. " do not display which have I0009,I0076  &lt;/P&gt;&lt;P&gt;                 " statuses.&lt;/P&gt;&lt;P&gt;    else.&lt;/P&gt;&lt;P&gt;       " display in the output&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;sksingh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Oct 2006 13:58:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1642443#M286087</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-31T13:58:06Z</dc:date>
    </item>
  </channel>
</rss>

