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

"Execute in background" functionality for normal (not selection) screens

csaba_huszar
Product and Topic Expert
Product and Topic Expert
0 Likes
1,215

Hi Colleagues,

I have a report, which starts a screen at the beginning of the program (call screen 100).

This screen is very similar to a standard selection screen, it contains several input fields, and an execute button. However, i cannot use a selection screen, since it contains many enjoy controls (e.g. ALV tree).

The problem is that i need the "execute in background functionality (F9)" like at the selection screens. Is it difficult to program it completely (including the screen flow for scheduling the background report)? Can you give me some tips how to start?

Thx,

Csaba

1 ACCEPTED SOLUTION
Read only

guilherme_frisoni
Contributor
0 Likes
971

Hi Csaba,

you will have to create your job via code.

Check this FMs:

JOB_OPEN

JOB_SUMBIT

JOB_CLOSE

Regards,

Frisoni

4 REPLIES 4
Read only

guilherme_frisoni
Contributor
0 Likes
972

Hi Csaba,

you will have to create your job via code.

Check this FMs:

JOB_OPEN

JOB_SUMBIT

JOB_CLOSE

Regards,

Frisoni

Read only

0 Likes
971

Thx for the quick answer. Will these FMs also include the screens ("background screen parameters", "Start Time")?

Read only

matt
Active Contributor
0 Likes
971

This is a prime example of why you should always layer your programs in a kind of MVC way.

Rewrite your program so that the logic is entirely separate from the front-end screens. You can do this via a function module with parameters for everything that may vary, or as a bunch of classes and do it OO style.

Your current program should now have a bunch of screen handling code plus a single call to the function module (say).

When it's all working, write a standard report for the parameters you want to be able to set in background, and use that for scheduling.

Read only

Juwin
Active Contributor
0 Likes
971

Enjoy screen - means a "call screen" statement is involved in your program. My understanding is "call screen" in a background job, will result in a dump. So, you will have to recode your program as Matthew said, as a report and then schedule that report will automatically have the functionality to schedule in background.

Thanks,

Juwin