Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Non-restartable Update Function Module

Former Member
0 Likes
395

Dear experts,

I'm studying about the non restartable update function modules. Curiously, I created a simple non restartable update function module as follows:


FUNCTION Z_UPDATE_MODULE.
*"----------------------------------------------------------------------
*"*"Update Function Module:
*"
*"*"Local Interface:
*"  IMPORTING
*"     VALUE(IMP_ZSCARR) TYPE  ZSCARR
*"----------------------------------------------------------------------

  INSERT zscarr FROM imp_zscarr.

  IF sy-subrc > 0.
    MESSAGE 'Problem at Z_UPDATE_MODULE' TYPE 'A'.
  ENDIF.
ENDFUNCTION.

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 Repeat Update 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.

Was there something wrong with my test method or this was all a normal behavior after all?

Thanks in advance.

Regards,

Haris

1 ACCEPTED SOLUTION
Read only

Sandra_Rossi
Active Contributor
0 Likes
361

Hi Haris,

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.

BR

Sandra

1 REPLY 1
Read only

Sandra_Rossi
Active Contributor
0 Likes
362

Hi Haris,

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.

BR

Sandra