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,473

hi!

i have a non standard transaction that call another two non standard transactions.

i want to run them in background job. so i added to them sy-batch = 'X'.

Before that i used to get the report as an ALV, but when i added the sy-batch i got it as list.

is it enough to just add sy-batch = 'X' in order to run the job in background, and how do i see the results?

do i see it aurtomatically on the screen or in SM37?

also in one of them i put the sy-batch = 'X' in the initialization, and i want it to skeep the selection screen, is it possible?

thanks

YIFAT

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,291

Hi !

First of all - you cannot run a transaction that is a modul-pool in background.

Only Reports (started via SA38 or SE38) can be started in background.

If your submitted program is a report you can act as follows:

In your "caller" program you can use then command:

SUBMIT zxyz USER user VIA JOB job NUMBER n

(See online help for that)

Then your Report is beeing executed in Background.

The SY-BATHC is setted by the system. Ther's no use of setting it by yourself in your report.

The Repsults of your,in background executed, report are beeing printed to the device you an define during the JOB-Ceration (see Help for SUBMIT).

Regards

Rainer

Some points would be fine if that helped a bit

hi!

i have a non standard transaction that call another two non standard transactions.

i want to run them in background job. so i added to them sy-batch = 'X'.

Before that i used to get the report as an ALV, but when i added the sy-batch i got it as list.

is it enough to just add sy-batch = 'X' in order to run the job in background, and how do i see the results?

do i see it aurtomatically on the screen or in SM37?

also in one of them i put the sy-batch = 'X' in the initialization, and i want it to skeep the selection screen, is it possible?

thanks

YIFAT

7 REPLIES 7
Read only

Former Member
0 Likes
1,291

Hi,

If you are meant that ALV grid is transformed in ALV list in background, that is a standard thing. ALV grid is automatically transformed in to ALV list when you perform it in background. You can no way have a grid report in background (to the best of my knowledge).

And if you want execute in backgound, in SE38, enter the parameters and instead of pressing F8, go via menu Program-> Execute in background.

You don't have to skip the selection screen in background, it's automatically taken care of. To schedule a job in background, one needs to maintain variants (selection-set) with which the program is scheduled as a batch job.

Don't forget to award points if this helps you.

Read only

Former Member
0 Likes
1,291

hi!

thanks for your answer.

i have 2 questions

1. the result of the report is automatically printed on screen, or can i see it in some other place?

2. i have transaction that call another transaction. if from the first transaction i specified sy-batch = 'X' and move it to the other transaction in the initialization, if i get sy-batch = 'x'i want to skip the selection screen, and run it on the whole population, is it possible?

regards

yifa

Read only

0 Likes
1,291

I didnot understand either of your questions.

Read only

0 Likes
1,291

Hi Yifat,

1. the result of the report is automatically printed on screen, or can i see it in some other place?

Yes can can user tcode SP01 to see the list generated or you can go to se37 select the line and click on spool.

Read only

0 Likes
1,291

Hi Yifat,

2. i have transaction that call another transaction. if from the first transaction i specified sy-batch = 'X' and move it to the other transaction in the initialization, if i get sy-batch = 'x'i want to skip the selection screen, and run it on the whole population, is it possible?

--I like to know whether these non standard transactions you are for report program or module pool.

Atul

Read only

Former Member
0 Likes
1,292

Hi !

First of all - you cannot run a transaction that is a modul-pool in background.

Only Reports (started via SA38 or SE38) can be started in background.

If your submitted program is a report you can act as follows:

In your "caller" program you can use then command:

SUBMIT zxyz USER user VIA JOB job NUMBER n

(See online help for that)

Then your Report is beeing executed in Background.

The SY-BATHC is setted by the system. Ther's no use of setting it by yourself in your report.

The Repsults of your,in background executed, report are beeing printed to the device you an define during the JOB-Ceration (see Help for SUBMIT).

Regards

Rainer

Some points would be fine if that helped a bit

Read only

hymavathi_oruganti
Active Contributor
0 Likes
1,291

AT SELECTION-SCREEN.

IF p_backgd = 'X'.

IF sscrfields-ucomm = 'ONLI' AND sy-batch <> 'X'.

sscrfields-ucomm = 'SJOB'. " Submit in background

ENDIF.

ENDIF.

let p_backgd be a parameter, then u need to write above code to submit in background from the report.

u can see the o/p in sm37