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

Setting a report as a background

Former Member
0 Likes
1,385

Hi ALL

Please give me the clear steps how to set a report to run as background with variants using sm36 and sm37 (if possible with example)

By

Prashanth

Hi ALL

Please give me the clear steps how to set a report to run as background with variants using sm36 and sm37 (if possible with example)

By

Prashanth

9 REPLIES 9
Read only

Former Member
0 Likes
1,218

To generate a variant for your report, launch Txn SE38, type the name of your report and hit F8 (execute). Now you should see the selection screen of the report. Fill all fields you want with the values needed and hit F11 (save). This will store your input as variant of the report.

Read only

0 Likes
1,218

Hi

I asked to u how to run as background.

By

Prashanth

Read only

0 Likes
1,218

If you want to just run this in background press F9 instead of F8 after entering the values for the parameters.

Regards,

Ravi

Note : Please close the thread if the question is answered

Read only

Former Member
0 Likes
1,218

Hi Prashant,

Goto SE38 --> Program --> Execute --> Background -->

Specify Report Name and Variant --> Execute immediately or schedule.

After the job gets over you can see the output in SP01.

Please mark helpful answer.

Regards,

Amit Mishra

Read only

Former Member
0 Likes
1,218

After variant is generated, launch Txn SM36 and create a job that executes the given report using the variant you created.

Read only

0 Likes
1,218

You can use SM36 and use the "Job Wizard" to define a background job in simple step by step procedure

Or

Goto SM37 and specify a job name.

Next specify the ABAP Program Name of the report you want to execute under Job Step.

Then click on "Extended Job Selection" and goto the Period Tab.

There select "Only Periodic Jobs" and then specify the frequency of execution based on Months, Weeks, Days, Hours or Minutes.

2)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

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

Hope this helps,

Read only

Former Member
0 Likes
1,218

Prashanth,

First you need to do is to create a variant for the program. You can do that from SE38. In the variant you specify values for the parameters.

Then go to SM36 enter a job name and hit enter. In the next screen, choose the ABAP Program and the variant you have created. Now, save that and then click on the START CONDITION. Click on IMMEDIATE and you will have a button in the bototn PERIOD VALUES, then you can set that to HOURLY / DAILY etc. Finally save the job.

By clicking on OTHER PERIODS, you can even schedule in terms of hours / minutes.

Regards,

Ravi

Regards,

Ravi

Read only

Former Member
0 Likes
1,218

Regards,

Ravi

Read only

Former Member
0 Likes
1,218

Hi,

First you have to create a variant for the program at the selection screen. i.e. go to SE38 and type the program name and execute it.

Now you will get the selection screen. Here enter the details and press save and enter the name of the variant.

Now goto SM36. Create a job and press the start condition button.

Here you ahve to enter the date and time of ececution of the program you require and save it.

Now press the step button and enter the ABAP program name and the variant name and save it.

Press Job selection button and it will take you to SM37 transaction.

give the details of the Job like program name, time, date, etc and press execute button. You will see the status of the job.

Hope this will help you.

Regards,

Vaitheeswaran.