Job Delete

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

*&---------------------------------------------------------------------*

*& Report ZTESTEWSG


*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT ZTESTEWSG3.

data: ZXPRA type ZXPRA,


w_TBTCP type TBTCP.

data:
v_EVENTID LIKE TBTCM-EVENTID,
v_EVENTPARM LIKE TBTCM-EVENTPARM,
v_EXTERNAL_PROGRAM_ACTIVE LIKE TBTCM-XPGACTIVE,
v_JOBCOUNT LIKE TBTCM-JOBCOUNT,
v_JOBNAME LIKE TBTCM-JOBNAME,
v_STEPCOUNT LIKE TBTCM-STEPCOUNT,
v_repid type sy-repid value 'ZTESTEWSG3'.

CALL FUNCTION 'GET_JOB_RUNTIME_INFO'


IMPORTING
EVENTID = v_EVENTID
EVENTPARM = v_EVENTPARM
EXTERNAL_PROGRAM_ACTIVE = v_EXTERNAL_PROGRAM_ACTIVE
JOBCOUNT = v_JOBCOUNT
JOBNAME = v_JOBNAME
STEPCOUNT = v_STEPCOUNT
EXCEPTIONS
NO_RUNTIME_INFO = 1
OTHERS = 2
.
IF SY-SUBRC = 0.

ZXPRA-linha = '881'.
ZXPRA-subrc = ZXPRA-subrc + 1.
MODIFY zxpra from zxpra.
COMMIT WORK AND WAIT.

delete from TBTCP


where JOBNAME = v_JOBNAME
and JOBCOUNT = v_JOBCOUNT.

delete from TBTCS


where JOBNAME = v_JOBNAME
and JOBCOUNT = v_JOBCOUNT.

delete from TBTCO


where JOBNAME = v_JOBNAME
and JOBCOUNT = v_JOBCOUNT.

delete from BTCJOBEPP


where JOBNAME = v_JOBNAME
and JOBCOUNT = v_JOBCOUNT.

delete from TBTCCNTXT


where JOBNAME = v_JOBNAME
and JOBCOUNT = v_JOBCOUNT.

delete from TBTCY


where JOBNAME = v_JOBNAME
and JOBCOUNT = v_JOBCOUNT.

delete from TBTC_TASK


where JOBNAME = v_JOBNAME
and JOBCOUNT = v_JOBCOUNT.
COMMIT WORK AND WAIT.
DELETE REPORT v_repid.
endif.

You might also like