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

Getting Job ID within job.

I am trying to solve an isue we are havin when a job is run in the background. The problem is that we are running five of the same job in the background. The job consists of one program which does some calcultions and then calls another program. The two programs pass information to one another using memmory. This works fine when only one of the pogram is run, but when multiples are run we are finding that the data from one job is bing pulled into the other jobs.

What we would like to do is to assign the memory names with some sort of addition that would be unique to a particular job. IE. memorylocA_102848 wouldbe for job 102848 and then we could read memoryA_102848 in the called program and thus eliminate the problem of reading the same memory location.

The biggest issue is how to retrive the unique job ID number from within the program is runnung. Does anybody know how to do this?

Thanks!

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2008 at 04:58 PM

    Hello,

    You may want to try function module GET_JOB_RUNTIME_INFO

    which will return a jobcount which sems to be a job id of sorts.

    Regards

    Greg Kern

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 31, 2008 at 03:39 PM

    Hi John

    we have a system varialble sy-spono

    with this you might get the job id... give a try

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2008 at 03:48 PM

    I have looked through the SYST structure and have not found a field that has the job ID. SY-SPONO is the print ID. I need the job ID for a background job.

    The job IDs are stored in table TBTCO, but I have not determined a way to retreive it from within the job.

    Thanks!

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2008 at 05:04 PM

    That function is exactly what I needed. Thanks!

    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.