2007 Sep 24 4:13 PM
Hi Experts.!
Please.! Help me.! I need to create a JOB, this have to run a report Z by salesman and send him by mail his respective information every weekend..
I don't know about the JOB, if some body can help me, with a link, manual, or the basic step and tx that I have to use..
Thanks, Regards,
Gustavo Gil
2007 Sep 24 5:28 PM
hi,
In SM36,
1. give Job name
2. click Step
3. specify program name and variant
4. check and save
5. back to the front screen of sm36
6. click save button
7. now click Start condition
8. click Date/Time
9. clikc Period values
8. clikc Daily
9. click save button
10. set the scheduled start date and start time
11. The job will execute daily at the start time
12. Save to release the job
13. verify the job in SM37
<b><REMOVED BY MODERATOR></b>
Regards
Siva
Message was edited by:
Alvaro Tejada Galindo
hi,
In SM36,
1. give Job name
2. click Step
3. specify program name and variant
4. check and save
5. back to the front screen of sm36
6. click save button
7. now click Start condition
8. click Date/Time
9. clikc Period values
8. clikc Daily
9. click save button
10. set the scheduled start date and start time
11. The job will execute daily at the start time
12. Save to release the job
13. verify the job in SM37
<b><REMOVED BY MODERATOR></b>
Regards
Siva
Message was edited by:
Alvaro Tejada Galindo
2007 Sep 24 4:35 PM
Hi,
There are two ways for you to handle,
one manually setting up the job through SM36 which is better and convinient,
secondly through program using FM's JOB_OPEN, SUBMIT, JOB_CLOSE.
Find below steps in doing both:
Procedure 1:
1. Goto Trans -> SM36
2. Define a job with the program and variant if any
3. Click on start condition in application tool bar
4. In the pop-up window, click on Date/Time
5. Below you can see a check box "Periodic Job"
6. Next click on Period Values
7. Save the job
Procedure 2 via Program:
Below is a sample code for the same. Note the ZTEMP2 is the program i am scheduling with 15mins frequency.
DATA: P_JOBCNT LIKE TBTCJOB-JOBCOUNT,
L_RELEASE(1) TYPE c.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
JOBNAME = 'ZTEMP2'
IMPORTING
JOBCOUNT = P_JOBCNT
EXCEPTIONS
CANT_CREATE_JOB = 1
INVALID_JOB_DATA = 2
JOBNAME_MISSING = 3
OTHERS = 4.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
SUBMIT ZTEMP2 VIA JOB 'ZTEMP2' NUMBER P_JOBCNT
TO SAP-SPOOL WITHOUT SPOOL DYNPRO
WITH DESTINATION = 'HPMISPRT'
WITH IMMEDIATELY = SPACE
WITH KEEP_IN_SPOOL = 'X' AND RETURN.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
JOBCOUNT = P_JOBCNT
JOBNAME = 'ZTEMP2'
STRTIMMED = 'X'
PRDMINS = 15
IMPORTING
JOB_WAS_RELEASED = L_RELEASE
EXCEPTIONS
CANT_START_IMMEDIATE = 1
INVALID_STARTDATE = 2
JOBNAME_MISSING = 3
JOB_CLOSE_FAILED = 4
JOB_NOSTEPS = 5
JOB_NOTEX = 6
LOCK_FAILED = 7
INVALID_TARGET = 8
OTHERS = 9.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Hope the above helps you.
Thanks
Seshu
2007 Sep 24 5:28 PM
hi,
In SM36,
1. give Job name
2. click Step
3. specify program name and variant
4. check and save
5. back to the front screen of sm36
6. click save button
7. now click Start condition
8. click Date/Time
9. clikc Period values
8. clikc Daily
9. click save button
10. set the scheduled start date and start time
11. The job will execute daily at the start time
12. Save to release the job
13. verify the job in SM37
<b><REMOVED BY MODERATOR></b>
Regards
Siva
Message was edited by:
Alvaro Tejada Galindo
2007 Sep 24 5:30 PM
Hi,
Go thru this Link & Forum,
http://help.sap.com/saphelp_nw04/helpdata/en/fa/096d40543b11d1898e0000e8322d00/frameset.htm
Regards,
Padmam.
2007 Sep 26 8:45 PM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |