2008 Jul 09 6:22 AM
Hi abapers,
I want to run a program in background using sm36 and sm37.But i am not aware of input in that tansaction.So kindly tell me the steps ho run a program in background.
Regards
Ansuman
Hi abapers,
I want to run a program in background using sm36 and sm37.But i am not aware of input in that tansaction.So kindly tell me the steps ho run a program in background.
Regards
Ansuman
2008 Jul 09 6:27 AM
Hi,
Its easy to schedule background job.
Go through following link.
http://help.sap.com/saphelp_nw04/helpdata/en/c4/3a7f87505211d189550000e829fbbd/content.htm
Regards,
SUDHIR MANJAREKAR
2008 Jul 09 6:30 AM
2008 Jul 09 6:31 AM
Way to run program in Backgroung mode :
se38-->)Write program name )->choose Tab "program" in menu bar -
2008 Jul 09 6:37 AM
hi,
Refer to the following link:
http://help.sap.com/saphelp_nw04/helpdata/en/73/69ef5755bb11d189680000e829fbbd/frameset.htm
reward if useful,
Thanks and regards
2008 Jul 09 6:38 AM
Hi,
Goto Tcode SM36, give the job name there and then click step at the top and then it will open another window, give the abap program name there and the variant and then click check and save.
Then click on start conditon, another window will open, if you want to release it immediate click immediate, then check and save.
You can go to tcode sm37 and check the status there.
REgards,
Ramesh.
2008 Jul 09 6:41 AM
Hi Ansuman Parhi,
by useing T-codes
First go to transaction SM36 to schedule the job.
When you enter the "Start condition" for job, do as follow.
Select processing by "Date/Time".
Enter date as current date.
Let us say you are scheduling this job today then give date 08/30/2007.
Check "periodic job" checkbox.
Hit "periodic value" button and select to run "Daily"
Also have a look on below thread
This is how to do it through code
data: lv_job_name like tbtco-jobname,
lv_job_nr like tbtco-jobcount,
lv_job_released type c,
lv_job_start_sofort type c,
lv_print_parameters type pri_params.
lv_job_name = 'Z_test'. " your background program name
call function 'JOB_OPEN'
exporting
jobname = lv_job_name
importing
jobcount = lv_job_nr
exceptions
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
others = 4.
if syst-subrc = 0.
*submit job with all the selection screen params...
submit (lv_job_name)
with applfile = applfile
with p_lines = p_lines
with rfc_dest = rfcdest
with p_selmtd = lv_selmtd
with px_shsim = px_shsim
with px_sherr = px_sherr
user syst-uname
via job lv_job_name number lv_job_nr and return.
if sy-subrc = 0.
call function 'JOB_CLOSE'
exporting
jobcount = lv_job_nr
jobname = lv_job_name
strtimmed = 'X'
importing
job_was_released = lv_job_released
exceptions
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
others = 8.
if syst-subrc 0.
message i162(00) with
'An error occured while closing the background job.'.
stop.
endif.
endif.
endif.
skip 1.
write: / 'Background process', lv_job_name ,
'called successfully' no-gap.
write: / 'You can check the job in transaction SM37'.Hope it will solve your problem..
Thanks & Regards
ilesh 24x7
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |