<?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 Data base update concerns and capturing error messages? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-base-update-concerns-and-capturing-error-messages/m-p/6581615#M1434463</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;I have to update records to BW data to TABLE (Itu2019s a protected object and direct table update should not be a concern).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I   have to delete existing (where version = xxx) records in the table and then I have to insert the new records in the table.  &lt;/P&gt;&lt;P&gt;And if everything return code 0 then I have to commit otherwise I have to rollback all the changes in the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is - What is the good procedure to do this?&lt;/P&gt;&lt;P&gt;1. Currently I am using - &lt;/P&gt;&lt;P&gt;                    Delete from table.. where version = &lt;/P&gt;&lt;P&gt;                          if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;                    modify table  from table  lt_itab.&lt;/P&gt;&lt;P&gt;                            if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;                                  commit work&lt;/P&gt;&lt;P&gt;                            else.&lt;/P&gt;&lt;P&gt;                                  rollback work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. How to capture the error messages to my lt_message table on delete and modify statements if any errors occur?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot and I appreciate your response on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rajesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Feb 2010 16:27:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-02-04T16:27:04Z</dc:date>
    <item>
      <title>Data base update concerns and capturing error messages?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-base-update-concerns-and-capturing-error-messages/m-p/6581615#M1434463</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;I have to update records to BW data to TABLE (Itu2019s a protected object and direct table update should not be a concern).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I   have to delete existing (where version = xxx) records in the table and then I have to insert the new records in the table.  &lt;/P&gt;&lt;P&gt;And if everything return code 0 then I have to commit otherwise I have to rollback all the changes in the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is - What is the good procedure to do this?&lt;/P&gt;&lt;P&gt;1. Currently I am using - &lt;/P&gt;&lt;P&gt;                    Delete from table.. where version = &lt;/P&gt;&lt;P&gt;                          if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;                    modify table  from table  lt_itab.&lt;/P&gt;&lt;P&gt;                            if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;                                  commit work&lt;/P&gt;&lt;P&gt;                            else.&lt;/P&gt;&lt;P&gt;                                  rollback work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. How to capture the error messages to my lt_message table on delete and modify statements if any errors occur?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot and I appreciate your response on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rajesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Feb 2010 16:27:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-base-update-concerns-and-capturing-error-messages/m-p/6581615#M1434463</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-04T16:27:04Z</dc:date>
    </item>
    <item>
      <title>Re: Data base update concerns and capturing error messages?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-base-update-concerns-and-capturing-error-messages/m-p/6581616#M1434464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions on my issue?&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, 04 Feb 2010 19:31:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-base-update-concerns-and-capturing-error-messages/m-p/6581616#M1434464</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-04T19:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: Data base update concerns and capturing error messages?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-base-update-concerns-and-capturing-error-messages/m-p/6581617#M1434465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There will not be any messages from a direct update (or delete).  You would only have the possibility of a return code (sy-subrc).  And, the "modify table from table itab", will most likely never fail.  It will either create or update based on the table's key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are just trying to put error in some structure, if sy-subrc is not initial move the data to some variable or issue the message statment.  I cannot be more specific without knowing more of the structure of the program or programs involved.  If this part of a report, function module, etc. and are there formal parameters that are involved?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you give more details on the business process, that might help with getting a more detailed reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Feb 2010 20:02:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-base-update-concerns-and-capturing-error-messages/m-p/6581617#M1434465</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-04T20:02:40Z</dc:date>
    </item>
  </channel>
</rss>

