Skip to Content
avatar image
Former Member

SY-SUBRC

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Aug 17, 2007 at 04: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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 17, 2007 at 04: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.

    Add comment
    10|10000 characters needed characters exceeded