<?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/4657951#M1095948</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reply. Can you suggest with 'Select' statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Oct 2008 04:11:43 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-10-16T04:11:43Z</dc:date>
    <item>
      <title>Select Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/4657949#M1095946</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 should pick OBJNRs from JEST whose  stat EQ  'I0010'  OR  stat EQ 'I0009'  and whose stat not equal to  I0012,I0045,I0046.&lt;/P&gt;&lt;P&gt;For example&lt;/P&gt;&lt;P&gt;As OBJNRs will have different status,if an OBJNR contains status =  'I0009' and status =  'I0045' ,this OBJNR should not be picked as it has status =  'I0045' .&lt;/P&gt;&lt;P&gt;How to write a 'select'  statement for this . Please suggest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2008 04:05:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/4657949#M1095946</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-16T04:05:09Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/4657950#M1095947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;instead of select, you can use the Function STATUS_TEXT_EDIT, fot this pass the Objnr, you get the status in exporting parameter LINE . line consists of all statuses. using CS you can check the status which you want.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2008 04:07:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/4657950#M1095947</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-16T04:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/4657951#M1095948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reply. Can you suggest with 'Select' statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2008 04:11:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/4657951#M1095948</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-16T04:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/4657952#M1095949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;select * from jest into table ijest where ( stat = 'i0010' and stat = 'i0009' and stat ne 'i0012' ).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2008 04:16:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/4657952#M1095949</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-16T04:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/4657953#M1095950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply. Status should not include 'I0012','I0045','I0046'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2008 04:18:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/4657953#M1095950</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-16T04:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/4657954#M1095951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;select * from jest into table ijest where ( stat = 'I0010' or stat = 'I0009' or stat ne 'I0012'  and stat ne 'I0045' and stat ne 'I0046').&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2008 04:27:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/4657954#M1095951</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-16T04:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/4657955#M1095952</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;Try like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select objnr from jest&lt;/P&gt;&lt;P&gt;where stat IN ( 'I0009' , 'I0045' ) AND&lt;/P&gt;&lt;P&gt;stat NOT IN ( 'I0012', 'I0045', 'I0046' ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhaskar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2008 04:28:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/4657955#M1095952</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-16T04:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/4657956#M1095953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I should pick OBJNRs from JEST whose stat EQ 'I0010' OR stat EQ 'I0009' and whose stat not equal to I0012,I0045,I0046.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from jest &lt;/P&gt;&lt;P&gt;into table it_jest&lt;/P&gt;&lt;P&gt;where stat not in ('I0012' , 'I0045' , 'I0046').&lt;/P&gt;&lt;P&gt;or &lt;/P&gt;&lt;P&gt;select * from jest &lt;/P&gt;&lt;P&gt;into table it_jest&lt;/P&gt;&lt;P&gt;where stat  in ('I0010' , 'I0009').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or u can combine both in same select&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2008 04:29:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/4657956#M1095953</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-16T04:29: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/4657957#M1095954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Hi,&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; I should pick OBJNRs from JEST whose  stat EQ  'I0010'  OR  stat EQ 'I0009'  and whose stat not equal to  I0012,I0045,I0046.&lt;/P&gt;&lt;P&gt;&amp;gt; For example&lt;/P&gt;&lt;P&gt;&amp;gt; As OBJNRs will have different status,if an OBJNR contains status =  'I0009' and status =  'I0045' ,this OBJNR should not be picked as it has status =  'I0045' .&lt;/P&gt;&lt;P&gt;&amp;gt; How to write a 'select'  statement for this . Please suggest.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Thanks&lt;/P&gt;&lt;P&gt;&amp;gt; Venkat&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi Venkat,&lt;/P&gt;&lt;P&gt;   We can not do it dirctly with one select statement&lt;/P&gt;&lt;P&gt;First select records with 'I0010' and 'I0009'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and Select records with I0012,I0045,I0046&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then Looping with first Internal table , read the second internal table to see if record exists for the same objnr of first internal table , if record exists delete that record from first internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then at end you get records what you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try it out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Narendra.Soma&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2008 04:31:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/4657957#M1095954</guid>
      <dc:creator>former_member761936</dc:creator>
      <dc:date>2008-10-16T04:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/4657958#M1095955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi you can try like this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; ( objnr eq 'I0010' or stat EQ 'I0009' ) and &lt;/P&gt;&lt;P&gt; ( objnr ne 'I0012' and objnr ne 'I0045' and objnr ne 'I0046' ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2008 04:39:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/4657958#M1095955</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-16T04:39:16Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/4657959#M1095956</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;Try the code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA : IT_JEST TYPE TABLE OF JEST.

SELECT *
FROM JEST
INTO TABLE IT_JEST
WHERE STAT IN ('I0010', 'I0009' ) AND
      STAT NOT IN ('I0012', 'I0045', 'I0046' ).

WRITE 'HAI'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2008 04:43:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/4657959#M1095956</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-16T04:43:04Z</dc:date>
    </item>
  </channel>
</rss>

