<?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: questions regarding update function module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/questions-regarding-update-function-module/m-p/10340162#M1837143</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jerry,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something we can get detailed information from system log(SM21), if any update termination yes, will be from SM13. Did you get the Workload monitoring report? are you facing when the system load is high or sometimes you are getting this issue, can you please reschedule the job in non-peak hours?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let us know the solutions if you resolved your issue, will be helpful for others.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vadamalai A&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Jun 2014 16:35:16 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2014-06-09T16:35:16Z</dc:date>
    <item>
      <title>questions regarding update function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/questions-regarding-update-function-module/m-p/10340160#M1837141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px; text-align: -webkit-auto;"&gt;Hello experts,&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px; text-align: -webkit-auto;"&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px; text-align: -webkit-auto;"&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px; text-align: -webkit-auto;"&gt;I am on customer site to help them investigate one issue: they have a background job which runs periodically.&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px; text-align: -webkit-auto;"&gt;In the report database table A is changed firstly ( new entries are inserted ), then a update function module is called via keyword CALL FUNCTION ... IN UPDATE TASK.&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px; text-align: -webkit-auto;"&gt;Inside the function module database table B is updated. ( existing entries are updated ) &lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px; text-align: -webkit-auto;"&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px; text-align: -webkit-auto;"&gt;&lt;/P&gt;&lt;H1 style="color: #000000; font-family: Tahoma; font-size: 16px; text-align: -webkit-auto;"&gt;Customer issue: &lt;/H1&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px; text-align: -webkit-auto;"&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px; text-align: -webkit-auto;"&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI style="text-align: -webkit-auto;"&gt;sometimes they find A is updated as expected, however B remains unchanged at the same time. &lt;/LI&gt;&lt;LI style="text-align: -webkit-auto;"&gt;customer could not find exact steps to reproduce the issue. However the issue does exist there and occur from time to time.&lt;/LI&gt;&lt;LI style="text-align: -webkit-auto;"&gt;the issue could only be reproduced in their production system, but works perfectly well in dev &amp;amp; Q system. It is difficult to debug in their production system for trouble shooting.&lt;/LI&gt;&lt;/UL&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px; text-align: -webkit-auto;"&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px; text-align: -webkit-auto;"&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px; text-align: -webkit-auto;"&gt;After analyzing related code, I have one doubt: according to ABAP help on CALL FUNCTION aaa IN UPDATE TASK, I know the function module aaa is called in a new update work process. I wonder whether there is any possibility there this issue might be caused because the update function module fails to get called at all? ( perhaps due to heavy system load so no free update function module could serve the table B update ? ) &lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px; text-align: -webkit-auto;"&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px; text-align: -webkit-auto;"&gt;If update function module fails to execute, is there any system utility to record this? That is to say, will it be recorded in such as SM13 or SM21?&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px; text-align: -webkit-auto;"&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px; text-align: -webkit-auto;"&gt;Looking forward to your expertise on this topic!&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px; text-align: -webkit-auto;"&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px; text-align: -webkit-auto;"&gt;Best regards,&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px; text-align: -webkit-auto;"&gt;Jerry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2014 12:43:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/questions-regarding-update-function-module/m-p/10340160#M1837141</guid>
      <dc:creator>JerryWang</dc:creator>
      <dc:date>2014-06-09T12:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: questions regarding update function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/questions-regarding-update-function-module/m-p/10340161#M1837142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jerry,&lt;/P&gt;&lt;P&gt;It sounds like a typical COMMIT WORK timing issue (or a missing commit in that case?).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding you question, update tasks are always triggered after commit work is executed. I have never run into "not executed" update task. As you stated, queued/failed update requests can be monitored in SM13.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why not both DB updates are executed in update task?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2014 14:36:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/questions-regarding-update-function-module/m-p/10340161#M1837142</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-06-09T14:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: questions regarding update function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/questions-regarding-update-function-module/m-p/10340162#M1837143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jerry,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something we can get detailed information from system log(SM21), if any update termination yes, will be from SM13. Did you get the Workload monitoring report? are you facing when the system load is high or sometimes you are getting this issue, can you please reschedule the job in non-peak hours?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let us know the solutions if you resolved your issue, will be helpful for others.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vadamalai A&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2014 16:35:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/questions-regarding-update-function-module/m-p/10340162#M1837143</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-06-09T16:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: questions regarding update function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/questions-regarding-update-function-module/m-p/10340163#M1837144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jerry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have commit work in the report under certain clauses...? Secondly you should be able to find errored one etc in SM13. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please provide commit work details if any&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nabheet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2014 17:51:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/questions-regarding-update-function-module/m-p/10340163#M1837144</guid>
      <dc:creator>nabheetscn</dc:creator>
      <dc:date>2014-06-09T17:51:25Z</dc:date>
    </item>
    <item>
      <title>Re: questions regarding update function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/questions-regarding-update-function-module/m-p/10340164#M1837145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Shai,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you very much for your reply. I can ensure there is no missing COMMIT WORK AND WAIT.&lt;/P&gt;&lt;P&gt;After the line 321 is executed, the update function module is called which update database table B.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/471196" width="450" /&gt;&lt;/P&gt;&lt;P&gt;Since this behavior( table A is updated in normal work process, and table B is updated in update work process ) is implemented in SAP standard function module CMS_LO_DOC_MAINTAIN, for me I don't know why the original design of SAP did not choose to put both table into the same update task.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/471200" width="450" /&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Jerry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jun 2014 02:10:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/questions-regarding-update-function-module/m-p/10340164#M1837145</guid>
      <dc:creator>JerryWang</dc:creator>
      <dc:date>2014-06-10T02:10:18Z</dc:date>
    </item>
    <item>
      <title>Re: questions regarding update function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/questions-regarding-update-function-module/m-p/10340165#M1837146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Vadamalai,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for your help. I promise once I have found the root cause, will post it here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Jerry &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jun 2014 02:11:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/questions-regarding-update-function-module/m-p/10340165#M1837146</guid>
      <dc:creator>JerryWang</dc:creator>
      <dc:date>2014-06-10T02:11:51Z</dc:date>
    </item>
    <item>
      <title>Re: questions regarding update function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/questions-regarding-update-function-module/m-p/10340166#M1837147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Nabheet,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The normal processing is described as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;entry point is function call of CMS_LO_DOC_MAINTAIN, which has iv_commit set as abap_true.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/471201" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then in line 54 table A is updated.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/471207" width="450" /&gt;&lt;/P&gt;&lt;P&gt;Update task is called here: ( callstack 18 )&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/471208" width="450" /&gt;&lt;/P&gt;&lt;P&gt;commit work called in callstack 13:&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/471209" width="450" /&gt;&lt;/P&gt;&lt;P&gt;click F6, the update function module will be in debugging mode in another update work process:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/471210" width="450" /&gt;&lt;/P&gt;&lt;P&gt;In my opinion, I could not find any place where the iv_commit is overwritten to abap_false, so I would assume there is always COMMIT WORK AND WAIT in callstack 13.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Jerry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jun 2014 02:35:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/questions-regarding-update-function-module/m-p/10340166#M1837147</guid>
      <dc:creator>JerryWang</dc:creator>
      <dc:date>2014-06-10T02:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: questions regarding update function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/questions-regarding-update-function-module/m-p/10340167#M1837148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi jerry,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;whether commit work is executing first and then you are calling the update function module?????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If a COMMIT WORK statement is not executed&lt;/STRONG&gt; after registration of a function module during execution of the current program, &lt;SPAN style="text-decoration: underline;"&gt;the function module is not executed and is deleted from table VBLOG at the end of the program.............&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jun 2014 05:33:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/questions-regarding-update-function-module/m-p/10340167#M1837148</guid>
      <dc:creator>yogesh_sharma2789</dc:creator>
      <dc:date>2014-06-10T05:33:10Z</dc:date>
    </item>
    <item>
      <title>Re: questions regarding update function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/questions-regarding-update-function-module/m-p/10340168#M1837149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Yogesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your answer. From my screenshot above I ensure that the update function module is called, and then COMMIT WORK AND WAIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Jerry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jun 2014 06:53:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/questions-regarding-update-function-module/m-p/10340168#M1837149</guid>
      <dc:creator>JerryWang</dc:creator>
      <dc:date>2014-06-10T06:53:57Z</dc:date>
    </item>
    <item>
      <title>Re: questions regarding update function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/questions-regarding-update-function-module/m-p/10340169#M1837150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jerry,&lt;/P&gt;&lt;P&gt;Two things:&lt;/P&gt;&lt;P&gt;1. Are you sure that COMMIT WORK is always executed?&lt;/P&gt;&lt;P&gt;As far as I've seen, FM CMS_LO_DOC_MAINTAIN_IL is being called from tens of programs.&lt;/P&gt;&lt;P&gt;2. FM CMS_LO_STATUS_UPDATE_DB is being called in update task, as you stated. However, I'm not sure that the preapre step&amp;nbsp; (CMS_LO_STATUS_PREPARE_UPD_DB) is.&lt;/P&gt;&lt;P&gt;If this preapre step relies on previous DB updates (without commit work and wait), it might return incorrect results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Shai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jun 2014 08:12:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/questions-regarding-update-function-module/m-p/10340169#M1837150</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-06-10T08:12:44Z</dc:date>
    </item>
    <item>
      <title>Re: questions regarding update function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/questions-regarding-update-function-module/m-p/10340170#M1837151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you so much for your answers and interests on this issue so far. Your answers are really helpful. I have also discussed with our German experts. This issue occurs in SAP CRM CMS ( Channel Management Solution ). I have not yet managed to find the CMS architect to check why the original design behaves like this( not to put both table update into the update function modules ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We came into conclusion that this issue might be caused either the update FM is not called at all, or some exception occurred during the call. I have listed four possibilities why it could happen to my colleagues. I also pasted them here in case you are interested. I think it could take some time before we can find the root cause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Jerry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/472675" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/472697" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/472699" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/472700" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jun 2014 10:47:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/questions-regarding-update-function-module/m-p/10340170#M1837151</guid>
      <dc:creator>JerryWang</dc:creator>
      <dc:date>2014-06-11T10:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: questions regarding update function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/questions-regarding-update-function-module/m-p/10340171#M1837152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jerry,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please try using 'Commit work and Wait' statement after each updation of database table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Pratima.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jun 2014 06:17:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/questions-regarding-update-function-module/m-p/10340171#M1837152</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-06-12T06:17:25Z</dc:date>
    </item>
    <item>
      <title>Re: questions regarding update function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/questions-regarding-update-function-module/m-p/10340172#M1837153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 16px;"&gt;&lt;SPAN style="font-size: 14pt;"&gt;Hello friends,&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 16px;"&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 16px;"&gt;&lt;SPAN style="font-size: 14pt;"&gt;Thanks a lot for your interests on this issue. I update all my findings:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 16px;"&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px;"&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;SPAN style="color: #575757; font-family: arial, helvetica, sans-serif;"&gt;1. issue background: this issue occurs in SAP CRM Channel manageement Solution, software component &lt;/SPAN&gt;&lt;SPAN style="color: #575757; font-family: arial, helvetica, sans-serif;"&gt;CRM-CHM-POS.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px;"&gt;&lt;SPAN style="color: #575757; font-family: arial, helvetica, sans-serif; font-size: 14pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px;"&gt;&lt;SPAN style="color: #575757; font-family: arial, helvetica, sans-serif; font-size: 14pt;"&gt;2. due to some limitations, the table CMSD_CI_HISTORY and history table are not updated in the same LUW. Instead the first one is updated in normal work process while the other is done in update work process. Since I am not the original developer I didn't know the whole complex scenario ( I did see this is done delibrately in note 1764006 - CMS:Sell In Release creating PB with zero available quantity ).&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px;"&gt;&lt;SPAN style="color: #575757; font-family: arial, helvetica, sans-serif; font-size: 14pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px;"&gt;&lt;SPAN style="color: #575757; font-family: arial, helvetica, sans-serif; font-size: 14pt;"&gt;So for the moment we have to accept this design.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px;"&gt;&lt;SPAN style="color: #575757; font-family: arial, helvetica, sans-serif; font-size: 14pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px;"&gt;&lt;SPAN style="color: #575757; font-family: arial, helvetica, sans-serif; font-size: 14pt;"&gt;3. during our testing ,we ensure COMMIT WORK is always called.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px;"&gt;&lt;SPAN style="color: #575757; font-family: arial, helvetica, sans-serif; font-size: 14pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px;"&gt;&lt;SPAN style="color: #575757; font-family: arial, helvetica, sans-serif; font-size: 14pt;"&gt;4. So why sometimes the first table update fails, however there is no hint at all for this failure in the system like ST22 and SM21 ?? ( forget SM13, since it is updated in normal work process ).&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px;"&gt;&lt;SPAN style="color: #575757; font-family: arial, helvetica, sans-serif; font-size: 14pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px;"&gt;&lt;SPAN style="color: #575757; font-family: arial, helvetica, sans-serif; font-size: 14pt;"&gt;The root cause is the flaw of SAP code below.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px;"&gt;&lt;SPAN style="color: #575757; font-family: arial, helvetica, sans-serif; font-size: 14pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px;"&gt;&lt;SPAN style="color: #575757; font-family: arial, helvetica, sans-serif; font-size: 14pt;"&gt;The code has planned to raise exception if insertion failed due to duplicate records to be inserted. &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px;"&gt;&lt;SPAN style="color: #575757; font-family: arial, helvetica, sans-serif; font-size: 14pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px;"&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px;"&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/479092" width="450" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px;"&gt;&lt;SPAN style="font-size: 14pt;"&gt;Unfortunately, the fact is if we use "INSERT db FROM TABLE xxx" to insert records into database and some record already exists with the same key, it will result in a termination but SY-SUBRC is STILL 0; Just compare it with single insertion using "INSERT db FROM &amp;lt;work area&amp;gt;", in the same error situation, processing does not terminate, and SY-SUBRC is set to 4.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px;"&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px;"&gt;&lt;SPAN style="font-size: 14pt;"&gt;As a result in this case even the insertion fails, line 29 will never be executed as sy-subrc is always 0. Since the insertion fails and the exception is caught without any notification, so customer sufferred because they do not know what has happened.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px;"&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px;"&gt;&lt;SPAN style="font-size: 14pt;"&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px;"&gt;&lt;SPAN style="font-size: 14pt;"&gt;Jerry&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px;"&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px;"&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px;"&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px;"&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px; text-align: -webkit-auto;"&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px;"&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Tahoma; font-size: 16px;"&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jun 2014 06:52:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/questions-regarding-update-function-module/m-p/10340172#M1837153</guid>
      <dc:creator>JerryWang</dc:creator>
      <dc:date>2014-06-19T06:52:08Z</dc:date>
    </item>
  </channel>
</rss>

