How to stop main process in BADI

Hi All,
I am using WORKORDER_UPDATE BADI to do some planning data manipulations..
If something gone wrong in planning data manipulations user should get error message and should stop main process i.e. update of production order.
Is it possible with in BADI?
If yes ..please help me with your suggestions..
Thanks

Hello,
it would be possible in the method AT_SAVE - if you do so, you would have to raise the exception ERROR_WITH_MESSAGE.
But it's the only method where you can do so...
Regards Wolfgang

Similar Messages

  • How to stop a process chain when its running?

    Dear Experts,
    How to stop a process chain when its running? is it that a chain can be stoppend when we open an info package of that chain ?
    Thank you,
    Raj

    Hi,
    Goto the main menu process chain --> choose the remove from the Schudule...
    Regards
    sathis
    I hope it helps to u... please assign the points

  • How to Stop the process chain if it in the middle of the process?

    Hi,
    Is there anyway that i can stop the process chain if it is in the middle of the process already?
    Raj

    "Hi,
    First and foremost let me advice you to be very careful while doing this.
    You can start from SM37, find the process WID/PID then go to SM50 or SM51 and kill it. Once its done come back to RSMO and check the request, it should be red but again manually force to red and save by clicking on the total status button in the status tab. This shuld ensure that the process is killed properly.
    The next step will be to go to targets that you were loading and remove the red requests from those targets.
    Note: For source system loads you may have to check if the request is running in the source system and kill if needed and pull it again.
    But for BW datamart delta loads u may have reset the datamarts in case u are going to pull the delta again.
    Different Ways to stop process chain
    1)SM37 -->Kill Job
    2)SM50/sm66- ->Kill process
    3)RSPC>Job Log>Make the process RED forecefully.
    4)RSPC>Process chain> main Menu"Remove from Scheduling" OR
    5)se37-->RSPC_API_CHAIN_INTERRUPT
    give RFC BW system name(technical) and process chain name(technical)
    Steps 1 -3 stops the chain running in process
    Steps 4-5 stops the chain AFTER the current job which is running is completed as sucessful or Failure by nature.
    Rationale - 4-5
    This function will only remove the jobs from schedule, which did not yet run. It will not kill running jobs, as this may leave the system in an inconsistent state, moreover killing processes is possible for synchronous processes only anyhow. This means, that there will be no errors with interrupted chains, which on the other
    hand means an interrupted chain is not restartable. So for a running chain this function is intended to be an emergency break only. You can use it, however, to remove a scheduled chain from schedule, such that it does not start except by your product.
    Re: Kill a Job
    Re: Killing a process chain.
    How to stop a process in a process chain?
    Regards,
    JituK

  • HOW TO STOP THE PROCESS CHAIN WHICH IS RUNNING IN THE PRODUCTION?

    HI ALL,
    CAN ANYONE TELL ME HOW TO STOP THE PROCESS CHAIN WHICH IS RUNNING DAILY AT 5.00 PM. I NEED TO STOP THE PROCESS CHAIN FOR COUPLE OF DAYS AND THEN RESTART IT AGAIN.
    cAN ANYONE TELL ME THE PROCEDURE TO STOP THE ENTIRE PROCESS CHAIN RUNNING IN THE PRODUCTION.
    THANKS
    HARITHA

    Hi,
    First and foremost let me advice you to be very careful while doing this.
    For Rescheduling
    RSPC> chain > Goto > Planning view and
    click on Execution tab > select > Remove from Schedule and then in Maintain variant of start process reschedule for the day you require it to run.
    For terminating active chain
    You can start from SM37, find the process WID/PID then go to SM50 or SM51 and kill it. Once its done come back to RSMO and check the request, it should be red but again manually force to red and save by clicking on the total status button in the status tab. This shuld ensure that the process is killed properly.
    The next step will be to go to targets that you were loading and remove the red requests from those targets.
    Note: For source system loads you may have to check if the request is running in the source system and kill if needed and pull it again.
    But for BW datamart delta loads u may have reset the datamarts in case u are going to pull the delta again.
    Re: Kill a Job
    Re: Killing a process chain.
    Regards,
    JituK

  • How to stop the process chain showing status as yellow but no process step

    Dear Friends,
    How to stop the process chain showing status as yellow but no process step is running in that process chain.
    We have manually triggered the process chain for sales it finished successfully till load data but the next step is create index and DB statistics. Both of this steps are in unscheduled position only and no background job for this.
    Please guide me.
    Thanking you in advance.
    Regards,
    Shubhangi

    Hi,
      At times even I have faced this situation.  During those times, running the Function module RSPC_PROCESS_FINISH by passing the right parameters came to my rescue.
    Regards,
    Raj

  • How to stop main thread ?

    Hi,
    Inside my java class, after I launch a GUI, I want to stop this main thread. After user make some choice and close GUI window, then, I want to go back to main thread. I use wait() method inside my class to stop main thread , but it does not work and it give me "IllegalMonitorStateException" error. I met same thing, when user close the GUI window and call method notifyAll(). How to stop main thread for a while and how to go back?? Thanks
    Gary

    Hi,
    you can create a boolean, and create a while loop, with a Thread.sleep(time); when you want to continue, you just have to change the state of your boolean. So you don't hava to exit the main. And you can't restart a run() in a thread. You can run it only once, so try to keep in your run() with an appropriate loop.
    Hope it helps.
    S�bastien

  • How to stop a process (that is executing)

    Hi all
    my question is How to stop a process that is executing ?
    some other languages has a function called yield() in java how I can do it.
    thanks

    You can tell a Thread to yield - That is, cause the currently executing thread object to temporarily pause and allow other threads to execute.

  • How to stop a process in process chain

    Can anyboday help , How to stop a process in process chain .
    Thanks
    PP

    Hi Phani
    In RSPC, Open the Meta Chain, In Process Chain Manu bar,
    Select the option "Remove From Schedule"
    Hope this will help you
    Regards
    Saravanan.ar

  • How to stop/cancel Process Chain in BI 7.0

    Hi,
    Could you tell me how to stop/cancel a process chain that hangs with status yellow or green in BI 7.0? There was an easy option to do it in 3.x, but I cannot find a similar option in 7.0.
    What happens is that at random our process chains hang at a certain variant with either yellow or even green status and do not proceed further. What happens is that in a couple of hours another pchain run occurs and it executes fine. Then again at random (might be the same day or the next day) the process chain hangs again. I think that all those "hanged" pchains pile up in the queue, so that it cause other future pchains to hang as well at some point. So, is there anyway to stop/cancel these zombie process chains when it stops at a particular event RSPROCESS in BI 7?
    Thank you,
    AG
    Message was edited by:
            AG

    Hi Frank,
    Thanks for your reply. I have a few questions.
    1)SM37 -->Kill Job
    We cannot do that because the job has already finished.
    2)SM50/sm66- ->Kill process
    There are no hanged processes to kill
    3)RSPC>Job Log>Make the process RED forecefully
    How do you do that exactly?
    4)RSPC>Process chain> main Menu"Remove from Scheduling"  OR
    5)se37-->RSPC_API_CHAIN_INTERRUPT
    give RFC BW system name(technical) and process chain name(technical) - we can do this,  but what exactly would it accomplish. Would it remove the process chain from any runs in the future or also any hanged ones in the past? An how is this step different from #4?
    Thank you,
    AG

  • How to stop threads, process, streams when closing a (internal) JFrame?

    Dear all,
    I read a Javaworld article about Runtime.exec(), which will output the process outputs and error outputs to either a file or System.out. Now I want to practice it by outputing the process output/error to a Swing JTextArea. It works fine if the process ends successfully.
    My problem is that I want to stop all the output threads and clear all the streams when user click close JFrame button before the process finished. The code is shown below. Note that this frame is poped up by a click from another main frame. ( it is not exiting the main Swing application). This happened when I want to kill a process when it is running.
    I tried to implements a WindowListener and add
    public void windowClosing(WindowEvent e) to the JFrame.
    Inside this method I used process.destroy() and errorGobbler = null, outputGobbler = null, or outputGobbler.interrupt(), errorGobbler.interrupt(). But all these seems does not work. Sometimes thread was not stopped, sometimes process was not destroyed (because the stream was still print out something), sometimes the error stream was not successfully closed - by printing out interruptted by user error message.
    How can I make sure all the underlying streams and threads, including the PrintStream in StreamGobbler class are closed?
    Again this Frame could be a Dialog or InternalFrame, i.e, when I close the frame, the main frame does not exit!
    import java.util.*;
    import java.io.*;
    class StreamGobbler extends Thread
        InputStream is;
        String type;
        OutputStream os;
        StreamGobbler(InputStream is, String type, JTextArea out)
            this(is, type, null, out);
        StreamGobbler(InputStream is, String type, OutputStream redirect, JTextArea out)
            this.is = is;
            this.type = type;
            this.os = redirect;
        public void run()
            try
                PrintWriter pw = null;
                if (os != null)
                    pw = new PrintWriter(os);
                InputStreamReader isr = new InputStreamReader(is);
                BufferedReader br = new BufferedReader(isr);
                String line=null;
                while ( (line = br.readLine()) != null)
                    if (pw != null)
                        pw.println(line);
                    out.append(type + ">" + line);   
                if (pw != null)
                    pw.flush();
            } catch (IOException ioe)
                ioe.printStackTrace(); 
    public class Test extends JFrame
        private JTextArea output;
        private StreamGobbler outputGobbler;
        private StreamGobbler errorGobbler;
        public Test (String file)
            super();
            output = new JTextArea();
            try
                FileOutputStream fos = new FileOutputStream(file);
                Runtime rt = Runtime.getRuntime();
                Process proc = rt.exec("java jecho 'Hello World'");
                errorGobbler = new
                    StreamGobbler(proc.getErrorStream(), "ERROR", out);           
                outputGobbler = new
                    StreamGobbler(proc.getInputStream(), "OUTPUT", fos, out);
                errorGobbler.start();
                outputGobbler.start();
                int exitVal = proc.waitFor();
                output.append("ExitValue: " + exitVal);
                fos.flush();
                fos.close();       
            } catch (Throwable t)
                t.printStackTrace();
         setSize(400,400);
         show();
    }Thanks !

    Thread.interrupt() doesn't stop a thread. You'll have to read the API for more specifics. You could use something like interrupt to force interruption of the thread for the reason of checking the terminating case though. I believe you would want to use this in the case where operations can take a long time.
    Setting your reference to the thread to be null won't stop the thread since it's running. You just lose your reference to it.
    I believe once the thread stops running your streams will be closed, but possibly not cleanly. Someone who has more knowledge of threads might be able to answer this better, but I would generally say clean up after yourself especially if you are writting out data.

  • How to stop a process?

    last time i selected all the files in a folder and expected them to open in one Preview window, but each opened a window and it took a long time. When this happens, how can i stop the process immediately?

    Quit the application using CMD+Q. If that doesn't work, OPTION-click the app's Dock icon, and select force quit.

  • How to stop a process in a process chain?

    Hi
    I've got a process chain that calls several processes.  It's still running one of the processes but I want to stop the two that will run after (as it is now in the day time and they will impact on performance in our R3 system).
    I've looked on SM37 but when I put in BI_* nothing comes up.  Do anyone know how I can stop these processes from running before they start ?
    Thanks in advance
    Sandra

    Hi Sandra,
    Just goto the process types that are supposed to run afterwards... and rt click select released job-> select the job and press shift + F6 (from scheduled state to release state)
    If u observe in PC now after refreshing this step will not be green (grey meaning not scheduled to run)
    similar for other.
    thanks

  • How to put main process to sleep??

    Hi experts
    I have another problem in my ajav application , When I press execute button, it creates a process which run a bat file. the bat file actuallty run something and produce the output file. then main process read that output file and show the content in the result panel . Now in order to finish the process, I put the main process to sleep, other wise it cant find the file or it shows incomplete file/empty file. I use Thread.sleep(2000). But this is not appropriate , sometimes the files might be big or the bat file might need much time to finish which is common senario , In that case,I wont get appropriate output. My question is how can I put the main process to sleep until the the other process finish creating the file.
    Any clue is helpful. Pls help. I am stucking at this point.
    public class ButtonHandler implements ActionListener {
         GUIPanel guiPanel;
         ButtonHandler(GUIPanel gp){
              guiPanel=gp;
          public void actionPerformed (ActionEvent e){                    
              JButton button = (JButton)e.getSource();
              if(button == guiPanel.excButton){
                   runBatFile(); // run the batch file
                   try { // put main process to sleep
                        Thread.sleep(4000);
                   } catch (InterruptedException ex) {
                        System.out.println("Too much Caffine! Cant Sleep..");
                        System.out.println("Error:" +ex);
                   }//end of catch
                   parseResult();     //show the output               
              if(button == guiPanel.closeButton){
                   System.exit(0);
          }//end of fucntion
         public void runBatFile(){
              Process p=null;
              try {
                    //p = Runtime.getRuntime().exec("test.bat");                 
              } catch (IOException e1) {
                       System.err.println(e1);     
              }//end of catch      
         }//end of function
         public void parseResult(){
              try {
                   BufferedReader in=new BufferedReader(new FileReader("test.txt"));
                   String s1;
                   JTextArea jta=new JTextArea();     
                   jta.setFont(new Font("Serif", Font.BOLD, 14));
                     jta.setEditable(false);
                   JScrollPane jsp = new JScrollPane( jta,JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
                                               JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS );
                   jta.append(" ");     
                   int lineCount=0;
                      while((s1=in.readLine())!=null){
                        System.out.println(s1);
                        lineCount++;
                        jta.append(s1);
                        jta.append("\n");
                   }//end of while
                   in.close();
                   jta.append("\n\nI am done with it:"+ lineCount+"\n");
                   resultPanel.removeAll();                                
                         resultPanel.add(jsp);
                   resultPanel.revalidate();
              } catch (IOException e1) {
                       System.err.println(e1);               
                       System.exit(1);
              }//end of catch      
         }//end of function
    }//end of class 'ButtonHandler'

    pkwooster
    Thanks for ur explanation. I I added invokelater and get some exception: "Cannot call invoke and wait from evene dispatcher thread." How can I eleminate that. Pls reply.
    public class ButtonHandler implements ActionListener {
         GUIPanel guiPanel;
         ButtonHandler(GUIPanel gp){
              guiPanel=gp;
          public void actionPerformed (ActionEvent e){                    
              JButton button = (JButton)e.getSource();
              if(button == guiPanel.excButton){
                   JTextArea jta = new JTextArea();
                   jta.setFont(new Font("Serif", Font.BOLD, 14));
                     jta.setEditable(false);
                   JScrollPane jsp = new JScrollPane( jta,
                   JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS );
                   resultPanel.removeAll();     
                   jta.append("Please wait while we retrive the Information... ");
                   resultPanel.add(jsp);
                   resultPanel.revalidate();
                   runBatFile(); // run the batch file
                            parseResult();     //show the output               
              if(button == guiPanel.closeButton){
                   System.exit(0);
          }//end of fucntion
         public void runBatFile(){
              try {
                   SwingUtilities.invokeAndWait(new Runnable() {
                   public void run() {                
                        Process p=null;
                        try {             
                               p = Runtime.getRuntime().exec("abaqus_license.bat");               
                        } catch (IOException e1) {System.err.println(e1);}//end of catch
               } catch(Exception e) {;}
              }//end of function
         public void parseResult(){
              ;//do something
         }//end of function
    }//end of class 'ButtonHandler'

  • How to stop the Process Chains?

    Hi Everyone,
       I have a process chian which is running daily, but i want to stop in a particular day( for ex on wednesday).The process chain has to run on remaining days.So how can i stop the process chain on the particular day. Please do answer me.
    Thanks
    Veerendra

    Hi Virendra,
    After start process , insert a node of abap program and insert program with following code .
    Report zntest.
    data : lt_attr like CASDAYATTr occurs 0 with header line.
    CALL FUNCTION 'DAY_ATTRIBUTES_GET'
    EXPORTING
       DATE_FROM                        = SY-DATUM
       LANGUAGE                         = SY-LANGU
      TABLES
        DAY_ATTRIBUTES                   = Lt_ATTr.
    write : / lt_Attr-WEEKDAY_L.
    read table lt_attr index 1.
    if lt_Attr-WEEKDAY = '3' . "3 Stands for 3rd day of week i.e. Wednesday
      message 'Process chains not to be run on wednesday' type 'E'.
    endif.
    Make sure that this ABAP program is linked to other processes only on  "Success",
    Hope that helps.
    Regards
    Mr Kapadia

  • How to stop the process chain on every saturday and delay until sunday 6 am

    Hi experts,
    We have a maintanence window on every saturday until 6 am on sunday.
    My question: I don't see any option in the start variant of the process chain under restriction to stop the process chain on saturday and delay the run until sunday 6 am. Any idea?
    Please let me know the steps. Thank you in advance.
    Sharat.

    how to create a event for a process chain? please let me know step by step instructions.
    Also I will schedule the regular process chain until friday and use the new variant to schedule it on sunday at 6:00 pm right?
    Thanks in advance.
    Sharat.

Maybe you are looking for

  • Confirmed quantity during sales order migration

    Do any of you experts see any issue with the following approach to set the schedule line confirmed quantity? We need to migrate open order from Legacy to SAP system. While migrating we need to keep the schedule lines (dates and confirmed quantities)

  • How can I make dragon dictate 2.5 work with Lion?

    DD 2.5 crashes and won't start even after re-installation.  Fixes?

  • Ethernet and wifi clashing?

    hi, hope someone can help. i have a brand new imac 21.5" i run some IP cameras on a local wired network, 192.168.1.xx these are picked up fine. when i turn on the Airport, to connect to my wifi, the ethernet network drops. is there a way to have both

  • Password expiry tracking report

    Hi, Appreciate anyone can help me. I have change the password expiry setting in the RZ10, from 30 days to 60 days. Is they any report tracking to check on the password expiry upon reset the password instead of counting it manually?Can we get this inf

  • BEx Designer: How to count if an InfoObject(field=ProblemNr)  is empty

    Hi, in the ROWS i have an InfoObject (let's say ProblemNumber) and in the COLUMNS another InfoObject (Date). The IO in the Rows is not a primary key and it's not always filled in. The OrderNr might be a primary key. I want to find out how many of the