sgoupil
26th June 2009, 21:40
Hi all,

I was wondering if there is any global variable that hold the code of the job that started a session. I know we can use job.process to validate that the session was started by a job, but if it was, is there a variable or any other way to figure out which job started the session? Thanks.

This is with BaanIV c 4

mark_h
26th June 2009, 22:13
Can't you use ttaad5411m000 to see what was ran? I am sure there is a table behind it I just have not looked for it.

Hitesh Shah
27th June 2009, 19:29
ttaad512.cjob should give the value of the job.

sgoupil
30th June 2009, 17:51
But it does not help me. I don't want to know what was run, I want to be able to capture in my code which job started my session.

Weirdly there is a few variables, like job.report which give the report that the job will start and a few other ones like that, but nothing for the job code!!!

shah_bs
30th June 2009, 18:15
So, if you can explain why you need to know what job code started your session within your session, maybe it will help people to come up with a different solution.

steveauckly
30th June 2009, 19:28
you should be able to use:

if job.process then
import("ttaad501.cjob",curr.job)
endif

sgoupil
2nd July 2009, 16:45
Case closed.

Suggestion from steveauckly solved my problem, thanks.

Hitesh Shah
3rd July 2009, 16:16
May be original problem is solved . But for the benefit of others , one can also get the
current job with value of ttaad512.cjob current through out the program at hand (with
no need to import) .

Also if one needs the job code in a report run in job session one needs to import ttaad512.cjob.

In summary there are multiple alternatives for people to get the job and one can adopt
what one is comfortable with .