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

Indicator when in update task

h_senden2
Active Contributor
0 Likes
5,976

Hi guys,

is there a way to determine whether a process is in update task ? Simular to SY-BATCH, but for in update task. I haven't seen something like that.

I have a problem in update task where a screen is called, and it is causing a dump.

regards,

Hans

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,752

*Am I running in a update process?

CALL FUNCTION 'TH_IN_UPDATE_TASK'

IMPORTING

in_update_task = lv_update_process.

Regards,

Thomas

8 REPLIES 8
Read only

Former Member
0 Likes
2,752

Hi,

check

SY-UCOMM = 'BU'

pankaj

Read only

0 Likes
2,752

Hi Pankaj,

i dont think it's the solution. Because the sy-ucomm is depending on the program. 'BU' means sometimes buchen in german (or save). And i must call the screen after sy-ucomm=BU for online programs.

Hans

Read only

0 Likes
2,752

Anyone a suggestion ?

Read only

Former Member
0 Likes
2,752

Hi hans,

1. i just tested one case.

2. If we call a FM, in update task,

<b> then the system variable SY-CPROG

will have the value

RSM13000</b>

(since it is called by some system program)

3. If we call this fm in normal mode thru some program,

sy-cprog will have the program name.

4. If we call this fm thru SE37,

then sy-cprog will contain

RS_TESTFRAME_CALL.

regards,

amit m.

Read only

Former Member
0 Likes
2,752

Hi again,

<b>1. SY-CALLD</b>

2. it will be 'X' if fm is called directly.

3. It will be blank, if called in update task.

regards,

amit m.

Read only

Former Member
0 Likes
2,753

*Am I running in a update process?

CALL FUNCTION 'TH_IN_UPDATE_TASK'

IMPORTING

in_update_task = lv_update_process.

Regards,

Thomas

Read only

0 Likes
2,752

Hi Hans,

What is the answer finally & how?

Thanks

Dan

Read only

0 Likes
2,752

Hi Dan,

the solution was function module TH_IN_UPDATE_TASK

Hans