How to Stop The Process of oRecordSet.DoQuery()

Hi all..
I would like to ask 1 question.
When program is executing the query passed as a parameter to oRecordSet.DoQuery(), is there any way we can stop the process by clicking on cancel button or other events?
thx.
regards'
erwine

Hi all..
thx for your quick replies.
Coz currently im doing SDK module which requires to process alot of data..and the process of inserting and updating to DB is kinda complicated. So basically, i use transaction to start and when i encounter error, i will rollback.
Let's say if client run the program and suddenly realized that he/she gives wrong input and wants to cancel the whole process.What can i do? Client may say that button 'Cancel' is actually quite confusing because cancel is self-explanatory term to cancel process, but in SAP BO, it's actually to quit the form.
I once thought of using thread, however, the event to trigger thread to stop will have to wait until the process done. so it's quite complicated

Similar Messages

  • 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 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 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.

  • How to stop the process for some time

    I want to stop the process for some time can any one give the package or keyword or example for the same
    For suppose two programs A and B.. .B will run based on output of A. What i need is... When A is executed the process will stop for 5mins then B has to execute...

    You can use signals with DBMS_ALERT to "wake up" a procedure.
    Procedure A is something like this:
    DBMS_ALERT.REGISTER('B_FINISHED');
    do logic...
    when finished - send a signal
    DBMS_ALERT.SIGNAL('A_FINISHED','B you can start');
    now wait until B is finished
    DBMS_ALERT.WAITANY(...)
    continue logic hereAnd Procedure B is
    DBMS_ALERT.REGISTER('A_FINISHED');
    wait for a to finish
    DBMS_ALERT.WAITANY(...);
    do logic...
    when finished, signal A it can continue
    DBMS_ALERT.SIGNAL('B_FINISHED','A can continue');This is useful if u they need to wait for each other within the code. if they just need to wait - call B from A.
    Hope this helps.
    Edited by: Pyrocks on Nov 8, 2010 8:50 AM

  • How to Stop the process of Thread

    Hi,
    A process is running in a thread, which will create a file with records in it.
    I have a cancel button and if I click the button, the process should be stopped i.e. it should not allow to create the file. Is it possible to do this?
    If so, how to achieve this? Please help me in this regard...
    Thanks in Advance

    Hi,
    A process is running in a thread, which will create a
    file with records in it.
    I have a cancel button and if I click the button, the
    process should be stopped i.e. it should not allow to
    create the file. Is it possible to do this?
    If so, how to achieve this? Please help me in this
    regard...
    Thanks in AdvanceThere is no (safe) way of just stopping the thread. What you can do is have a flag in your Runnable/Thread object that you flip when you click the Cancel-button. Then in your run() method you check every now and then if the flag has been flipped. If the flag has been set you stop what you are doing and do necessary cleanup.
    Something along these lines should do it (this is just a skeleton code that won't compile, but the general idea should hopefully be clear):
    class FileCreator implements Runnable {
        private File file;
        private boolean cancelled = false;
        // Method to call when you click the Cancel-button
        public synchronized void cancel() {
            cancelled = true;
        public void run() {
            // Do whatever it is you need to do. On suitable places in the code you check if
            // the job has been cancelled. E.g.:
            try {
                if( cancelled ) {
                    return;
                // Create the file
                file = new File(...);
                if( cancelled ) {
                    return;
                // Add the records to the file:
                for( Record rec : getRecords() ) {
                    if( cancelled ) {
                        return;
                    addRecordToFile(rec, file);
                // etc, etc
            finally {
                // Do necessary cleanup if the job was cancelled, e.g.:
                if( cancelled ) {
                    if( file != null ) {
                        // The file was created before the job was cancelled. Delete it:
                        file.delete();
                    // etc, etc
    // Somewhere else in your code:
    FileCreator fc = new FileCreator();
    new Thread(fc).start();
    JButton btnCancel = new JButton("Cancel");
    btnCancel.addActionListener( new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            fc.cancel();
    ...Hope this helps!

  • How to stop the process chain

    Hi Sapients,
    I am loading the data from R/3 to BW through Process chain. Please let me know how to stop execution of  the process chain.
    Thanks
    Mahi.

    Hi Mahendra,
    You have to stop the load in the source system if u r loading from R/3 System, for that use transaction SM50 or SM51 to kill the process.
    Hope it helps. Assign points if helpful
    Cheers
    Raj

  • In-process inspection...how to stop the process order confirmation?

    Hi...i'm making an in-process inspection and i want to stop the movement to the next phase or the process order confirmation, until the usage decision is made...how can i make this ?

    Dear,
    You can do this with OPK4 setting here slect your plant and process order type go in details here change the setting to
    Results Rec. (QM) = Error message  if no inspection result exist.
    Regards,
    R.Brahmankar

  • OBIEE Server Hangs how to stop the process?

    Hi,
    I schedule one report in BI publisher and in history its showing status as ‘Running’ from a long time, I want to terminate that process and want to stop the running report.
    But as I don’t no much about OBIEE I am unable to do that. Could you please help me with this.
    Thank you.

    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

  • Stop the Process Chain

    Hai Friends..,
    How to stop the process chain?
    Please advise me..
    Thanks

    Hi Kannan,
    To Stop the Process chain :
    1. Goto Transaction code : RSPC
    2. Click on your chain.
    3. Goto the Menu Bar.
    4. Under Execution -> Remove From Schedule.
    5. Click on that this will remove your chain from schedule.
    If you still can't find this option in Menu Bar then follow the below steps :
    1. Goto Transaction code : RSPC
    2. Click on your chain.
    3. Press CtrlShiftF3.(Shortcut for Remove From Schedule)
    This will alos do the same.
    Hope it helps.
    Regards
    Hemant Khemani

  • How to stop the upload process?

    Hi,
    i had by mistake started the other upload than the required!
    How to stop the current upload process,( generally it takes lot of time to upload the data as data is huge )
    Thanks,
    Ravi

    Hi Ravi Kottur 
    Just follow the things like Sunil suggested check one more just kill the process
    manually and goto RSMO and in the Monitor QM status just Amke it red manually
    for the load which you want to stop and then go to that particular info provider
    Manage and delte the request.. 
    Hope itz clear a little atleast...!
    Thanks & Regards
    R M K
    ***Assigning pointz is the only way of saying thanx in SDN ***
    **Learning the thingz is never end process if u stop it will Be a devil if u continue it will be a divine***
    > Hi,
    >
    > i had by mistake started the other upload than the
    > required!
    >
    > How to stop the current upload process,( generally it
    > takes lot of time to upload the data as data is huge
    > )
    >
    >
    > Thanks,
    > Ravi

  • How to stop the running process chain

    How to stop the running process chains or infopackges...just qm status change is enought?

    BI - SM 37 - Kill the Job
    ECC - SM 50 - Kill the job

  • How to stop the backup process....

    How to stop the backup process....
    Okay, so it happens nearly everytime you synch your iPhone with your iTunes? Easy. As soon as it starts, hit the "X" in the bar where the backup process is being shown, this does NOT STOP the synching process, ONLY the backup process.
    HOWEVER, keep in mind that a few times during the week (depends how often you synch ur iPhone) it will be good to let the backup process let run fully.
    There we go. Problem solved...

    i agree its what i do i backup whenever i add a new app, or take more pics etc its exactly what i do its what ive been saying on all these threads talking about backups etc, im hoping in 2.0.1 will be bug fixes about this sort of thing...

Maybe you are looking for

  • Unable to capture 2 audio tracks

    FCP refuses to capture 2 audio channels?! I have one mic on channel 1 and another mic on channel 2 but FCP captures only 1 mono track eventhough in Clip Setting both channel 1 and 2 are selected. Does anybody know what could be wrong? Another thing i

  • Whi isn't my Wi-Fi working on my iPod Touch 4th generation?

    So yesterday I was using the internet and the apps that require internet on the iPod and everything was fine. Comes later on that night thw Wi-Fi cut out. I didn't understand why and I still don't understand. I turned the wi-fi off, unplugged the rou

  • Which Listener is the best for Validation?

    Hi, I have a problem with my Validation. At the moment everytime I write something in the TextInput the keyUp Event triggers the validate() function. But I want to trigger the function before I type something in, because if I don´t type anything at a

  • Dispay of aavailable batches for a material

    Dear Friends, I want to see the available batches for a specific material-plant/storage location combination. Can anybody guide me how to find out the available batches for this combination. Thanks & Regards Satya

  • Hope I can get this posted before safari quits again!!

    Help! Safari keeps quitting on me. tried the font nuke solution in earlier similar post...did not work. Error message is below. thanks in advance!! Process: Safari [172] Path: /Applications/Safari.app/Contents/MacOS/Safari Identifier: com.apple.Safar