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

Run the program in Background

Former Member
0 Likes
748

Hello All,

I have selection screen where i have parameters for programs, classes and filename.

When i give program name and filename and execute. A Popup appears and asks the path for the file to be saved in xml format. This is done through foreground. It is working correctly in foreground and the file saves in xml format in specified location.

I have tried using the JOB Schedule for background but it is not working.

My requirement is to do the same process in background. How can i achieve the same process as foreground for the given programs and classes to save the file in xml format through background process.

Could anybody help me in this issue.

Thanks

4 REPLIES 4
Read only

Former Member
0 Likes
627

Hi,

you can not shedule the PC file run in background..

if it is FTP you can shedule in back ground.

only application server files can shedule in background.

Regards,

Prabhudas

Read only

Former Member
0 Likes
627

Hi,

The program will not ask for the file path in background mode.

You have to hardocde the path in the code or maintain the same in a z-table.

use the following condition.

if sy-batch - 'X'.

path = .......

or

select path from ztable into.....

endif.

Also please note that the file will be stored in the application server only. You cannot directly stroe it in your desktop.

Hope this helps,

RJ

Read only

Former Member
0 Likes
627

Hello,

To run the program in background we have to 3 function modules.

Job_open,

Job_submit,

Job_close.

Before this create the varient for the selection screen.

Pass the program name and varient name in the functional modules then u r program works in back ground also try this way..........

Read only

Former Member
0 Likes
627

Hello Indrakaran Reddy,

You cannot run the programs which involves the user intervention,pop-up displays etc., in the background mode.

For this, you need to have the file in the application server not on the desktop(presentation server).

Once, your file is in the application server, give the class and path of the file in the selection screen and then save it as a variant.

Then, schedule the program in the background using the transaction SM36.

This is how it works. Hope you understood the concept clearly.

Thanks,

Babu Kilari