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

background job

Former Member
0 Likes
1,882

hi all,

how to run customized report in background.

plz reply me earliest.

thanking you,

Jyotsna

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,581

hi all ,

I want list or output of report when we run that in background can it possible.

plz reply me.

thanking you,

Jyotsna

hi all,

how to run customized report in background.

plz reply me earliest.

thanking you,

Jyotsna

12 REPLIES 12
Read only

Former Member
0 Likes
1,581

Hi Jyotsna,

You need to use Transaction SM36.

You need to provide a Job Name with which you can track the job later.

Then you need to provide "Start Condition" - Time when you want to schedule this job.

Then you need to to provide the Custom Program name in "Step".

Save the job.

Best Regards,

Ram.

Edited by: ram Kumar on Dec 12, 2008 12:28 PM

Read only

Former Member
0 Likes
1,581

go to SE38 and give your program name and excute tehn give your input and goto PROGRAM---> EXECUTE IN BACK GROUND.... give output device ad press continue the n press immediate and SAVE

Read only

Former Member
0 Likes
1,581

Hi,

Check this

Regards

Read only

Former Member
0 Likes
1,581

hi,

goto sm36,

enter job name (any),

give your report name and variant name.

under start condition tab specify the time.

regards

prajwala

Read only

Former Member
0 Likes
1,581

hi jyotsna,

try this ..

CONSTANTS: lc_name TYPE tbtcjob-jobname VALUE 'AP2_9_77'.

DATA: lv_number TYPE tbtcjob-jobcount.

CALL FUNCTION 'JOB_OPEN'

EXPORTING

jobname = lc_name

IMPORTING

jobcount = lv_number

EXCEPTIONS

cant_create_job = 1

invalid_job_data = 2

jobname_missing = 3

OTHERS = 4.

IF sy-subrc = 0.

SUBMIT <customised_program_name> VIA JOB lc_name NUMBER lv_number

TO SAP-SPOOL

IMMEDIATELY 'X'

KEEP IN SPOOL ''

DESTINATION 'LOCL'

WITHOUT SPOOL DYNPRO

AND RETURN.

IF sy-subrc = 0.

CALL FUNCTION 'JOB_CLOSE'

EXPORTING

jobcount = lv_number

jobname = lc_name

strtimmed = 'X'

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.

hope this works...

Read only

0 Likes
1,581

hi dhaval where I've to call this code.

plz tell me detail.

Thanx,

Jyotsna

Read only

0 Likes
1,581

Hi jyotsna,

this particular code will just call your program in background... so place it wher u want to call it.. in my case i had to call it at the start of the program itself.. can u tel me what exactly are u trying to do?

if you just want to run your customised program in the backgound at the beginning of your other Z report or something, then place it in the beginning itself with the name supplied after SUBMIT as shown...

tel me if u need some more help ...

Read only

Former Member
0 Likes
1,581

hi,

go to your report, you have a option called execute in background in the menu bar.

the status can be checked in SM36 transaction.

no need of going to SM36 and creating a job.

thanks,

Poonam

Read only

Former Member
0 Likes
1,581

Hi,

The transaction code is SM36. The steps are as given below.

1. Give a job name

2. Click on 'Step'. In the resulting screen select the desired button. For example 'ABAP Program'. Give the name of the ABAP program and the variant.

Click on 'Save'.

3. Now click on the 'Start Condition' and select the desired start time. For example 'Immediate'. Press 'Save'.

4. Now you will be in the first screen. Press 'Save' here.

Now the job is scheduled.

Regards:

Alok Bansal

Read only

Former Member
0 Likes
1,582

hi all ,

I want list or output of report when we run that in background can it possible.

plz reply me.

thanking you,

Jyotsna

Read only

0 Likes
1,581

Hi,

you can go to view the list/output via transaction SM37.

Thanks and regards,

Dev.

Read only

0 Likes
1,581

thatnx dev my problem has been solved, I got list of m program via t-code sm37.

regards,

Jyotsna