08-17-2007 5:42 AM
hI,
Can we check the sy-subrc values related to the program which we ran in back ground after job is completed. Please help me.
Thanks.
08-17-2007 5:48 AM
Babji,
Check these tables related to Background jobs:-
TBTCP and TBTCO.Hope this may give you some lead.
K.Kiran.
Message was edited by:
Kiran K
08-17-2007 5:48 AM
*----
To Display the STATUS of the JOB which is exectued in background
*----
CLEAR : wa_jobsteplist.
REFRESH : i_jobsteplist.
WRITE:/ text-055. " 'DISPLAYING JOB STATUS'
CALL FUNCTION 'BP_JOB_READ'
EXPORTING
job_read_jobcount = w_jobcount
job_read_jobname = w_jobname
job_read_opcode = '20'
IMPORTING
job_read_jobhead = wa_jobhead
TABLES
job_read_steplist = i_jobsteplist
EXCEPTIONS
invalid_opcode = 1
job_doesnt_exist = 2
job_doesnt_have_steps = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
*----
To Display the status text as per the status type
*----
CASE wa_jobhead-status.
WHEN 'S'. WRITE: / text-006. "'Scheduled'.
WHEN 'R'. WRITE: / text-007. "'Released'.
WHEN 'F'. WRITE: / text-008. "'Completed'.
WHEN 'A'. WRITE: / text-009. "'Cancelled'.
WHEN OTHERS.
ENDCASE.