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

ALV in background

Former Member
0 Likes
2,069

Is it possible to launch a simple ALV in background?

I have an interactive report which selects data, processes it, and displays it in al ALV list where the user has to select (in a checkbox) which lines to process (update in DataBase).

The problem is that the program ends because the long time execution, so, I want to execute the program in BackGround.

I have changed the program, and when is executed in BackGround (SY-BATCH = 'X') I want to process all the data and create a SPOOL whit the list contents.

That seems it's working okay, but when I go to SM37 for seeing the SPOOL, I notice that the SPOOL request is not created!!!

I've tried executing the program via "SUBMIT... VIA JOB...", executing directly from SE38 selecting "PROGRAM -> EXECUTE IN BACKGROUND"....

Any advice?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,164

Jorge,

Short answer is yes, ALVs will run in background. You can test this by running your unmodified report in background. It should produce a Spool with the original selection list of lines to process.

Did you set up the spool parameters correctly for the background job? You should specify an output device, etc.

Another option is perhaps your new logic surrounding SY-BATCH needs to be double checked. Could be that its causing no ALV to be produced.

Hope that helps.

Brad

Is it possible to launch a simple ALV in background?

I have an interactive report which selects data, processes it, and displays it in al ALV list where the user has to select (in a checkbox) which lines to process (update in DataBase).

The problem is that the program ends because the long time execution, so, I want to execute the program in BackGround.

I have changed the program, and when is executed in BackGround (SY-BATCH = 'X') I want to process all the data and create a SPOOL whit the list contents.

That seems it's working okay, but when I go to SM37 for seeing the SPOOL, I notice that the SPOOL request is not created!!!

I've tried executing the program via "SUBMIT... VIA JOB...", executing directly from SE38 selecting "PROGRAM -> EXECUTE IN BACKGROUND"....

Any advice?

7 REPLIES 7
Read only

Former Member
0 Likes
1,164

Hi,

To execute the job in background press f9 instead of f8. Then the job will get scheduled, after it get processed you will get an indicator with finished.

Then by clicking that corresponding job u can view the output.

If u want to debug and see select the job and write jdbg in the command and press enter.

Hope this helps you, Kindly as me if you need any further clarification.

Thanks & Regards,

Judith

Read only

0 Likes
1,164

Hi Judith,

I've tried execute directly in background, but the JOB doesn't generates a SPOOL request.

Thanks for your answer.

Read only

0 Likes
1,164

Hi,

If you are executing a job <b>other than Module Pool</b> in Background it should create spool.

Check whether you have executed correctly, see that you have chosen the date and the checkboxes in sm37 while viewing the job.Atleast it will show some error message.

Thanks & Regards,

Judith

Read only

0 Likes
1,164

> If you are executing a job <b>other than Module

> Pool</b> in Background it should create spool.

I suppossed that, but.... I've checked the spool parameters and doesn't still generate the SPOOL request.

Read only

Former Member
0 Likes
1,165

Jorge,

Short answer is yes, ALVs will run in background. You can test this by running your unmodified report in background. It should produce a Spool with the original selection list of lines to process.

Did you set up the spool parameters correctly for the background job? You should specify an output device, etc.

Another option is perhaps your new logic surrounding SY-BATCH needs to be double checked. Could be that its causing no ALV to be produced.

Hope that helps.

Brad

Read only

Former Member
0 Likes
1,164

It works!

The problem was in the program code. When executing it in background, before displaying the ALV list, I do the update data base process, and after that, I pretend to display the ALV.

I modified the program, and now I display the ALV before processing the update data base.

Now it works.

Thanks to all.

Read only

Former Member
0 Likes
1,164

Are you calling a grid ALV (FM). If so, try changing it to a List ALV.