<?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 Non-restartable Update Function Module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/non-restartable-update-function-module/m-p/8097002#M1615952</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm studying about the non restartable update function modules. Curiously, I created a simple non restartable update function module as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FUNCTION Z_UPDATE_MODULE.
*"----------------------------------------------------------------------
*"*"Update Function Module:
*"
*"*"Local Interface:
*"  IMPORTING
*"     VALUE(IMP_ZSCARR) TYPE  ZSCARR
*"----------------------------------------------------------------------

  INSERT zscarr FROM imp_zscarr.

  IF sy-subrc &amp;gt; 0.
    MESSAGE 'Problem at Z_UPDATE_MODULE' TYPE 'A'.
  ENDIF.
ENDFUNCTION.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I ran the module above by using imp_zscarr parameter with key fields which will make the INSERT operation fail due to the existing primary key in the destination table. As expected, I receive a message that the operation was not successful. Later, I deleted the row in the destination table whose key fields equal to the key fields in the imp_zscarr parameter I previously used. Then, I opened the transaction SM13 to see the update request table. There, as expected, I saw the previous update request which was marked as fail. Then, I selected the entry and then clicked the &lt;EM&gt;Repeat Update&lt;/EM&gt; button. Unexpectedly, since this was a 'non restartable update module', the repeated update was successful and a new row was entered to the destination table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Was there something wrong with my test method or this was all a normal behavior after all?&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;&lt;/P&gt;&lt;P&gt;Haris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 31 Jul 2011 13:31:42 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-07-31T13:31:42Z</dc:date>
    <item>
      <title>Non-restartable Update Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/non-restartable-update-function-module/m-p/8097002#M1615952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm studying about the non restartable update function modules. Curiously, I created a simple non restartable update function module as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FUNCTION Z_UPDATE_MODULE.
*"----------------------------------------------------------------------
*"*"Update Function Module:
*"
*"*"Local Interface:
*"  IMPORTING
*"     VALUE(IMP_ZSCARR) TYPE  ZSCARR
*"----------------------------------------------------------------------

  INSERT zscarr FROM imp_zscarr.

  IF sy-subrc &amp;gt; 0.
    MESSAGE 'Problem at Z_UPDATE_MODULE' TYPE 'A'.
  ENDIF.
ENDFUNCTION.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I ran the module above by using imp_zscarr parameter with key fields which will make the INSERT operation fail due to the existing primary key in the destination table. As expected, I receive a message that the operation was not successful. Later, I deleted the row in the destination table whose key fields equal to the key fields in the imp_zscarr parameter I previously used. Then, I opened the transaction SM13 to see the update request table. There, as expected, I saw the previous update request which was marked as fail. Then, I selected the entry and then clicked the &lt;EM&gt;Repeat Update&lt;/EM&gt; button. Unexpectedly, since this was a 'non restartable update module', the repeated update was successful and a new row was entered to the destination table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Was there something wrong with my test method or this was all a normal behavior after all?&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;&lt;/P&gt;&lt;P&gt;Haris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 31 Jul 2011 13:31:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/non-restartable-update-function-module/m-p/8097002#M1615952</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-31T13:31:42Z</dc:date>
    </item>
    <item>
      <title>Re: Non-restartable Update Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/non-restartable-update-function-module/m-p/8097003#M1615953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Haris,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I must admit I was surprised too (because I reproduced the same issue as yours, but I know standard no-restart function modules cannot be restarted), so I debugged SM13, and found you have to set at least one SAP lock to transmit to the update task, in that case you cannot restart the LUW.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Sandra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 31 Jul 2011 16:48:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/non-restartable-update-function-module/m-p/8097003#M1615953</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2011-07-31T16:48:24Z</dc:date>
    </item>
  </channel>
</rss>

