<?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: FOR ALL ENTRIES PROBLEM in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-problem/m-p/4933831#M1150890</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;When u r writing FOR ALL ENTIERS statement u need check table Is Initail or not...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank u,&lt;/P&gt;&lt;P&gt;Santhosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Dec 2008 07:24:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-12-22T07:24:54Z</dc:date>
    <item>
      <title>FOR ALL ENTRIES PROBLEM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-problem/m-p/4933828#M1150887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator message: do not use ALL CAPITALS in the subject line&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have one query in ALL ENTRIES KEYWORD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually I am putting one select query as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT LIFNR LAND1 FROM LFA1 INTO TABLE ITAB FOR ALL ENTRIES IN JTAB WHERE NAME2 = JTAB-NAME2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here my JTAB having one entry but the value in field JTAB-NAME2 is blank.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is that i am getting here SY-SUBRC = 4 after the above mentioned query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whereas in table LFA1 we have entries where NAME2 equal to blank.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea how I can get here sy-subrc = 0 as we have entry in table LFA1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Neha&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Matt on Dec 22, 2008 9:16 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Dec 2008 07:03:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-problem/m-p/4933828#M1150887</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-22T07:03:44Z</dc:date>
    </item>
    <item>
      <title>Re: FOR ALL ENTRIES PROBLEM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-problem/m-p/4933829#M1150888</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;u write your code below this manner&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT LIFNR LAND1 FROM LFA1 INTO TABLE ITAB &lt;/P&gt;&lt;P&gt;                                                      FOR ALL ENTRIES IN JTAB &lt;/P&gt;&lt;P&gt;                                                      WHERE &lt;/P&gt;&lt;P&gt;                                                      NAME2 = JTAB-NAME2&lt;/P&gt;&lt;P&gt;                                                                AND&lt;/P&gt;&lt;P&gt;                                                      NAME2 = ' '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think your problem will be solve.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tarapada D.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Dec 2008 07:17:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-problem/m-p/4933829#M1150888</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-22T07:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: FOR ALL ENTRIES PROBLEM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-problem/m-p/4933830#M1150889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Neha,&lt;/P&gt;&lt;P&gt;Try like this:&lt;/P&gt;&lt;P&gt;SELECT LIFNR LAND1 FROM LFA1 INTO TABLE ITAB FOR ALL ENTRIES IN JTAB WHERE NAME2 = JTAB-NAME2 and NAME2 = ' '.it will take the blank values.Thn i think u will get sy-subrc =0.&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rahul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Dec 2008 07:24:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-problem/m-p/4933830#M1150889</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-22T07:24:24Z</dc:date>
    </item>
    <item>
      <title>Re: FOR ALL ENTRIES PROBLEM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-problem/m-p/4933831#M1150890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;When u r writing FOR ALL ENTIERS statement u need check table Is Initail or not...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank u,&lt;/P&gt;&lt;P&gt;Santhosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Dec 2008 07:24:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-problem/m-p/4933831#M1150890</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-22T07:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: FOR ALL ENTRIES PROBLEM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-problem/m-p/4933832#M1150891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,you can write &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT LIFNR LAND1 FROM LFA1 INTO TABLE ITAB &lt;/P&gt;&lt;P&gt;      FOR ALL ENTRIES IN JTAB WHERE &lt;/P&gt;&lt;P&gt;       NAME2 = JTAB-NAME2 or &lt;/P&gt;&lt;P&gt;          NAME2 =  space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Dec 2008 07:25:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-problem/m-p/4933832#M1150891</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-22T07:25:29Z</dc:date>
    </item>
    <item>
      <title>Re: FOR ALL ENTRIES PROBLEM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-problem/m-p/4933833#M1150892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;SELECT LIFNR LAND1 FROM LFA1 INTO TABLE ITAB&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FOR ALL ENTRIES IN JTAB WHERE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NAME2 = JTAB-NAME2 and&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NAME2 = space.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Dec 2008 07:52:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-problem/m-p/4933833#M1150892</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-22T07:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: FOR ALL ENTRIES PROBLEM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-problem/m-p/4933834#M1150893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Neha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If u have that Name2 in selection screen , then make it as mandatory .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or write your query as told by other's before this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Dec 2008 07:54:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-problem/m-p/4933834#M1150893</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-22T07:54:51Z</dc:date>
    </item>
    <item>
      <title>Re: FOR ALL ENTRIES PROBLEM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-problem/m-p/4933835#M1150894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please check all the entries in table JTAB .&lt;/P&gt;&lt;P&gt;If in internal table JTAB you find other fields (a part from NAME2 ) desimilar to the entries of LFA1 the query is going to fail.&lt;/P&gt;&lt;P&gt;I am sure this is the reason for Sy-SUBRC = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EX. &lt;/P&gt;&lt;P&gt;As you say NAME2 = ' ' in JTAB the other field of jtab let it be jtab-LIFNR = '10020' .&lt;/P&gt;&lt;P&gt;then in table LFA1 no such entry with field LIFNR = 10020 would be there .even if&lt;/P&gt;&lt;P&gt;its there then its NAME2 field must be having some data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Dec 2008 08:04:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-problem/m-p/4933835#M1150894</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-22T08:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: FOR ALL ENTRIES PROBLEM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-problem/m-p/4933836#M1150895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Please do not use ALL CAPITALS in the subject line&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Dec 2008 08:17:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-problem/m-p/4933836#M1150895</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2008-12-22T08:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: FOR ALL ENTRIES PROBLEM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-problem/m-p/4933837#M1150896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi neha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Remember while using FOR ALL ENTERIES statement the referencing table or field declared with where clause should not be empty. it should have atleast one record. Otherwise System take it as there is no WHERE clause and selects the all records of that client.&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;Vikas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Dec 2008 08:43:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-problem/m-p/4933837#M1150896</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-22T08:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: FOR ALL ENTRIES PROBLEM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-problem/m-p/4933838#M1150897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Neha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As far as my knowledge goes FOR ALL ENTRIES is a dangerous SQL query since any harm if happens will be for all the entries in the database table.Please be careful and ensure that you mention the where clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now coming to your query &lt;/P&gt;&lt;P&gt;name2 can either be blank or should hold data,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hence its advisable to use the following code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT LIFNR LAND1 &lt;/P&gt;&lt;P&gt;            FROM LFA1 &lt;/P&gt;&lt;P&gt;            INTO TABLE ITAB &lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN JTAB &lt;/P&gt;&lt;P&gt;            WHERE NAME2 = JTAB-NAME2 or NAME2 = ' '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this gives sy-surc = 0,the solution&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;srikanth.p&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Dec 2008 11:56:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-problem/m-p/4933838#M1150897</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-22T11:56:45Z</dc:date>
    </item>
    <item>
      <title>Re: FOR ALL ENTRIES PROBLEM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-problem/m-p/4933839#M1150898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SELECT matnr werks&lt;/P&gt;&lt;P&gt;FROM marc INTO TABLE i1_marc where matnr IN s_matnr&lt;/P&gt;&lt;P&gt;AND werks in s_werks AND mmsta = '10'.&lt;/P&gt;&lt;P&gt;if not i1_marc is inintial.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;SELECT matnr werks&lt;/P&gt;&lt;P&gt;FROM mast INTO TABLE i_mast &lt;/P&gt;&lt;P&gt;for all entries in i1_marc&lt;/P&gt;&lt;P&gt;where matnr = i1_marc-matnr&lt;/P&gt;&lt;P&gt;AND werks = i1_marc-werks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Dec 2008 13:12:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-problem/m-p/4933839#M1150898</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-25T13:12:26Z</dc:date>
    </item>
    <item>
      <title>Re: FOR ALL ENTRIES PROBLEM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-problem/m-p/4933840#M1150899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data: i1_marc type table of marc with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT matnr werks&lt;/P&gt;&lt;P&gt;FROM marc INTO TABLE i1_marc where matnr IN s_matnr&lt;/P&gt;&lt;P&gt;AND werks in s_werks AND mmsta = '10'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not i1_marc[]  is inintial.&lt;/P&gt;&lt;P&gt;SELECT matnr werks&lt;/P&gt;&lt;P&gt;FROM mast INTO TABLE i_mast &lt;/P&gt;&lt;P&gt;for all entries in i1_marc&lt;/P&gt;&lt;P&gt;where matnr = i1_marc-matnr&lt;/P&gt;&lt;P&gt;AND werks = i1_marc-werks&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;P&gt;thanks and regards.&lt;/P&gt;&lt;P&gt;SWATI GUPTA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: swati gupta on Dec 26, 2008 6:12 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Dec 2008 05:12:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-problem/m-p/4933840#M1150899</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-26T05:12:03Z</dc:date>
    </item>
  </channel>
</rss>

