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 program in background

Former Member
0 Likes
1,843

hi all,

we have requirment wherein there is a report which deletes data from z tables.Upon executing this report the data should be deleted in background.how can i make the program run in background when the user presses F8.

Thnaks,

Rakesh.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,697

Rakesh,

start-of-selection.

sy-batch = 'X'.

Amit.

17 REPLIES 17
Read only

Former Member
0 Likes
1,697

when executing the program there is an option in the menu to run in background. Instead of F8 use that from the program menu.

<removed_by_moderator>

Edited by: Julius Bussche on Jul 14, 2008 11:37 AM

Read only

Former Member
0 Likes
1,697

create the program in the same way as you do and then create a Job in SM36. Schedule the job and this will do your work at a scheduled time in background.

Hope this helps!!!

regards,

Lalit

Read only

0 Likes
1,697

the job has to be created automatiocally when the usere hits F8.how can i do this?

Read only

0 Likes
1,697

You go back to the person requesting this and tell them they can either pay for 2 or 3 days development whilst you build up the background job creation logic or they can teach the users to press F9 instead of F8 and save time, money and testing... It should be easy enough for the user to press F9 to run it in background and enter the job details.

If you really have to change it so that it creates the background job then please search SDN as there is lots and lots of information explaining how to do this.

Read only

0 Likes
1,697

Hi,

The requirment is--foreground execution when F8 is pressed and F9 for backgound executuion.

Read only

0 Likes
1,697

HI Rakesh,

Its by default that if u press F8 the reports gets executedd in froreground and if u press F9 it get into back ground job and there u need to give in ur details of the program to execute.

check it out.

Read only

0 Likes
1,697

Rakesh,

That is how it works as standard. I'm a bit confused now to exactly what you want to do?

Read only

Former Member
0 Likes
1,697

Hello Rakesh,

In your program, set the sy-batch as 'X' to execute the program in background.

\[removed by moderator\]

Regards

Indu.

Edited by: Jan Stallkamp on Jul 14, 2008 12:49 PM

Read only

Former Member
0 Likes
1,698

Rakesh,

start-of-selection.

sy-batch = 'X'.

Amit.

Read only

0 Likes
1,697

Amit and Indu: From where have you get this idea, if you set sy-batch to 'X', the program will continue in background? Have you ever tried this?

Read only

0 Likes
1,697

Eric,

Have you gone completely mad?!

Why would anyone on here actually bother to try a solution before they post it or even consider if it is actually a solution? Next thing you'll be expecting people to try their own work before they post on here asking others to do it for them...

Gareth.

Read only

0 Likes
1,697

Eric,

yes i tried with this.can you not put message if sy-batch ne 'X' for letting the user for background.

Amit.

Read only

0 Likes
1,697

I know in Bangalore everything is possible, but setting the sy-batch to 'X' won't make the program continue in background. Not even if you tried it. On the other hand in your earlier reply you wrote sy-batch = 'X' which would set the program to run in background (don't worry, it won't happen), and now you write: IF sy-batch = 'X' which checks if the program runs in background. These two things are not equivalent!

Read only

0 Likes
1,697

Eric,

you are absulutely right in Bnagalore every thing is possible even am not from bangalore.

i know such statement not forcing the program excecution in BG.but am sure the originator was not expecting spoon feeding from us.

by the using this he/she can check and let the user to run this in BG only.

Amit.

Read only

0 Likes
1,697

Original question was:

"...can i make the program run in background when the user presses F8."

The you answered:

"START-OF-SELECTION.

sy-batch = 'X'."

With this you simply indicate that by setting the sy-batch to X makes the program run in background.

Than you wrote:

"if sy-batch = 'X'"

which again does not anwer the original question...

then:

"i know such statement not forcing the program excecution in BG"

If you know - why do you answer like that?

"by the using this he/she can check and let the user to run this in BG only."

this is right, but also does not answer the original question

Read only

0 Likes
1,697

Eric,

thanks for waking up again.

you see the orignal question was:

can i make the program run in background when the user presses F8."

i dont think it is recommaded by SAP to change SAP standard functionality as here in case to interchage F8 and F9.

so definately he should let the user by message just press F9 instead of F8 for BG.

that is what is possible by sy-batch ne 'X'.

message.

Hope tis is not a suitable place for questining bouncing back to each other.

we should stop now by just saying bye and take care.

Amit.

Read only

0 Likes
1,697

"we should stop now by just saying bye and take care."

Bye and take care