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

report in background

Former Member
0 Likes
1,456

Hi all,

we have a requirement to run a report in background , how do we do this any help appreciated

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,250

Hi Sunil,

you can execute the report in background in SM37 , there are two options , one is as said using f9 or you can make SY-BATCH eq 'X'.

if x run the report or exit from the program.

so this way you can execute the report in background and check the spool in sm37

Regards,

Kishore

Hi all,

we have a requirement to run a report in background , how do we do this any help appreciated

9 REPLIES 9
Read only

Former Member
0 Likes
1,250

Sunil,

Do you want to execute this in background programmitaclly, if yes just look at the options of the SUBMIT command.

Else, instead of F8, use the F9 command and the report can be run in the background.

Regards,

Ravi

Read only

Former Member
0 Likes
1,250

hi sunil,

u want to schedule this report in the background then u can do so in SM36 .

regards,

Vikky.

Read only

Former Member
0 Likes
1,250

Hi,

To execute the job in background press f9 instead of f8.

uncheck the print option.

Then press ok.

Now press immediate, then save.

Now it will show a message saying that job scheduled in background.

Goto SM37 press F8, now u can see the jobname and the status if it is finished it will create an spool. Then click the jobname and the spool in the toolbar u can see the list created. then click and see teh output list generated.

If it is canceled then some error has occured, so u can chose the job and put <b>jdbg</b> in the command prompt and start debugging and check where it fails.

Regards,

Anjali

Read only

Former Member
0 Likes
1,250

Hi,

Click on F9 to execute your report in background.

Then in sm36 you can see the log.

Regards,

Gayathri

Read only

Former Member
0 Likes
1,251

Hi Sunil,

you can execute the report in background in SM37 , there are two options , one is as said using f9 or you can make SY-BATCH eq 'X'.

if x run the report or exit from the program.

so this way you can execute the report in background and check the spool in sm37

Regards,

Kishore

Read only

0 Likes
1,250

hi ,

The SY-BATCH is working but how do i make sure user doesnt run this report in foreground.

Regards,

Sunil

Read only

0 Likes
1,250

In the initialization event, check fo SY-BATCH. If its not checked, throw a message to the user that he can run it only in background and exit the program.

If SY_BATCH is initial.

message "CAnnot Run" type I.

exit.

endif.

Regards,

Ravi

Note : please mark the helpful answers if they help.

Read only

0 Likes
1,250

Hi ,

In order to restrict the user to run it only in background , you can as well check for SY-BATCH condition.

The other way is try to remove "execute in foreground" option from the menu and this can be done with the function module .

Do reward points if useful and close the thread if the doubt is cleared

data: begin of int_exc occurs 0,

code like sy-ucomm,

end of int_exc.

data wf_repid .

initialization.

clear int_exc.

int_exc-code = 'ONLI'.

append int_exc.

int_exc-code = 'PRIN'.

append int_exc.

move: sy-repid to wf_repid .

call function 'RS_SET_SELSCREEN_STATUS'

exporting

p_status = '%_00'

p_program = 'wf_repid'

tables

p_exclude = int_exc

.

Read only

Former Member
0 Likes
1,250

If you need to trigger the backgroud processing from a program, you should use the FM JOB_OPEN and JOB_CLOSE.

Regards.