Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

SY-SUBRC

Former Member
0 Kudos

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.

2 REPLIES 2

kiran_k8
Active Contributor
0 Kudos

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

former_member223537
Active Contributor
0 Kudos

*----


  • 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.