on 09-04-2014 3:40 PM
Hello,
I have a job chain where in the first step is a ABAP-Job with different parameters (e.g. SAP-System) fifteen times.
In the prerunning action I rename the jobs like SAP-System + "_" + Jobname.
While the job chain is only scheduled I cannot differ the jobs. So it is difficult to identify a job who e.g. should be canceled one time.
Is it possible to change the job name when the job chain will be scheduled? Is there another possibility to differ the jobs without expanding the parameters?
Best regards
Dana
Hi Dana,
In the job monitor, you can use IntelliSearch to locate the specific job based on parameters :
p:ABAP_PROGRAM_NAME==rsusr007 p:ABAP_VARIANT_NAME==myVariant
Regards,
HP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I guess you can try writing a trigger for either Before Job Pre Running or the Before Job on Change to change the job name.
Thanks
Nanda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dana,
I assume it does not work because the Chained is the "first" status these jobs get.
So, use JobStatus.Scheduled as Gerben wrote, do
// Get an iterator over the steps of the job chain
for (Iterator it = jcsJob.getChildJobs(); it.hasNext();)
{
Job job = (Job) it.next();
// Get an iterator over the jobs of the job chain step
for (Iterator jt = job.getChildJobs(); jt.hasNext();)
{
Job j = (Job) jt.next();
//code here to set job name
}
}
Regards,
HP
Hello,
it works fine with the OnChange-action and the iterator.
But have always a little problem.
If I define the parameter in the job chain definition I can use
j.setDescription("C_" + j.getJobParameterByName("SAP_SYSTEM").getInValueString() + "_" + j.getDescription().substring(6))
for setting the specific name of the job chain.
But I want to set the parameter "SAP_SYSTEM" not in the definition but in the field "Input parameters". In this case j.getJobParameterByName("SAP_SYSTEM").getInValueString() is null.
Is it possible to use the input field value for the job chain name?
Best regards
Dana
PS: I hope it is not too confusing.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.