Ansicht
Dokumentation

05618 - ABAP query

05618 - ABAP query

RFUMSV00 - Advance Return for Tax on Sales/Purchases   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.
SAP E-Book

ABAP query

Hi, group.

I have a custom-written ABAP that is performing a function where the
program should not be allowed to run parallel to itself. In other words, I
start the job ABC and it starts running in a BTC process. Another user
starts the same job and it should WAIT for the first job to finish before
continuing. I don't want to STOP the second job, but it must simply WAIT
until the first job is complete.

I have written the program to check the contents of table TBTCO as the
first step. If I find the jobname in an active state then I wait 30 seconds
and check again. I do this repeatedly until I don't find the job with an
active status, at which point I exit the loop and continue with the
processing. This method seems to cause problems, though. I find 4 or 5 jobs
waiting, but they seem to be holding up the first job that was started, so
we end up in a dead-end situation. I have to end all the subsequent jobs to
allow the first one to complete and then manually start the secondary jobs
again.

Can someone please suggest a way of getting around this?

Thanks and regards,

Des Olwage
Snr. Systems Administrator
Goodyear South Africa
Tel. +27 41 5055441
Cell. +27 82 824 6900



Durban Tours - Südafrika Safari

General Material Data   General Material Data  
This documentation is copyright by SAP AG.

Length: 1650 Date: 20240418 Time: 144749     sap01-206 ( 2 ms )