Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

how to run a program in background?

Former Member
0 Likes
832

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

6 REPLIES 6
Read only

Sidh_M
Participant
0 Likes
795

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

Read only

Former Member
0 Likes
795

Hi,

Go through this links:

or try using wizard in SM36 transaction. Its really helpful.

Thanks,

Shailaja

Read only

Former Member
0 Likes
795

Way to run program in Backgroung mode :

se38-->)Write program name )->choose Tab "program" in menu bar -


>execute---->background

Read only

Former Member
0 Likes
795

hi,

Refer to the following link:

http://help.sap.com/saphelp_nw04/helpdata/en/73/69ef5755bb11d189680000e829fbbd/frameset.htm

reward if useful,

Thanks and regards

Read only

former_member282823
Active Participant
0 Likes
795

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.

Read only

Former Member
0 Likes
795

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