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

Submit program in background

former_member434229
Active Participant
0 Likes
1,206

Hi,

I have 2 exe programs where main program supplies selection to second program, it retrieve the data and send list to the first program.

However, the problem is second program has to run in background mode as database selection exceeds the maximum time.

I have used 2 FMs

JOB_OPEN

JOB_CLOSE

and in between I submitted the second program. It creates a spool request but fail to return any data to the main program.

Please provide solution to the issue.

Thanks in advance,

Ni3

4 REPLIES 4
Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
663

submit (prog) with or via and RETURN.

Read only

Former Member
0 Likes
663

Hi Ni3,

Try to "export to memory" the values in the second program and once the second program is returned to first program try to find whether background job is completed(I think you can do this using some FM). If yes, then use "import from the Memory". If no, continue until it completes.

Hope this is helpful.

Regards

Sravan

Read only

dev_parbutteea
Active Contributor
0 Likes
663

Hi,

In your scenario,

1. you run 1st report

2. launch 2nd report in background

3. Back in 1st report and use data from 2nd report.

Here, you will have a problem since the 2nd report in background is scheduled to be run later and execution goes back to 1st report irrespective of whether the 2nd one has run or is successful or not.

When the scheduled job is completed, it will automatically create its corresponding spool.

Hope that this will help you to understand this scenario.

Regards,

Dev.

Read only

Former Member
0 Likes
663

You may be able to do all of your coding in one program and not use background IF you can call the

FM SAPGUI_PROGRESS_INDICATOR within your DB Processing.

This function in essence resets the timer.