‎2011 Sep 02 10:32 AM
Hi Experts,
Is there any way to find out whether the code being executed is called in update task.
There is a subroutine which is dynamically called in a standard program. This subroutine call is sometimes with update task and sometimes without it. I need to avoid a particular piece of code if the subroutine is called in update task.
Please suggest.
Warm Regards,
Sushant singh
‎2011 Sep 02 10:40 AM
Call method CL_SYSTEM_TRANSACTION_STATE=>GET_IN_UPDATE_TASK( ). It returns 1 if in update task or 0 otherwise.
‎2011 Sep 02 10:40 AM
Call method CL_SYSTEM_TRANSACTION_STATE=>GET_IN_UPDATE_TASK( ). It returns 1 if in update task or 0 otherwise.
‎2011 Sep 02 10:45 AM
Hi,
Open the Class CL_SYSTEM_TRANSACTION_STATE in SE24 and Open the method GET_IN_UPDATE_TASK.
Put a break point in this method and start your standard program/tcode.
If it is running in UPDATE task it will return 1 else 0.
Regards,
Chandu
‎2011 Sep 02 10:46 AM
Hi Sushant,
You can check the variable SY-CPROG. If it contains 'RSM13000' (This is the report executes in update task and invokes any update module), you can trace the code is being executed in update task.
Thanks,
Mainak
‎2011 Sep 02 11:24 AM
Hi,
Put the breakpoint at particular position an excute program. In debugger, select menu Settings->display/change debugger settings->update debugging, if program uses update task then new session will be opened up.
Regards,
S.Senthilkumar.
‎2011 Sep 02 11:55 AM
Let me guess, you shall not send a message or a dynpro in update task?
If you are in update task sy-batch is NOT initial. when you are at it, check sy-binpt = initial as well.