2011 Mar 17 6:24 PM
Hi
I have a program which runs in background every hour, so when the background job is active and if the same program is executed in foreground, i should throw an error in the selection screen.
Is there any table which has this information, one more thing, the status of the job should be active and not released that I should throw an error.
Pls respond.
Thanks
2011 Mar 17 6:47 PM
Hi,
You can do this be checking the table TBTCO with start date and Job status as 'R'.
Thanks,
Vikram.M
Hi,
You can do this be checking the table TBTCO with start date and Job status as 'R'.
Thanks,
Vikram.M
2011 Mar 17 6:47 PM
Hi,
You can do this be checking the table TBTCO with start date and Job status as 'R'.
Thanks,
Vikram.M
2011 Mar 17 7:28 PM
You have to use ENQUE and DEQUEUE function modules.
In INITIALIZATION event, add the following code:
CALL FUNCTION 'ENQUEUE_ESVARIANT'
EXPORTING
mandt = sy-mandt
report = g_repid "copy of SY-REPID
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
IF sy-subrc <> 0.
* Somehow display your error message here.
ENDIF.
In END-OF-SELECTION event, dequeue using the following code:
CALL FUNCTION 'DEQUEUE_ESVARIANT'
EXPORTING
mandt = sy-mandt
report = g_repid.
2011 Jun 02 8:39 AM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |