<?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 statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-statement/m-p/1531119#M242701</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kajol,&lt;/P&gt;&lt;P&gt;Yes sy-subrc will be 0, because the select statment has found minimum one record.&lt;/P&gt;&lt;P&gt;Check for sy-dbcnt, it might be helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or use can use the read statment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prakash.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Jul 2006 17:28:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-07-27T17:28:25Z</dc:date>
    <item>
      <title>for all entries statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-statement/m-p/1531117#M242699</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 4 records in i_kostl999&lt;/P&gt;&lt;P&gt; and after the select statement i get kostl and zgrp into i_abc of only 2 records because for the other two records doesn't exist in zxxx,but my problem is that the sy-subrc is still equal to zero.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select kostl zgrp into table i_abc from zxxx&lt;/P&gt;&lt;P&gt;      for all entries in i_kostl999&lt;/P&gt;&lt;P&gt;      where kostl = i_kostl999-auf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;message e398(00) with 'No reservation items found '.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jul 2006 17:21:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-statement/m-p/1531117#M242699</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-27T17:21:35Z</dc:date>
    </item>
    <item>
      <title>Re: for all entries statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-statement/m-p/1531118#M242700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kajol,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Its always a good practise to check table contents of internal table when you are using FOR ALL ENTRIES option.&lt;/P&gt;&lt;P&gt;2) If the internal table is empty then it will take all entries from the database.&lt;/P&gt;&lt;P&gt;3) SY-SUBRC will be zero if it satisfies for at least one entry from interna table with database condition&lt;/P&gt;&lt;P&gt;4) Try as follows&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;IF I_KOSTL999[] IS NOT INITIAL.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;select kostl zgrp into table i_abc from zxxx&lt;/P&gt;&lt;P&gt;for all entries in i_kostl999&lt;/P&gt;&lt;P&gt;where kostl = i_kostl999-auf.&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;message e398(00) with 'No reservation items found '.&lt;/P&gt;&lt;P&gt;endif. &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;ENIDF.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jul 2006 17:26:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-statement/m-p/1531118#M242700</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-27T17:26:03Z</dc:date>
    </item>
    <item>
      <title>Re: for all entries statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-statement/m-p/1531119#M242701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kajol,&lt;/P&gt;&lt;P&gt;Yes sy-subrc will be 0, because the select statment has found minimum one record.&lt;/P&gt;&lt;P&gt;Check for sy-dbcnt, it might be helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or use can use the read statment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prakash.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jul 2006 17:28:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-statement/m-p/1531119#M242701</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-27T17:28:25Z</dc:date>
    </item>
    <item>
      <title>Re: for all entries statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-statement/m-p/1531120#M242702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi MY PROBLEM IS NOT THAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the sy-subrc is zero even its retrieving data for only 2 records inspite of saying for alll entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am supposed to get data for 4 records otherwise sy-subrc should be not equal to zero right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jul 2006 17:35:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-statement/m-p/1531120#M242702</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-27T17:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: for all entries statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-statement/m-p/1531121#M242703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi kajol,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unless no records are selected in to the table ,sy-subrc will be equal to zero.&lt;/P&gt;&lt;P&gt;if u want to compare the 2 tables,&lt;/P&gt;&lt;P&gt;use describe table lines v_lines and check if they are equal.&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;keerthi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jul 2006 17:36:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-statement/m-p/1531121#M242703</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-27T17:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: for all entries statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-statement/m-p/1531122#M242704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No Kajol sy-subrc will be zero if it is fetching atleast for one entry. After select select statment u can check for Sy-dbcnt if it is not equal to 4, u can through a error message.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jul 2006 17:40:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-statement/m-p/1531122#M242704</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-27T17:40:32Z</dc:date>
    </item>
    <item>
      <title>Re: for all entries statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-statement/m-p/1531123#M242705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi kajol,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i_kostl999 does not have any records then it will return sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but out of 4 records only 2 r there in the table zxxx which match with that of the i_kostl999.so sy-subrc = 0 as it is able to fetch 2 records.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jul 2006 17:43:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-statement/m-p/1531123#M242705</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-27T17:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: for all entries statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-statement/m-p/1531124#M242706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kajol,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) SY-SUBRC will be zero if it get at least one record which satifies the condition.&lt;/P&gt;&lt;P&gt;2) If it does not fetch any record for your ALL ENTRIES than your SY-SUBRC will be non-zero.&lt;/P&gt;&lt;P&gt;3) No doubt that your SELECT statement is considering all entries in internal table i_kostl999.&lt;/P&gt;&lt;P&gt;4) But, you have a WHERE condition in your query which satifies ONLY 2 ENTRIES from I_KOSTL999.&lt;/P&gt;&lt;P&gt;5) So you are getting only 2 records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6) select kostl zgrp into table i_abc from zxxx&lt;/P&gt;&lt;P&gt;   for all entries in i_kostl999&lt;/P&gt;&lt;P&gt;   &amp;lt;b&amp;gt;where kostl = i_kostl999-auf.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: Plz reward all helpful answers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jul 2006 18:02:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-statement/m-p/1531124#M242706</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-27T18:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: for all entries statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-statement/m-p/1531125#M242707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kajol&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Try this way to suit your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: l_lines type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check not i_kostl999[] is initial.&lt;/P&gt;&lt;P&gt;describe table i_kostl999 lines l_lines.&lt;/P&gt;&lt;P&gt;select kostl zgrp into table i_abc from zxxx&lt;/P&gt;&lt;P&gt;for all entries in i_kostl999&lt;/P&gt;&lt;P&gt;where kostl = i_kostl999-auf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0 or sy-dbcnt ne l_lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;message e398(00) with 'No reservation items found '.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: Award for useful replies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jul 2006 18:17:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-statement/m-p/1531125#M242707</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-27T18:17:39Z</dc:date>
    </item>
  </channel>
</rss>

