on 11-23-2004 12:55 PM
I scheduled a job which runs every 15 mins in the the background to fetch data from an external system,depending on the data volume ,the program can sometimes run for over 15 minutes.To avoid data conflict I used a function module ENQUEUE_ES_PROG on the program to first check if the job started is still running before another job gets kicked.The problem I have is the fact that this function module does not seem to work in the background but in the looks perfect in foreground. Does anyone have a clue on how to use this FM for background job?
Hi,
Instead, why don't you query the table TBTCO for the jobname and status = 'R' for active job to be really sure.
This will work in foreground and background.
You are likely to have more than one background process on the app server so this will safeguard against that.
Kind regards
colin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you have any implicit or explicit COMMITs in your program, all locks will be released. HTH
Ramki.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mochabo,
What do you mean that it does not work in background. What error did you get. What are the parameters you pass to this function module.
This function looks the same as all other enqueue functions. Enqueue works in background.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Mochabo,
Consider the following scenario:
Your job is running for more than 15 minutes. Since it is running in the background, it will be executed by a work-process of type BACKGROUND. If there's only one BACKGROUND work process configured for your application server, then the second job will have to be waiting till the first one finishes and releases the background work process.
But when you are executing this in the foreground, the DIALOG work-process does the processing. So you are not finding any problem.
So, to my knowledge, there will be a problem when there's only one BACKGROUND work process. Please go to transaction SM50 and see how many of them are configured for the current application server.
Also, in case there's only one BACKGROUND work-process, you will not have toworry that the second job will start before the first has finished. It simply can't. It has got to wait.
Hope this explanation helps.
Regards,
Anand Mandalika.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.