Skip to Content
avatar image
Former Member

Back ground

Hi experts,

I had sceheduled four y programs in sequence after triggering event. But those programs are not doing as per coding so I want to check in which program sy-subrc is failing and I want to execute the event separately in sm64 and I want to check the status of sy-subrc in sm37. Is it possible to see sy-subrc values for each progam in sm37. If so please tell me how to proceed and how to check.

Thanks a lot to all.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Aug 17, 2007 at 04:54 AM

    You can check the value using this FM

    *----


    • 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