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

Batch program or not batch program

Former Member
0 Likes
550

Hello Experts,

I have a general question. How do I determine where a program was initiated from, whether in a part of a job or on-line.

I have a situation where a program can be part of a job and I want to prevent two concurrent instances of the program running here. Preventing two runs of a job, ie checking for duplicate jobs is easy, however, the same program can be instantiated on-line at the same time as the job and this run of the program should not be stopped.

Is there an attribute somewhere to determine where a program was started?

Regards

Dave

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
515

Hi...

Try using SY-BATCH to check Background processing of the Program...

Gaurav J.

3 REPLIES 3
Read only

Former Member
0 Likes
516

Hi...

Try using SY-BATCH to check Background processing of the Program...

Gaurav J.

Read only

Former Member
0 Likes
515

Hi,

Why dont u use sy-batch system variable to determine program from background.

regards,

suresh.

Read only

Former Member
0 Likes
515

To Differentiate a Online and Batch job , we have a system variable SY-BATCH using that we can find out.

if SY-BATCH = 'X' then it is Batch job. or else Online