Check if running in update task

Check if running in update task

Several possibilities.

Use FM TH_IN_UPDATE_TASK:


  DATA : lv_in_updtask TYPE sy-subrc.

  CALL FUNCTION 'TH_IN_UPDATE_TASK' 
    IMPORTING in_update_task = lv_in_updtask. 

  " lv_in_updtask = 1 if running in update task, 
  " else, lv_in_updtask = 0.

Use class CL_SYSTEM_TRANSACTION_STATE:


  IF CL_SYSTEM_TRANSACTION_STATE=>GET_IN_UPDATE_TASK( ) EQ 0 .
   " Code when not running in update task... 
  ENDIF.

Search tag: update process

About the author

fjourneau administrator

Hi, I'm Florian Journeau, SAP ABAP R3 Freelance, based in Toulouse, France. You want to know more about me, have a look on my CV : cv.fjourneau.net.

Leave a Reply