How to detect job completed - requesting sample code

Question:
Hello,
Does anyone have code to share on how to detect if a job running in the background is finished. Would this work if you manually run the program and then submit it to a background instead of scheduling it using SM36? If you have code to do this, could we have a sample of it just to get us started??
Thank you much
Answer:
You can use the FM BP_JOB_CHECKSTATE. Status value will be "F" if the job has finished.
Look at BP_JOB_* for related function modules. Sorry, I don't have any sample code.
_________________
Sudhi Karkada
Answer:
See the FM 'SHOW_JOBSTATE'.
Chaps.
Answer:
There is a working code sample in the online help, in the section about job management.
_________________
Remi
Answer:
PNOVDENX,
can u please post the working sample code?
TIA

More Articles:

User-exit in F110?
using MB_CREATE_GOODS_MOVEMENT?
why? who can explain in detail?
How can i set screen fields invisible?
Disabling slection parameters - 'greying them out'?
Report that display the routing by typing a material.?