02-21-2005 8:31 AM
Thank you guys,
I have one more problem.
When i click clock button(Execute button), iwant to
execute the program in background.
Howto do this..
i know to check with background..ie..sscrfields-ucomm =' SJOB'.
For Online do we have to check for any value at screenfields?
could you pls help me out.
ambichan.
02-21-2005 8:38 AM
Hi,
Take a look at SUBMIT (report) USER user VIA JOB job NUMBER n. Do an F1 on SUBMIT statement.
To check whether you are in background or foreground mode, check the value of sy-batch.
If you are using CALL TRANSACTION, use addition MODE 'N' for background, and UPDATE 'A' for asynchronous update.
Regards
Message was edited by: Shehryar Khan
02-21-2005 8:57 AM
thanks for your reply.
i checked sy-batch, i guess its initial.
can we submit the same program once again to execute in background..as below
if sy-batch is initial.
submit zglto_shintani003 and return
user sy-uname via job jobname number jobcount.
endif.
i think its wrong way of coding..how to do this..
my program is "zglto_shintani003" when i click execute button it should work in background.
anything have to do now... i have not wrote anycode for background process inside program.
ambichan.
02-21-2005 9:02 AM
Actually, when i click execute button, i want to call the
Background execution Function code.
if i say simple words, I want my Online Execute button to act as "Background Execution Button".
Is it possible?
ambichan.
02-21-2005 9:04 AM
Hello Ambichan,
Did the code I gave you below fail to give you the desired functionality?
Regards,
Anand Mandalika.
02-21-2005 9:06 AM
02-21-2005 9:10 AM
02-21-2005 8:48 AM
Hello Ambichan,
The normal Execute Button has the Function Code <b>ONLI</b>. you will just have to set this to <b>SJOB</b> in the PAI to make the same button trigger the Background job.
Look at this code...
tables sscrfields.
parameters p_test.
at selection-screen.
if sscrfields-ucomm = 'ONLI'.
sscrfields-ucomm = 'SJOB'.
endif.
start-of-selection.
write p_test.
Get back if you have any doubts.
Regards,
Anand Mandalika.