06-08-2010 9:52 AM
Hello everyone.
I've created a program in abap with screens (no report).
Is it possible to run this in background.
I would like to have a checkbox that say 'background process'.
If it's checked and the uses clicks the process button, the program must run as background job.
Is there anyway to accomplish this ?
Thanks in advance !
Merijn.
06-08-2010 10:49 AM
HI Merijn.
There are three ways that you can schedule the program in background. Condtion is you have to create another program for it
1. Go for the Report where you use the JOB_OPEN , Submit your report and Job_close. Then program would run in background.
Here you can give our parameters on the screen.
2. Create a report program. Use the submit statement in it with all selection screen parameters.
Then schedule the Background job in the SM36 and process it in SM37.
3. You can record the BDC and schedule the background job.
For all these it require new executable program to be created. I Guess are the only possible ways.
06-08-2010 10:05 AM
Hi,
You can do this by using the function module JOB_OPEN, JOB_SUBMIT and JOB_CLOSE.
Please check the below links also
http://www.erptips.com/Snippet1/rywzixjlsh.pdf
http://help.sap.com/abapdocu_70/en/ABAPSUBMIT_VIA_JOB.htm
Thanks
Arul
06-08-2010 10:21 AM
Thanks.
But in the 1st article the speak about reports with start-of-selection, ..;
But i don't use that.
I use call screen. So with the PBO and PAI module.
Is that possible too with 'submit job'.
06-08-2010 10:31 AM
Hello Merjin,
If its a screen program, it might obviously expect some kind of user interaction be it a button press or entering data in fields or anything. In such cases there wont be any user in the background to interact. In such cases only automation thro' BDC recording can be done as a background job.
Vikranth
06-08-2010 10:36 AM
Ah, i see. So actually it isn't possible in the normal way.
My program expects user interaction on a certain level.
User choses file, and start the process that reads the file and the some other stuff with the data.
So if it is a small file, i doesn't have to be in background but if it's large...
User can also upload a file to application server. That file can be used to process in background.
I'll take a look at the bdc recording, but if it's too hard, i'll create a report with selection screen.
Thanks for your input
06-08-2010 10:36 AM
When one runs this online program in background, how does the system determine, what will be the values of the fields in other screens, is this to be feeded from afile, or the system will suggest values on its own.
Moreover, when one runs this online program in background, how does the system determine, what will be the selection of records (if any, i.e. Select All etc).
06-08-2010 10:40 AM
Welll, the user uploads a file to the application server.
This file and the right function code are the only parameters to run the job.
06-08-2010 10:49 AM
HI Merijn.
There are three ways that you can schedule the program in background. Condtion is you have to create another program for it
1. Go for the Report where you use the JOB_OPEN , Submit your report and Job_close. Then program would run in background.
Here you can give our parameters on the screen.
2. Create a report program. Use the submit statement in it with all selection screen parameters.
Then schedule the Background job in the SM36 and process it in SM37.
3. You can record the BDC and schedule the background job.
For all these it require new executable program to be created. I Guess are the only possible ways.
06-08-2010 11:30 AM
Thank you for the answer.
I will cpoy paste the code to a normal report program.
My question is solved. This thread can be closed.