<?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: Where condition in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition/m-p/3895913#M935220</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;The error is because you have decalred p_bukrs as parameter. Convert this to range tables and then use in your select query.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 May 2008 04:23:34 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-27T04:23:34Z</dc:date>
    <item>
      <title>Where condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition/m-p/3895908#M935215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My 2nd select query is not working.&lt;/P&gt;&lt;P&gt;Plz tell where i m wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if itab_lfa1[] is not initial.&lt;/P&gt;&lt;P&gt; if p_bukrs is  initial.&lt;/P&gt;&lt;P&gt;  select lifnr bukrs&lt;/P&gt;&lt;P&gt;  from lfb1&lt;/P&gt;&lt;P&gt;  into  corresponding fields of table i_lfb1&lt;/P&gt;&lt;P&gt;  for all entries in itab_lfa1&lt;/P&gt;&lt;P&gt;  where lifnr =  itab_lfa1-lifnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;  select lifnr bukrs&lt;/P&gt;&lt;P&gt;    from lfb1&lt;/P&gt;&lt;P&gt;  into  corresponding fields of table i_lfb1&lt;/P&gt;&lt;P&gt;  for all entries in itab_lfa1&lt;/P&gt;&lt;P&gt;  where lifnr =  i_lfa1-lifnr&lt;/P&gt;&lt;P&gt;    and bukrs eq p_bukrs.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Showing the error msg in 2nd select this:&lt;/P&gt;&lt;P&gt;The WHERE condition does not refer to the FOR ALL ENTRIES table. 		&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when we remove for all entries in itab_lfa1,&lt;/P&gt;&lt;P&gt;then it show no error, but doesn,t able to pick all records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Aastha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2008 04:05:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition/m-p/3895908#M935215</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-27T04:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: Where condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition/m-p/3895909#M935216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi try this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select lifnr bukrs&lt;/P&gt;&lt;P&gt;from lfb1&lt;/P&gt;&lt;P&gt;into corresponding fields of table i_lfb1&lt;/P&gt;&lt;P&gt;for all entries in itab_lfa1&lt;/P&gt;&lt;P&gt;where lifnr = i_lfa1-lifnr&lt;/P&gt;&lt;P&gt;and bukrs &lt;STRONG&gt;in&lt;/STRONG&gt; p_bukrs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;siva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2008 04:07:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition/m-p/3895909#M935216</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-27T04:07:34Z</dc:date>
    </item>
    <item>
      <title>Re: Where condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition/m-p/3895910#M935217</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 P_bukrs is a parameter, the convert this to select-options and use IN operator in your select statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shruthi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2008 04:12:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition/m-p/3895910#M935217</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-27T04:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: Where condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition/m-p/3895911#M935218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Siva,&lt;/P&gt;&lt;P&gt;Now it is showing an error&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;The IN operator with "P_BUKRS" is followed neither by an internal table nor by a value list.		&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Aastha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2008 04:19:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition/m-p/3895911#M935218</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-27T04:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: Where condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition/m-p/3895912#M935219</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;do this way ...&lt;/P&gt;&lt;P&gt;if not itab_lfa1[] is initial.&lt;/P&gt;&lt;P&gt;select lifnr bukrs&lt;/P&gt;&lt;P&gt;from lfb1&lt;/P&gt;&lt;P&gt;into corresponding fields of table i_lfb1&lt;/P&gt;&lt;P&gt;for all entries in itab_lfa1&lt;/P&gt;&lt;P&gt;where lifnr = &lt;STRONG&gt;itab&lt;/STRONG&gt;_lfa1-lifnr&lt;/P&gt;&lt;P&gt;and bukrs = p_bukrs.  " Assuming p_bukrs is declared as parameter&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2008 04:21:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition/m-p/3895912#M935219</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-27T04:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: Where condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition/m-p/3895913#M935220</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;The error is because you have decalred p_bukrs as parameter. Convert this to range tables and then use in your select query.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2008 04:23:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition/m-p/3895913#M935220</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-27T04:23:34Z</dc:date>
    </item>
    <item>
      <title>Re: Where condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition/m-p/3895914#M935221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Santosh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's not working.&lt;/P&gt;&lt;P&gt;Plz tell me, some other way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best Regards,&lt;/P&gt;&lt;P&gt;Aastha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2008 04:35:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition/m-p/3895914#M935221</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-27T04:35:30Z</dc:date>
    </item>
    <item>
      <title>Re: Where condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition/m-p/3895915#M935222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;   i think you should write your second query like this....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**********************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select lifnr bukrs&lt;/P&gt;&lt;P&gt;from lfb1&lt;/P&gt;&lt;P&gt;into corresponding fields of table i_lfb1&lt;/P&gt;&lt;P&gt;for all entries in itab_lfa1&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;where lifnr = itab_lfa1-lifnr&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;and bukrs eq p_bukrs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To use the for all entries you have to use it in where condition as well...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are using i_lfa1-lifnr in where clause by giving for all entries on itab_lfa1 table, so it wont work like that...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have to use atleast one filed of itab_lfa1 table in the where clause...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check the code in bold characters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Syed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2008 04:38:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition/m-p/3895915#M935222</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-27T04:38:06Z</dc:date>
    </item>
    <item>
      <title>Re: Where condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition/m-p/3895916#M935223</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;Check out in this way  ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;call function 'CONVERSION_EXIT_ALPHA_INPUT'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;          &lt;STRONG&gt;exporting&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;                  &lt;STRONG&gt;input = p_bukrs&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;          &lt;STRONG&gt;importing&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;                 &lt;STRONG&gt;output = p_bukrs.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;loop at itab_lfa1.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;call function 'CONVERSION_EXIT_ALPHA_INPUT'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;          &lt;STRONG&gt;exporting&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;                  &lt;STRONG&gt;input = itab_lfa1-lifnr&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;          &lt;STRONG&gt;importing&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;                 &lt;STRONG&gt;output = itab_lfa1-lifnr.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;STRONG&gt;modify itab_lfa1 index sy-tabix.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;endloop.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not itab_lfa1[] is initial.&lt;/P&gt;&lt;P&gt;select lifnr bukrs&lt;/P&gt;&lt;P&gt;from lfb1&lt;/P&gt;&lt;P&gt;into corresponding fields of table i_lfb1&lt;/P&gt;&lt;P&gt;for all entries in itab_lfa1&lt;/P&gt;&lt;P&gt;where lifnr = itab_lfa1-lifnr&lt;/P&gt;&lt;P&gt;and bukrs = p_bukrs. " Assuming p_bukrs is declared as parameter&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2008 04:40:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition/m-p/3895916#M935223</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-27T04:40:37Z</dc:date>
    </item>
  </channel>
</rss>

