Skip to Content
author's profile photo Former Member
Former Member

Abap background job

Hi abapers,

I had a requirement to get the batch spool data.

Run rcatstco program as batch job and get the personnel numbers from errors(batch spool) and display them in all grid.

Can anyone give me an idea or help me with this?hw can I do this?

Moderator message: please do more research before posting, use meaningful subject lines when posting.

Message was edited by: Thomas Zloch

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Jul 07, 2012 at 05:29 AM

    Dear,

    You need to get the runtime job details. For that you can use FM GET_JOB_RUNTIME_INFO.

    CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
    IMPORTING
    EVENTID = GD_EVENTID
    EVENTPARM = GD_EVENTPARM
    EXTERNAL_PROGRAM_ACTIVE = GD_EXTERNAL_PROGRAM_ACTIVE
    JOBCOUNT = GD_JOBCOUNT
    JOBNAME = GD_JOBNAME
    STEPCOUNT = GD_STEPCOUNT
    EXCEPTIONS
    NO_RUNTIME_INFO = 1
    OTHERS = 2.

    Then you need to obtain the Spool ID from the table TBTCP

    SELECT * FROM TBTCP
    INTO TABLE IT_TBTCP
    WHERE JOBNAME = GD_JOBNAME
    AND JOBCOUNT = GD_JOBCOUNT
    AND STEPCOUNT = GD_STEPCOUNT
    AND LISTIDENT <> '0000000000'
    ORDER BY JOBNAME
    JOBCOUNT
    STEPCOUNT.

    READ TABLE IT_TBTCP INTO WA_TBTCP INDEX 1.
    IF SY-SUBRC = 0.
    MESSAGE S004(ZDD) WITH GD_SPOOL_NR.
    GD_SPOOL_NR = WA_TBTCP-LISTIDENT.
    MESSAGE S004(ZDD) WITH GD_SPOOL_NR.

    ENDIF

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.