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

Update task

Former Member
0 Likes
1,450

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

1 ACCEPTED SOLUTION
Read only

arseni_gallardo
Active Participant
0 Likes
1,357

Call method CL_SYSTEM_TRANSACTION_STATE=>GET_IN_UPDATE_TASK( ). It returns 1 if in update task or 0 otherwise.

5 REPLIES 5
Read only

arseni_gallardo
Active Participant
0 Likes
1,358

Call method CL_SYSTEM_TRANSACTION_STATE=>GET_IN_UPDATE_TASK( ). It returns 1 if in update task or 0 otherwise.

Read only

Former Member
0 Likes
1,357

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

Read only

former_member224404
Active Participant
0 Likes
1,357

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

Read only

Former Member
0 Likes
1,357

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.

Read only

Former Member
0 Likes
1,357

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.