<?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: Problem with select query. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-query/m-p/5640525#M1283802</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for all the replies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I placed the commit work outside the Select.... End Select and there is dump now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt; Balu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 May 2009 10:02:12 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-05-21T10:02:12Z</dc:date>
    <item>
      <title>Problem with select query.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-query/m-p/5640518#M1283795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to modify a program which contains the below mentioned query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT * FROM yvw40 .&lt;/P&gt;&lt;P&gt;    DELETE FROM yvw40 WHERE period IN s_month AND&lt;/P&gt;&lt;P&gt;                            fiscalyear IN s_year AND&lt;/P&gt;&lt;P&gt;                            comp_code IN compcode AND&lt;/P&gt;&lt;P&gt;                            acct_nbr IN gl_accts.&lt;/P&gt;&lt;P&gt;  ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;YVW40 is a custom table for GL Extract.&lt;/P&gt;&lt;P&gt;The delete statement was not working properly hence i added COMMIT WORK statement after DELETE statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is, after adding COMMIT WORK, i am getting dump sometimes and sometimes there is no dump.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can somebody suggest the reason why this is happening and how to rectIfy the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt; Balu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2009 05:35:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-query/m-p/5640518#M1283795</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-21T05:35:01Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with select query.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-query/m-p/5640519#M1283796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try to use commit after endselect.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2009 05:45:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-query/m-p/5640519#M1283796</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2009-05-21T05:45:07Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with select query.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-query/m-p/5640520#M1283797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi balu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before a database commit the system expects that all the database selections are complete.&lt;/P&gt;&lt;P&gt;So if we write a commit in between select and endselect the system throws a dump saying that the selection isnt yet complete and that there is an interruption in the select.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So  do a commit. after the endselect statement .&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;Vidya Chowdhary A.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2009 05:55:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-query/m-p/5640520#M1283797</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-21T05:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with select query.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-query/m-p/5640521#M1283798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi balu ,&lt;/P&gt;&lt;P&gt;  As Vidya has said the the select statement should get completed before the commit . U can use the below logic .&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Data: IT_YVW40 type standard table of YVW40.
REFRESH it_yvw40[].
SELECT  *  
    FROM yvw40  
    INTO TABLE            it_yvw40
    WHERE period         IN s_month AND
                 fiscalyear    IN s_year AND
                 comp_code  IN compcode AND
                 acct_nbr      IN gl_accts.. 
IF sy-subrc EQ 0.
    DELETE FROM yvw40 FROM TABLE it_yvw40.
    IF sy-subrc NE 0.
        MESSAGE 'Unable to delete the Records' TYPE 'E'.
    ENDIF
ENDIF&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps &lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Arun Thiyagarajan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2009 06:29:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-query/m-p/5640521#M1283798</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-21T06:29:02Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with select query.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-query/m-p/5640522#M1283799</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;  1. I am not able to understand why you have used Delete from YVW40 statment inside Select and End select . This will not satisfy ur need.&lt;/P&gt;&lt;P&gt;2. Instead you can directly  use delete from YVW40,  after delete just do a commit work &lt;/P&gt;&lt;P&gt;3. perfomance wise this will be much better&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2009 06:29:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-query/m-p/5640522#M1283799</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-21T06:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with select query.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-query/m-p/5640523#M1283800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for ur responses.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know the query is not appropriate.&lt;/P&gt;&lt;P&gt;But the program was written long back, may in 1999 i suppose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The requirement was to change another Select query in the same program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While testing i found the above mentioned problem, i am just trying to fix it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt; Balu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2009 06:41:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-query/m-p/5640523#M1283800</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-21T06:41:48Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with select query.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-query/m-p/5640524#M1283801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Balu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Debugging mode if you enter into SELECT ...... ENDSELECT sometimes it will go to dump. Try to write SELECT single or UPTO one row. Avoid SELECT ...... ENDSELECT. You can check it out by putting break point before and after the loop. it wont go to dump.&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;Subrahmanyam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2009 09:26:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-query/m-p/5640524#M1283801</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-21T09:26:36Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with select query.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-query/m-p/5640525#M1283802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for all the replies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I placed the commit work outside the Select.... End Select and there is dump now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt; Balu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2009 10:02:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-query/m-p/5640525#M1283802</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-21T10:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with select query.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-query/m-p/5640526#M1283803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It may "work" now, but it makes no sense at all. You might want to rethink the process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2009 13:13:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-query/m-p/5640526#M1283803</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-21T13:13:30Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with select query.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-query/m-p/5640527#M1283804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
    DELETE   FROM yvw40  
                    WHERE period IN s_month AND
                    fiscalyear          IN s_year AND
                    comp_code        IN compcode AND
                    acct_nbr            IN gl_accts.. 
    IF sy-subrc NE 0.
        MESSAGE 'Unable to delete the Records' TYPE 'E'.
    ENDIF
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this would also work,... but it dangerous, it can happen that it delete the whole table, if the&lt;/P&gt;&lt;P&gt;ranges are empty!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it probably better to read the keys of the records which should be delete. But still your coding&lt;/P&gt;&lt;P&gt;can delete the whole table, just a bit slower than the coding above &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what is the use of a refresh on a just created table?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 May 2009 15:12:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-query/m-p/5640527#M1283804</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-22T15:12:02Z</dc:date>
    </item>
  </channel>
</rss>

