02-21-2009 9:25 AM
Hi All,
Can anyone tell me how to switch a program to foreground mode when it is running in background mode & vice-versa.
Regards,
Santosh
02-21-2009 9:29 AM
Never heard that this is possible. Some programs would trip over a changing SY-BATCH value, I assume.
Thomas
02-21-2009 9:29 AM
Never heard that this is possible. Some programs would trip over a changing SY-BATCH value, I assume.
Thomas
02-21-2009 9:33 AM
Hi,
Its Possible in BDC Programming:
OKCODE = '/BDA' --->Changes from background to foreground.
OKCODE = '/BDE' --->Changes from foreground to background .
Regards,
Gurpreet
02-21-2009 9:36 AM
Sorry, but this is wrong, both "A" and "E" modes run in a dialog process, not a background process. Also, once you're in "E" mode, how do you want to switch back to "A" unless an error occurs?
Thomas
02-21-2009 9:42 AM
In BDC its Possible,
Say you are using three Transactions:ME51,ME21,ME22.
Create a session.
Sequence:
ME51
ME21
ME22
Use OKCODE = '/BDA' (in codes)at the start of ME22.
Start the Session through SM35 in Back ground
As you come to ME22-->Processing will come to foreground mode.
Or-->
Create a session.
Sequence:
ME51
ME21--> '/BDE'(in codes)
ME22
Use OKCODE = '/BDA' (in codes)at the start of ME22.
Start the Session through SM35 in Foreground ground
As it comes to ME21 processing will be done in Backgrond(Unless error occurs or '/BDA')
As you come to ME22-->Processing will come to foreground mode.
Try it this works.
Regards,
Gurpreet
02-21-2009 10:17 AM
Sounds interesting, I'll have a look on Monday when I'm in front of the frontend
Question remains if the work process actually changes between DIA and BTC? And what does the OP actually want...?
Thomas
02-21-2009 10:24 AM
Hi Santhosh,
Yes it is possible If you program is still running in background.
Setup ur batch job and go to transaction SM66. Here u can see all running programs(Both foreground and back ground).
Place cursor on ur program and click on debugging button. Control goes back to ur program and stops where at was running at the point u clicked on debugging button.
Note: Once u click on Debugging it may take few seconds to switch from background to foreground.
If ur program already finished then u can debug it from SM37. Place break point in ur code. Select ur job in Sm37 and enter JDBG in command prompt and click enter, F8. Control stops at ur break point.
Hope this helps u.
Thanks,
Vinod.
02-21-2009 10:58 AM
02-21-2009 11:10 AM
Hi,
Two ways.
1. Go to selection screen of ur report. Enter all required values and click F9. In the popup that comes next enter LOCL as printer name and click enter. In the next popup click immediate button and enter.
Now go to SM37. U will see the batch job running.
2. Create a selection screen variant. (Enter all values and click SAVE button).
Now go to SM36, give ur report name and variant name and save,
For beginners first method is easy.
Thanks,
Vinod.
02-21-2009 11:23 AM
hi..
thanks for ur reply..
when the control returns from backgrnd mode to debug mode...
will it it give the output in foreground mode??
can u please elaborate the 2nd method..regardin how to create variant???
thanks
rajeev
02-21-2009 2:12 PM