2006 Jul 06 10:01 AM
Hai All,
I want to schedule the multiple jobs at a time.
At the time of schedule i have to check prv job has completed or not. when prev job completed then only next job is to be run . Sothat there is no max load on the system i.e. one after one i have to execute in background. Please give the solution. I succeded to set multiple jobs in back ground but all jobs r executing at the same time which i don't want and which leads to more load on system. So i want to execute one after other by checking previous job has finifshed or not.
Regards
Prashanth
2006 Jul 06 10:03 AM
Hey,
You can create 1 job with multiple steps. 1st step will execute the 1st program, 2nd step will execute the 2nd program and so on.
Each step is started after the preceding step is completed.
-Kiran
*Please reward useful answers
Hai All,
I want to schedule the multiple jobs at a time.
At the time of schedule i have to check prv job has completed or not. when prev job completed then only next job is to be run . Sothat there is no max load on the system i.e. one after one i have to execute in background. Please give the solution. I succeded to set multiple jobs in back ground but all jobs r executing at the same time which i don't want and which leads to more load on system. So i want to execute one after other by checking previous job has finifshed or not.
Regards
Prashanth
2006 Jul 06 10:03 AM
Hey,
You can create 1 job with multiple steps. 1st step will execute the 1st program, 2nd step will execute the 2nd program and so on.
Each step is started after the preceding step is completed.
-Kiran
*Please reward useful answers
2006 Jul 06 10:33 AM
Hai,
Please give some example . How can i create step for each program.
Regards
Prashanth
2006 Jul 06 10:36 AM
here is a detailed explanation
http://help.sap.com/saphelp_nw04/helpdata/en/c4/3a7f05505211d189550000e829fbbd/content.htm
Regards,
Ravi
Note : Please mark all the helpful answers
2006 Jul 06 11:11 AM
After creating the 1st step. Click on Step button again. This will take you to the Step list overview. On this screen click Create to create the next step. Give the program and variant name. Similarly create the subsequent steps.
-Kiran
*Please reward useful answers
2006 Jul 06 3:53 PM
Hi,
Check the import parameters PRED_JOBCOUNT and PRED_JOBNAME in the function 'JOB_CLOSE'. You need to populate these values properly. For 2nd job you need to pass the job parameters of the 1st job, For 3rd job you need to pass the job parameters of the 2nd job and so on.
Also I would recommend using JOB_SUBMIT instead of the command SUBMIT.
Kiran
*Please mark useful answers
2006 Jul 06 10:07 AM
Hi prashanth,
1. Simple
use like below when writing code FOR SECOND JOB
where ;
jobname = 1st jobname
jobcount =1st job count
2.
*----
Data Declaration
DATA : eventparm LIKE tbtcjob-eventparm.
eventparm = jobname.
eventparm+32 = jobcount.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = jobcount_sen
jobname = jobname_sen
predjob_checkstat = ''
event_id = 'SAP_END_OF_JOB'
event_param = eventparm
*----
1. Important thing
2. FIRST CLOSE THE SECOND JOB. (Dependent Job)
THEN
CLOSE THE 1ST JOB.
regards,
amit .
2006 Jul 06 11:05 AM
Hi,
U can use fallowing funcation modules for background job by checking previous job has finished or not.
JOB_OPEN- Open Job Scheduling Without Dialog (Including COMMIT WORK)
JOB_SUBMIT-Insert Background Task in Background Request With COMMIT WORK
JOB_CLOSE - Close Background Request With COMMIT WORK
U can use the transactions SM36 and SM37
<b>Creating a Background Job (SM36).</b>
Press the Job Wizard button and step through the screens as follows:
Screen 1: Continue
Screen 2: Enter a name for your job. Continue.
Screen 3: Continue with ABAP Program Step selected
Screen 4: Enter the ABAP Program Name and variant name.
Press the Print Parameters button, specify the required printer and set the "Time of Print" to "Send to Print Spooler for now".
Press green tick
Continue
Screen 5: If more reports need to be added to the job tick the checkbox, press continue and repeat screens 3 and 4.
Screen 6: Select how the job is to scheduled (eg Date and Time)
Screen 7: Enter the required scheduling information ( eg Date and Time) and if required tick "Periodic Jobs"
Screen 8: If "Periodic Job" was selected select the frequency (eg Monthly)
Screen 9: Check the job details and press Complete
Back
<b>Viewing Background Jobs(SM37)</b>
From the main menu select System>Services>Jobs>Job Overview (transaction SM37).
Enter the required selection criteria and press Execute
To view the job log, tick the required job and press the "Job Log" button.
To view the output from the job, tick the required job and press the "Spool" button.
Regards,
Rajesh Yadla
| User | Count |
|---|---|
| 8 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |