Kill of the hang program...

Hi ..
is there any way to kill off the hang program using java...
lets say i have this code below..
try{
a.print();
a.runPrint(); -------------> hang here and does not even throw exception
System.out.println("hi");
}catch(exception e)
System.out.println("Hi there");
What i want is if the method does not respond within some given time .. i will just kill it off and terminate the program.....
What should i do to add some coding?? is it using Thread or somehting??
Hopefully someone can give me example..
Thanks....

You cannot totally stop the blocking from occurring. You can gracefully try to end the thread. There must be some timeout for that process (though it could be hours or minutes). However, you could try something like:
class Connector implements Runnable {
   private Connection connection;
   public void run() {
       connection = connect();  // blocks
   public boolean isConnected() {
      return (connection != null);
   public Connection getConnection() {
      return connection;
class Caller {
   public Connection getConnection() throws IOException {
        Connector connector = new Connector();
        Thread thread = new Thread(connector);
        thread.start();
        Thread.sleep(1000);  // current thread, sleeps for 1 second
        if (connector.isConnected()) {
             return connector.getConnection();
        Thread.sleep(10000);  // wait 10 more seconds
        if (connector.isConnected()) {
             return connector.getConnection();
        throw new IOException("Unable to get connection");
}You could modify the above using the Observer-Observable pattern (or use a simple call-back function) to notify the caller when the connection is available rather than waiting specific amounts of time.
- Saish

Similar Messages

  • MacBook Pro 2011 10.7.5 frequently hanging programs and freezing.

    For over a week my system has frequently been hanging all its programs and then spinning the beach ball of death when you try and click around or repeat actions. It happens always after it’s been woken up and then later too.
    -It sorts itself out but after about 5-10 minutes.
    -A couple of times I've woken it from sleep mode but the screen never wakes up, the light isn't snoozing anymore but it's all black. That never recovers and I have to force shut down.
    -Occasionally while it's hanging, the sound from a browser carries on even though the screen has frozen- within a few minutes that stops too.
    -I haven't made any significant changes recently and it's not associated with any particular program; it can happen through anything.
    -Here are the specs and more information:
    I'm usually running several programs but none with a really high activity usage. My activity monitor usually looks like this, it fluctuates, but never anything above 12-15%:
    I use a 1TB external hard drive to back up Time Machine, never had any problems with it.
    What I've tried:
    -I've run Disk Utility (Verify Disk and Verify Disk Permissions) on everything listed and it's found no problems (except on a disk I've ejected and still had problems since, see Changes below)
    e.g.
    -Checked Activity Monitor to check nothing's running like crazy.
    -I've run Sophos Anti-Virus software over everything and it's found nothing
    -Cleared the cache and emptied the trash
    -Restarted numerous times after applying any changes.
    -Look for MacKeeper or MacProtector but haven't got such malware.
    -Got rid of any Damaged Files from Devices: Macintosh HD and emptied trash
    -Deleted The Sims 2.app and all related folders (see below) and restarted (which never actually started so I had to force shutdown again and restart.
    - Installed and ran Memory Cleaner app, which freed up some memory. But problem still occuring.
    Any recent changes:
    Nothing major; racking my brains I can think of:
    -I've had iPhoto open more freqently than usual, but even when it's closed and after restarting I'm still getting the hanging programs
    -I had The Sims 2 disk in, and started the program once, it worked fine. When I was running Disk Utility it found an issue regarding an 'unused node', but it couldn't repair it. So I ejected the disk (which took a minute to respond), and have still had the problems after rebooting.
    -A month or so ago I had a significant problem on Disk Utility so I had to reinstall Mac OS X, Lion 10.7.5. But it has still worked fine since then until a few days ago.
    Please help!

    67 views and no replies yet. I'm just commenting to keep this on the board.

  • I have a problem that I can not load or even close the download in iTunes, it turns out I have hanging in the mode, and because of that I can't download from AppStore, because it turns out that the other programs I have on standby. What do I do? Thank you

    I have a problem that I can not load or even close the download in iTunes, it turns out I have hanging in the mode, and because of that I can't download from AppStore, because it turns out that the other programs I have on standby. What do I do? Thank you.

    If there are multiple apps trying to download at once, only one can download at a time and the rest say "Waiting" until it is then their turn. Try this. Double tap the icon of the Waiting app, and it should resume the download.
    If that doesn't work:
    •  Log out of your iTunes store account.  Go to Settings > Store > Sign Out Then press the Home button.
    • Then press and hold the Home and Sleep buttons simultaneously and don't release them when it brings up the Turn Off screen; keep holding them until the Apple logo appears.
    • After restart, the Waiting should be gone.
     Cheers, Tom

  • How to kill the hanged JFrame in swing?

    How to kill the hanged frame in swing?
    I am opening multiple JFrame and working on them.These frames are plcaed in JDesktopPane.
    If one frame is hanged up then i could not work on others .
    I need to kill the hanged frame.
    Assist me.

    am opening multiple JFrame and working on them.These frames are plcaed in JDesktopPaneWell, a JFrame, can't be added to a JDesktopPane, so your question doesn't even make sense.
    As was suggested earlier, if your GUI is unresponsive, then that means you are blocking the GUI EDT and the GUI can't respond to events. Don't do this.
    Read the Swing tutorial on Concurrency to understand why this happens and to learn the proper way to write GUI code so it won't happen.

  • The "hanging/freezing/not responding" problem that existed in all versions of Firefox 3.6 persists in Firefox 4.0

    Starting on April 14, 2011, I tried installing Firefox 4.0, which I downloaded from the Mozilla site. The first couple of times I tried to install it, it corrupted Firefox file places.sqlite. I know this because the install renamed the file to places.sqlite.corrupt. Luckily, I had recent backups. My previous installed versions were 3.5.18, which I had been using up to this time, and 3.6.16. I tried installing 4.0 with 3.6.16 installed, which I installed only for the sake of installing 4.0, and with no previous version installed and got the same bad results. I finally got a "successful" install on April 16, 2011, with no previous version installed.
    Early on I discovered that Firefox 4.0 hangs (Firefox not responding) when left to idle for exactly 5 minutes (I timed it several times after immediately starting Firefox), pegging a constant 50% of the CPU when it hangs. I left it in a hanging state for up to half an hour, but nothing changed. This problem existed for all versions of Firefox 3.6, which is why I didn't install version 3.6.16 until I was ready to install version 4.0. I never kept any version of Firefox 3.6 installed for more than a couple of hours because of this problem. I need to be able to let Firefox stay idle for long periods of time -- certainly for more than 4 minutes and 59 seconds -- without having it hang, and I was able to do that with all versions of Firefox prior to version 3.6. It's incomprehensible that Firefox 4.0 has to always hang if it's inactive for more than 4 minutes and 59 seconds, and it's incomprehensible that this problem has been present and persistent since version 3.6 was introduced. To believe that 4 minutes and 59 seconds is sufficient idle time for a browser is absurd. This was never an issue with any version of Firefox prior to version 3.6, this was never an issue with Netscape, and it's not an issue with IE 8.
    There are 2 other problems related to the hanging problem. If the browser and the bookmarks library are both open and the browser is closed normally, the bookmarks library remains open. After being left idle for exactly 5 minutes, the bookmarks library hangs, pegging a constant 50% of the CPU. If Firefox 4.0 is restarted before the 5 minute idle limit, it starts successfully. If an attempt is made to restart it after the 5 minute idle limit, it won't start. If the bookmarks library is left open for less than 5 minutes after the browser is closed, it can be closed successfully. In all versions of Firefox prior to version 3.6, the bookmarks library automatically closed when the browser was closed. The other related problem is that Firefox 4.0 occasionally pegs a constant 50% of the CPU without hanging even while it is being used and even if the only thing open is the home page, which in my case is google.com. Firefox can be used while this is happening, but it is worrisome and shouldn't be happening. Normally, Firefox 4.0 uses no CPU when it is left to idle within the 5 minute idle limit.
    Firefox 4.0 has not crashed on its own yet, so I've had no crash reports to send to Mozilla, but because I've had to use the "End Now" button on the Microsoft unresponsive program window numerous times to terminate it when it hangs, numerous Microsoft Windows dump reports have been generated, all of which I've sent to Microsoft.
    The last fully working version of Firefox I had was 3.5.18. Unfortunately, I don't have the installer for that version and Mozilla doesn't make it available anymore. Also, it looks like version 4.0 altered the places.sqlite file such that I might not be able to go back to version 3.5.18 even if I could. If I could reinstall version 3.5.18 and get it to work with the altered places.sqlite file, I would, but it is outdated and no longer supported by Mozilla, and I only want to use up-to-date and supported software.
    The hanging problem is totally intolerable and unacceptable. If I can't get a version of Firefox 4.0 anytime soon that doesn't hang after being idle for just 5 minutes (why 5 minutes???) or for any limited amount of time, I'll have to install and use Google Chrome as a permanent replacement for Firefox. (If I do have to replace Firefox with Google Chrome, how can I get my Mozilla Thunderbird e-mail links to open in Google Chrome when I click on them?) Based on other user feedback regarding this problem dating back to the very first Firefox 3.6 version, Mozilla has had ample time to resolve it. I have found other problems with Firefox 4.0, but I'm not going to bother telling Mozilla about them because if the hanging problem isn't resolved soon, I'll have to stop using Firefox permanently. I can't and won't tolerate the hanging problem. I have been using Firefox exclusively for many years, but my disappointment with it has been growing since version 3.6 was introduced and my patience has run out.
    I would appreciate Mozilla letting me know within a week of this posting if they can't or won't fix the Firefox 4.0 hanging problem. If I don't receive a substantive response to this problem within a week, I'm going to have to abandon Firefox permanently and switch to Google Chrome. I'm also going to leave a negative review of Firefox 4.0 on CNET to warn other potential users of the hanging problem.
    I am running Windows XP Media Center Edition 32-bit SP3 on a Dell XPS 400 desktop computer. I have an Intel Pentium D CPU 2.80GHz, 3.0GB Dual-Channel DDR2 RAM @ 265MHz, RADEON X300 SE 128MB HyperMemory, and 190GB of free space on my hard drive. I am using COMODO as my firewall and Avira AntiVir as my anti-virus software. I am also using WinPatrol and Secunia PSI. My ISP is AT&T. My download speed averages 2.5 Mbps, and my upload speed averages 0.65 Mbps. All of my software is up to date, thanks to Secunia PSI and CNET TechTracker, and my computer is free from infection.

    Another aspect of the Firefox 4.0 "hanging/freezing/not responding" problem has emerged. I have found that on the common occurrence when Firefox 4.0 occasionally pegs a constant 50% of the CPU while idling within the 5 minute idle limit and I close it normally, it disappears from the Task Bar but continues to run and continues to peg a constant 50% of the CPU. I tried restarting Firefox 4.0 and got the following message: "Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system." Before Firefox can be restarted, the existing Firefox process must be killed via the Task Manager or Process Explorer (I use the latter), after which a Microsoft Windows dump report is immediately generated. I always allow the dump to be sent to Microsoft.
    The three big questions that have gone unanswered by Mozilla are 1) why did the hanging problem start with the very first release of Firefox 3.6, 2) why was the problem allowed to continue on up to and through Firefox 4.0, and 3) why hasn't Mozilla fixed the problem yet? And what is the significance of the 5 minute idle limit? Do Firefox 3.6 through 4.0 try to launch something when the browser and/or the bookmarks library have been idle for exactly 5 minutes? Maybe it's a problem with the number and/or type of plugins and extensions and/or the number of bookmarks. Maybe Firefox 3.6 through 4.0 work just fine if there are few to no plugins, extensions, and bookmarks, but that doesn't realistically accommodate users. Whatever the cause of the problem, Mozilla should have had a handle on it by now.
    If anyone from Mozilla Support is reading this post, please let me know if it is possible to roll back Firefox 4.0 to Firefox 3.5.18. If it is possible, how do I do it, and where can I get the installer for Firefox 3.5.18? If I can reinstall it, I'll use it until Secunia Software Inspector informs me that it is insecure and no longer safe to use. At that point (maybe much sooner), I'll switch to Google Chrome exclusively because I don't want to use outdated software that is insecure and because I don't believe that Mozilla intends to fix the hanging problem and is willing to lose users over it. I certainly don't want to use software like Firefox 4.0 that has such an impactful problem. If I do have to abandon Firefox, how can I click on Mozilla Thunderbird e-mail links and get them to open in Google Chrome?

  • How can I allow a sub-vi to run independent of the main program once it has been called while still sending data to the sub-vi

    I have a main program where I call a sub-vi. In this sub-vi, there is a while loop that is used to wait for commands in the sub-vi. While the while loop is running, I cannot continue with normal operation of the main program. I would like get the sub-vi to run independently once it has been called, but not hold up the main program. As well, I need to still be able to send data to the sub-vi

    One way is to use VI Server, which has been mentioned by others. This will allow you to start another VI (by name) and run it entirely independently of the calling VI. This is a good way to start various independent VIs from a main menu, for example. None of the VIs thus called need have any connection to the others.
    Another way it to have the SubVI in a separate while loop on the calling VI's BD. Then, use a local var to start this sub VI from the main loop. The calling VI sets a local START bit and continues running. The sub VI's while loop watches for this START bit to go true, and then runs the Sub VI. The advantage here is that one can more easily pass arguments to the SubVI when it is started, using local vars, which are preferable to globals. Once the Su
    bVI is running, however, you must use a global Stop Bit, set in the calling VI, to stop it when the calling VI exits, or the calling VI will hang up, waiting for the Sub VI to close and exit its while loop.
    If you need an example of this, email me. ([email protected]). I can also recommend Gary W. Johnson's excellent book which discusses this. ("LabVIEW Graphical Programming", 2nd Ed).
    Note: Where possible, I try to call a subvi from within the main VI, wait till it is done, then continue. It avoids the use of locals & globals, and results in cleaner code, with fewer "race" conditions. However, the main VI stops until the subVI is done, hence one should make the subVI modal.

  • The photography program Photoshop, Lightroom & Bridge

    I recently joined the Creative Cloud Photography Plan.  My operating system is Windows 7 64 bit.  After installing the above programs when I shut down the computer I get the message :  Waiting for background programs to close Windows Task Host.  I was not getting that message when shutting down my computer prior to installing the 3 products included in the photography program.  The computer has 8GB of RAM and the NVIDA GTX 650 ti graphics card with 2GB of RAM.  There is 492 GB of free space on the c drive and 500 GB of free space on the second hard drive. I am worried that I may be damaging my computer in some way.  If anyone else knows of something I should do please let me know. I have not uninstalled CS6 or Bridge CS6 due to some plugins not being compatible with the Cloud products.

    If Windows shuts down after a few seconds, then you're ok.
    The Windows Task Host that you referred to in your first message is a hidden process involved in I'm not sure what, but Windows Task Manager is something to view the processes running and resources used by them that you start and stop yourself.
    When you instruct Windows to shut-down, it notifies each process that it is shutting down, and those processes are supposed to respond to that shutdown signal by shutting themselves down.  If after a certain number of seconds processes are not shut down, yet, then Windows shows those in a list--in case it is a program, like Wor or Photoshop that is prompting you to save a document or something else that you need to intervene on behalf of and cancel the shutdown.  If the processes in that list do eventually shut down before the pre-configured wait-for-processes-to-shut-down timelimit then nothing bad will happen; it is only when one of those processes doesn't shut down in time (like Photoshop asking if you want to save your image) and Windows has to kill it before it was ready that something might not be optimal.
    As to why you've just started seeing this after your recent installs, there is probably just a little more going on like Adobe license processes or more RAM and virtual-memory usage or something else like that, which is making the processes respond slower to the Windows shutdown signal so you're being notified that things are still running.  Again, as long as those things are eventually shutting down wtihout being killed by the OS, then you're ok. 

  • Change the default program to open a document?

    Howdy,
    Is there anyway to change the default program to open a .doc file?

    I can't seem to find a post with a solution to this problem. I guess I'm not figuring out the correct search term(s) to use.
    Could be launch services is corrupt and needs to be rebuilt. The usual symptom is double entries in the right context "open with" menu, not the inability to change the default application, but it might be it. Open the Terminal application and copy/paste one of the following commands into it and hit return.  I think the first one is the one you want; the second may be for Lion/Mtn Lion.
    /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.fram ework/Support/lsregister -kill -r -domain local -domain system -domain user
    /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchSe rvices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user
    You might also try repairing permissions in Disk Utility

  • Firefox often hags with an error message somethng like_Script not complete or still running._I cannot uninstall Firefox with the uninstall program routine inthe control panel and the Mozilla uninstall helper.exe will not run either. How do I uninstall Fi

    Firefox hangs with an error message something like - Script not complete or still running.
    I cannot uninstall Firefox with the uninstall program routine in the Control Panel and the Mozilla uninstall helper.exe program will not run either. How do I completely uninstall Firefox so I can make a clean reload?
    == This happened ==
    Every time Firefox opened
    == Not sure but I think it was after the update

    Thanks for the reply.
    I am very new to these forums (or is it fora?).
    I didn't know there was a Tomcat forum.
    How to I find it.
    Ta much & best regards,
    Pete

  • How can I completely remove Realplayer or other similar plugins from Firefox (I've deleted Realplayer and the Realplayer program files)?

    Hello, I am finding that Firefox often hangs and says not responding when I try to open a new page, and also that it takes a very long time to clear cookies and cache. I have read elsewhere that the second problem can be due to plugins, and I have found lots of these, many of which I don't need like Realplayer. So I was wondering if there is some way for me to start from scratch without any plugins at all and then I can install any that are needed?
    I have reset Firefox, uninstalled and reinstalled it and also deleted Realplayer and the Realplayer program files, but nothing seems to change (there are other plugins too which I don't think I use such as VLC Web Plugin - I only use VLC for DVDs - which could also be causing the problem).

    You can find the installation path of all plugins on the <b>about:plugins</b> page.
    *http://kb.mozillazine.org/Issues_related_to_plugins#Identifying_installed_plugins
    *http://kb.mozillazine.org/about:plugins
    *http://kb.mozillazine.org/about:config
    See also "Manually uninstalling a plugin":
    *https://support.mozilla.org/kb/Troubleshooting+plugins

  • Just upgraded my firefox and received a message that the security program McAffee and my Skype program were not compatable and were disabled. Does this mean I have to delete firefox to have skype and McAfee?

    When I upgraded firefox, my skype and McAfee were disabled. Received a message that they were not compatible with the new version of firefox.

    Must be the "hang at exit" problem. You already know how to do Step1; now just determine which Add-on (Extension or Plugin) is causing the problem.<br /><br />
    #Stop the Firefox process:
    #*[http://kb.mozillazine.org/Kill_application Mozillazine - Kill application]
    #*Windows 7 users click [http://www.techrepublic.com/blog/window-on-windows/reap-the-benefits-of-windows-7s-task-manager/2576 here]
    #Why Firefox may hang:
    #*[http://support.mozilla.com/en-US/kb/Firefox+hangs Firefox hangs] (see Hang at exit)
    #*[http://kb.mozillazine.org/Firefox_hangs Firefox hangs (Mozillazine)] (see Hang at exit and Closing Firefox properly)
    #*[https://support.mozilla.com/en-US/kb/Firefox+is+already+running+but+is+not+responding Firefox is already running but is not responding]
    #Use Firefox Safe Mode to find a problem with an Extension or Plugin:
    #*Don't check anything when entering Safe Mode, just continue
    #*If the problem does not occur in Safe Mode it is probably and Extension or Plugin causing the problem
    #*See:
    #**[[Safe Mode]] and [http://kb.mozillazine.org/Safe_Mode Safe Mode (Mozillazine)]
    #**[http://support.mozilla.com/en-US/kb/Troubleshooting+extensions+and+themes Troubleshooting extensions and themes]
    #**[http://support.mozilla.com/en-US/kb/Troubleshooting+plugins Troubleshooting plugins]
    #**[http://support.mozilla.com/en-US/kb/Basic+Troubleshooting Basic Troubleshooting]
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

  • The completed program does not stop by itself.

    I am writing a simple vi to run a loop and also I am writing a few commands outside the loop. I am using a flat sequency structure inside a while loop. I am also writing a few commands oustide the while loop in another sequence structure box adjacent to it.
    The progrm executes and does exactly what I want, but the program does not stop running and the run button remains pressed. So because of this, when I call this VI in a bigger program the bigger program hangs when it calls the sub VI as the sub VI is not finishing. I tried using the STOP button, but when I do this, even the bigger program stops executing at this step.
    Is there any way I can stop this subVI alone.
    Thanks,
    Vijay 

    Your vi has race conditions written all over it.  You local variables are all over the place.  There is no guarantee which will happen first, the variable gets written to, or the variable gets read.  You should learn the concept of data dependency execution flow.  Use wires instead of local variables.  Use Error In and Error Out to create the execution order.  Look at the attached vi, which is a modification of your vi.  Also, if the loop exit conditions are never met (Vout is never less than 0.01 or Vin is never less than 2) then your loop will never exit.  You might want to check if these conditions will actually happen, or put a stop button to manually stop the loop and wire it into an OR function with the other conditions.
    - tbob
    Inventor of the WORM Global
    Attachments:
    UVLO[1].vi ‏44 KB

  • I dont see text options in the RFEBKA00 program

    Hello friends,
    When I run the RFEBKA00 program, I don´t see the text of the every radio button options.
    How I can solve this problem,
    Can you help me please,
    Regards
    David

    did you solve this problem? can you tell me how?

  • SPOOL_INTERNAL_ERROR spool overflow when submitting the same program

    I am submitting the same program via job with different seletion screen values after JOB_OPEN, and then SUBMIT statement and JOB_CLOSE FM. But this job get cancelled with message "ABAP/4 processor: SPOOL_INTERNAL_ERROR" . The submit is as follows:
    SUBMIT (sy-repid) USER sy-uname
             VIA JOB 'ZTP_SAl_REG_MONITOR_JOBS'
             NUMBER l_jobcount
             TO SAP-SPOOL
             SPOOL PARAMETERS fp_user_print_params
              NEW LIST IDENTIFICATION 'X'
             WITHOUT SPOOL DYNPRO
             WITH rb_monit EQ 'X'
             WITH s_jobcnt IN s_jobcnt
             WITH p_date EQ p_date
             WITH rb_row EQ rb_row
             WITH rb_col EQ rb_col
             AND RETURN.
    Is it possible to use the same program to be scheduled....Let me include that the submit is happening with rb_monit = X and it has separate branch...so infinite looping can not happen.

    Hi Sumit,
    I hope that the flag is ensuring that it doesnt go into infinite loop. You may wish to check that once bcz Spool overflow seems to be bcz of infinite loop or bcz of layout issue.
    Goto SP01 in the same client where you have scheduled the job.
    Check the spool no. which was generated bcz of the job.
    Double click on the STATUS of the spool ( it should be in red background color).
    System will give a popup with status details.
    Again double click on the status. System will again give a popup.
    The popup will give the details of why the spool ran into errors.
    Also check the layout.
    Thanks,
    Best regards,
    Prashant

  • Job scheduling(passing the values to the child program)

    when i'm trying to schedule a background job(using job_open job_submit and job_close) i'm passing the values of the selection screen(parent program) to my child program using set parameter id. And trying to get the values using get parameter id in the cild program.
    But the values of the parent program are not being passed to the child program what may be the cause for it?

    rathan,
    Why con't you use
    SUBMIT... [VIA SELECTION-SCREEN]
    [USING SELECTION-SET <var>]
    [WITH <sel> <criterion>]
    [WITH FREE SELECTIONS <freesel>]
    [WITH SELECTION-TABLE <rspar>].
    When you start an executable program, the standard selection screen normally appears, containing the selection criteria and parameters of both the logical database connected to the program and of the program itself (see Direct Execution - Reports). When you start an executable program using SUBMIT, there are various additions that you can use to fill the input fields on the selection screen:
    SUBMIT... [VIA SELECTION-SCREEN]
    [USING SELECTION-SET <var>]
    [WITH <sel> <criterion>]
    [WITH FREE SELECTIONS <freesel>]
    [WITH SELECTION-TABLE <rspar>].
    These options have the following effects:
    VIA SELECTION-SCREEN
    The selection screen of the called executable program (report) appears. If you transfer values to the program using one or more of the other options, the corresponding input fields in the selections screen are filled. The user can change these values. By default, the system does not display a selection screen after SUBMIT.
    USING SELECTION-SET <var>
    This option tells the system to start the called program with the variant <var>.
    WITH <sel> <criterion>
    Use this option to fill individual elements <sel> of the selection screen (selection tables and parameters). Use one of the elements <criterion>:
    <op> <f> [SIGN <s>], for single value selection
    If <sel> is a selection criterion, use <op> to fill the OPTION field, <f> to fill the LOW field, and <s> to fill the SIGN field of the selection table <sel> in the called program.
    If <sel> is a parameter, you can use any operator for <op>. The parameter <sel> is always filled with <f>.
    [NOT] BETWEEN <f1> AND <f2> [SIGN <s>], for interval selection
    <f1> is transferred into the LOW field, <f2> into the HIGH field, and <s> into the SIGN field of the selection table <sel> in the called program. If you omit the NOT option, the system places the value BT into the OPTION field; if you use NOT, the system fills OPTION with NB.
    IN <seltab>, transferring a selection table
    This addition fills the selection table <sel> in the called program with the values of the table <seltab> in the calling program. Table <seltab> must have the structure of a selection table. Use the RANGES statement to create selection tables.
    WITH FREE SELECTION <freesel>, user dialog for dynamic selections
    To use this option, the called program must be connected to a logical database that supports dynamic selections. In the calling program, use the function modules FREE_SELECTIONS_INIT and FREE_SELECTIONS_DIALOG. They allow the user to enter dynamic selections on a selection screen. One export parameter of these function modules has structure RSDS_TEXPR from the RSDS type group. Transfer the values of this export parameter by means of the internal table <freesel> of the same structure to the called report.
    WITH SELECTION-TABLE <rspar>, dynamic transfer of values
    You need an internal table <rspar> with the Dictionary structure RSPARAMS. The table then consists of the following six fields:
    SELNAME (type C, length 8) for the name of the selection criterion or parameter
    KIND (type C, length 1) for the selection type (S for selection criterion, P for parameter)
    SIGN, OPTION, LOW, HIGH as in a normal selection table, except that LOW and HIGH both have type C and length 45.
    This table can be filled dynamically in the calling program with all of the required values for the selection screen of the called program. If the name of a selection criterion appears more than once, the system creates a multiple-line selection table for that criterion in the called program. If the name of a parameter appears more than once, the system uses the last value. Note that LOW and HIGH have type C, so that the system executes type conversions to the criteria of the called program. This is important for date fields, for example. Before your program is used in a live context, you should check it using the VIA SELECTION-SCREEN addition.
    Except for WITH SELECTION-TABLE, you can use any of the above options several times and in any combination within a SUBMIT statement. In particular, you can use the WITH <sel> option several times for one single criterion <sel>. In the called program, the system appends the corresponding lines to the selection tables used. For parameters, it uses the last value specified. The only combination possible for the WITH SELECTION-TABLE option is USING SELECTION-SET.
    If the input fields on the selection screen are linked to SPA/GPA parameters, you can also use this technique to pass values to the selection screen (see Passing Data Between Programs).
    The following executable program (report) creates a selection screen containing the parameter PARAMET and the selection criterion SELECTO:
    REPORT  demo_program_submit_rep1.
    DATA number TYPE i.
    PARAMETERS      paramet(14) TYPE c.
    SELECT-OPTIONS  selecto FOR number.
    The program DEMO_PROGRAM_SUBMIT_REP1 is called by the following program using various parameters:
    REPORT demo_program_submit_sel_screen NO STANDARD PAGE HEADING.
    DATA: int TYPE i,
          rspar TYPE TABLE OF rsparams,
          wa_rspar LIKE LINE OF rspar.
    RANGES seltab FOR int.
    WRITE: 'Select a Selection!',
    SKIP.
    FORMAT HOTSPOT COLOR 5 INVERSE ON.
    WRITE: 'Selection 1',
         / 'Selection 2'.
    AT LINE-SELECTION.
      CASE sy-lilli.
        WHEN 4.
          seltab-sign = 'I'. seltab-option = 'BT'.
          seltab-low  = 1.   seltab-high   = 5.
          APPEND seltab.
          SUBMIT demo_program_submit_rep1 VIA SELECTION-SCREEN
                          WITH paramet eq 'Selection 1'
                          WITH selecto IN seltab
                          WITH selecto ne 3
                          AND RETURN.
        WHEN 5.
          wa_rspar-selname = 'SELECTO'. wa_rspar-kind = 'S'.
          wa_rspar-sign = 'E'. wa_rspar-option = 'BT'.
          wa_rspar-low  = 14.  wa_rspar-high = 17.
          APPEND wa_rspar TO rspar.
          wa_rspar-selname = 'PARAMET'. wa_rspar-kind = 'P'.
          wa_rspar-low  = 'Selection 2'.
          APPEND wa_rspar TO rspar.
          wa_rspar-selname = 'SELECTO'. wa_rspar-kind = 'S'.
          wa_rspar-sign = 'I'. wa_rspar-option = 'GT'.
          wa_rspar-low  = 10.
          APPEND wa_rspar TO rspar.
          SUBMIT demo_program_submit_rep1 VIA SELECTION-SCREEN
                          WITH SELECTION-TABLE rspar
                          AND RETURN.
      ENDCASE.
    Pls. reward if useful...

Maybe you are looking for

  • Return data from all columns apart from a certain data type.

    Bit stuck on something, hope somebody here can help: I want to do a 'select * from ' a table, to return all columns except ones of a certain datatype. ie. I want to return data from all columns, excluding columns of datatype 'SDO_GEOMETRY'. This give

  • Change color of series in Charts to custom colors - error in macro generated by Excel

    The case: Excel 2013, Multiple cheets with multiple charts of different type. Several charts doesn't show well will the defaut color automatically generated by Excel. -> The idea is to modify these graphics only with a specific color combination (mod

  • HT4528 Problem with messages

    Since upgrading to the most current system - iO6, my messages have not worked right. Yesterday out of the blue, I couldn't reply or send a text to anyone that has an iPhone .. the keyboard was grayed out. Today the same thing, was working ok then whe

  • About this Mac, Storage, "Other".

    What is put in this 'Other' category?  My Other category shows that it has 101.33GB in it...I'd like to try and clean this out so I have more disk space.  Thanks, Lin

  • Continuous text in 2 rows fu00FCr advertisement column

    Hello, I'am lookiing for a possibility to create a pdf-form with continuous text in 2 rows for advertisement columns. Maybe someone know a solution? Thanks in advance!