Need to run 2 concurrent programs after completing child concurrent program

Hi,
Could you suggest me on below:
R12/ 11g
I have main concurrent program MAIN_CONC_PG.
In this concurrent program there is a child concurrent program CHLD_CONC_PG.
This child concurrent program will run for parameters 1,2,3,4,5.
CHLD_CONC_PG program will run simultaneously 5 times:
CHLD_CONC_PG ==> 1
CHLD_CONC_PG ==> 2
CHLD_CONC_PG ==> 3
CHLD_CONC_PG ==> 4
CHLD_CONC_PG ==> 5
Now, after completion of above 5 Child Concurrent programs i have to start 2 more concurrent programs using fnd_request.submit_request:
1) Item Attributes
2) Vendor populate
Thanks.

931832 wrote:
yes, both the Conc Programs are part of Main Conc Prog.
1) Item Attributes
2) Vendor populate
I should be using FND_CONCURRENT.WAIT_FOR_REQUEST.
any sample code that uses FND_CONCURRENT.WAIT_FOR_REQUEST ??
IN my Main Conc Prog, i have below child conc prog. after completing below program i have to run 1) Item Attributes 2) Vendor populate conc progms.
FOR i IN 1..v_count
LOOP
v_request_id := fnd_request.submit_request(application => 'XXDH',
program => 'XXPTN_ITEM_ORDR_E',
description => NULL,
start_time => NULL,
sub_request => FALSE,
argument1 => i);
END LOOP;Hi,
You can also try something like this.
declare
  l_reqid_tab is table of number index by pls_integer;
  l_reqid_tbl l_reqid_tab;
  function program_successful ( p_conc_req_id number ) return boolean
  is
    l_finished    boolean;
    l_phase       varchar2 (100);
    l_status      varchar2 (100);
    l_dev_phase   varchar2 (100);
    l_dev_status  varchar2 (100);
    l_message     varchar2 (100);
  begin
    if p_conc_req_id > 0 then
      l_finished := fnd_concurrent.wait_for_request ( request_id => p_conc_req_id
                                                     ,interval   => 5
                                                     ,max_wait   => 0
                                                     ,phase      => l_phase
                                                     ,status     => l_status
                                                     ,dev_phase  => l_dev_phase
                                                     ,dev_status => l_dev_status
                                                     ,message    => l_message );
      commit;
      if upper(l_dev_status) in ('WARNING', 'ERROR') and upper(l_dev_phase) in ('COMPLETE') then
        return false;
      elsif upper(l_dev_status) in ('NORMAL') and upper(l_dev_phase) in ('COMPLETE') then
        return true;
      else
        return false;
      end if;
    else
      return false;
    end if;
  end program_successful;
begin
  for i in 1..v_count loop
    l_reqid_tbl(i) := fnd_request.submit_request....
  end loop;
  for i in 1..l_reqid_tbl.count loop
    if program_successful(l_reqid_tbl(i)i) then
      null;
    end if;
  end loop;
  -- code to submit your other program here.Hope this helps.
Regards,
Allen
Edited by: Allen Sandiego on Jun 18, 2012 9:47 AM
Made some modifications since number of spawned child requests is variable.

Similar Messages

  • Send email to users after completion of conc program by using Alerts

    Hi,
    I want to send email to users after completion of concurrent program by using Alerts . please guide me how to create alert and should send email of concurrent program details to user.
    Thanks in advance..it's a urgent requirement so help me.
    Regards
    Narender B

    Application Express != Oracle Applications
    You got into wrong forum please add here {forum:id=475}

  • Scheduling a parent concurrent program to activate child concurrent program

    Hi All,
    I have a below mentioned requirement and as I have not come across such request before can somebody please confirm me if it can be achieved using a request set.
    We want a parent concurrent program to activate a child concurrent program with a certain schedule. The child program upon completion should schedule itself to run the next time according to the schedule set initially.
    So by using a request set can I achieve the above mentioned requirement or are there any better way to achieve this?
    Thanks,
    Regards,
    Anup
    Edited by: 965824 on Oct 16, 2012 11:58 PM

    Hi Helios,
    Thanks for your response checked the link that was provided, but it has information on start and end dates of a Parent concurrent request and all child processes. But in my case I want a parent concurrent program (which in turn should activate the Child concurrent program) to be submitted once . The child program upon completion should schedule itself to run the next time according to the schedule set initially. So I am checking whether this can achieved using a request set. But in a request set I am not sure whether a separate schedule can be created for individual concurrent programs . Currently I don't have access to any instance, so I am not able to try out that.
    Regards,
    Anup

  • How to submit a program after completion of a background job

    Hi Experts,
    I have a small issue. In my report program i am calling one transaction using call transaction it will trigger a background job. After completion of this background job i need to submit another program, Because the background job updating few values, using this value only the second program functionality will works.
    Currently when i execute my report its calling 1st program and triggering the background job. Once the job started again the program triggering the next program. Here after competion of the background job only this program should submit next program. Anyone kindly suggest some clue.
        CALL TRANSACTION 'ZSAPRCK60' USING    zbdcdata
                                OPTIONS  FROM g_s_options
                                MESSAGES INTO msg_tab.
    SUBMIT SAPRCK10    VIA SELECTION-SCREEN
                        WITH kalaid = p-kalaid
                        WITH kaladat = sy-datum
                        WITH PARALLEL = 'X'
                        WITH SERVNUM = '10'
                        WITH backgr = 'X'
                        AND RETURN.
    Mohana

    Hi,
    There is one function module there which gives you the job status .. if the job is finished then the value will be 'F'.I don't exactly remember the FM but then you can search with BDLSTATUS or BDSTATUS in SE37..
    do.
    call fm BD****STATUS
    IF STATUS (IMPORT PARAMTER) eq 'F'.
    exit.
    endif.
    enddo.
    Regards,
    Nagaraj

  • Is there a new driver needed to run Photoshop CC after installing Windows 8.1?

    Has anyone had trouble with downloading pictures to Bridge after installing Windows 8.1?

    You may have to reset preferences.  Hold down Ctrl key and start Bridge.  You should get a reset window.

  • Do I need to run anti-viral program after trying to open a spam attachment?

    I was tricked by a spam email and clicked on a link, which did not open.  I've been advised to delete the email (done), change my password (done), and run anti-viral program (not done, and never have).  What, if anything, should I do? 

    You don't need to run antivirus software after that. Just be more careful in the future.
    (114282)

  • Create child concurrent program for multi-processing

    Hi,
    I have a requirement where in I need my main concurrent program to generate child concurrent programs to process data in parallel.
    I want all the child programs to write the response in the output file of the main concurrent programs.
    Any pointers to this will be a real help.
    Thanks.
    Jujaar

    Hey Sandeep,
    Thanks for your response...
    OK, even I was thinking on those kind of solution or other possible way is to directly write in the output/log file of the parent req.
    Cause the output file is always formed at a loction with a std. naming convention o+request_id.out.
    I think it might be possible to write directly into the file. Have not tried it yet.
    And one more question, do you have an idea how to generate the child concurrent programs.
    I do see a parameter names sub_request in fnd_request.submit_request package. This is a boolean type.
    But I am kind of unsure, If I pass this parameter as TRUE, how it will find the parent request ID.
    If you some information on this as to how we can submit child concurrent request, please share. IT would be a great help.
    Thanks
    Jujaar

  • R12 Invoice Distributions not in table after Payable Open Interface Program

    Hello,
    I have inserted data in AP_INVOICES_INTERFACE and AP_INVOICE_LINES_INTERFACE and launched Payable Open Interface Program.
    All my invoices has been successfully processed.
    Just after completion of import program, i query an invoice on apps and all the Distribution lines are displayed when i click on "All Distribution" button BUT when i query the table AP_INVOICE_DISTRIBUTIONS_ALL by the invoice_id, no records are displayed.
    Its only when i press the button save on Apps or when i validate the invoice that i can see records in the table AP_INVOICE_DISTRIBUTIONS.
    Please help.. need to know where these lines are stored initially because i need to perform a post-import update on the attributes at INVOICE_DISTRIBUTION level.
    thanks

    I believe that is standard functionality. You can create a request set to run the Invoice Validation Program after your import is successfully done.
    Carl Hammond had posted a similar one before. You can search the forum for that message, otherwise, he probably has the right answer.
    Thanks
    Nagamohan

  • Scheduling of Concurrent Program stops after completed successful.

    Hi
    I need to create a check or procedure to create a alarm, which helps in checking the scheduling of all those concurrent programs whose scheduling has been stopped after completing successful. There has been lot of occurrences in our environment that led to programs not running for next run.
    Aviral

    If you have a trace, then just post the tkprof output here (put the tag before and after it).
    Hopefully you've traced the session with WAIT EVENTS, so we can see where much time is being spent.
    If not, I suggest you first trace the session again with WAIT EVENTS.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Run Child Concurrent Program from Main Concurrent Program

    Hi,
    I'm trying to run Child Concurrent Program from the Main Concurrent Program as below, could you suggest me on below.
    Database:10g
    Main_Concurrent_Program
    =================
    1) Will update staging table XXID_PO_ITM with Batch_id = 1,2,3,4,5
    This staging table has 1000 rows, so every 200 rows will be updated with one of the above batch_id
    This logic is working.
    Child_Concurrent_Program
    ================
    2) Above Main Concurrent Program should call below Child_Concurrent_Program.
    This Child_Concurrent_Program will have parameter batch_id (based on above batch_id)
    So, this Child_Concurrent_Program should kick off with batch_id = 1
    Simillarly, Child_Concurrent_Program should kick off with batch_id = 2
    Child_Concurrent_Program should kick off with batch_id = 3
    Child_Concurrent_Program should kick off with batch_id = 4
    Child_Concurrent_Program should kick off with batch_id = 5
    Could you give me some suggestions on this?
    Thanks.

    Check with FND_SUBMIT for submitting a concurrent job using child dependecies. Keep in mind, that once you call the API ... it spawns it's own thread and and becomes an autonomous process. Control is no longer maintained within the calling package.
    procedure submit_interface_data(p_schedule_date in date,p_mm_header_id in number,p_req_id out number)
    is
      v_user_id            number;
      v_application_id     number;
      v_responsibility_id  number;
    begin
                select user_id
                into   v_user_id
                from   fnd_user
                where  user_name = 'USER123';
                select application_id,
                       responsibility_id
                into   v_application_id,
                       v_responsibility_id
                from   fnd_responsibility_tl
                where  responsibility_name = 'General Warehouse';
      fnd_global.apps_initialize(v_user_id,v_responsibility_id,v_application_id);
      p_req_id := fnd_request.submit_request ( application => 'XYZ',
                           program     => 'MOVE_CONC_SHORT_NAME',
                           description => null,
                           start_time  => p_schedule_date,
                           sub_request => false,
                     argument1   => p_mm_header_id);
      commit;
    exception
    when others
       then
         spl_log_pub.write_exception(transaction_id   => null,
                                     transaction_type => null,
                                     error_message    => '<some error message>' ||
                                     'sqlcode: ' || sqlcode ||
                                     'sqlerrm: ' || sqlerrm);
    end submit_interface_data;Edited by: sreese on May 18, 2012 3:16 PM

  • I need to run multiple external programs concurrently using RMI objects.

    have a web based solutiion which uses a backend machine for some processing. I have a RMI based Java proram running on the backend machine and the web server talks with this backend machine through RMI. Now, on this backend machine, I need to call some external program using Process s = Runtime.getRuntime().exec(....). Since this is a web application, multiple clients will connect at the same time and I need to run this external program for multiple clients at the same time.
    Here is what I do. I have a separate RMI object bound to registry for each client that connects to the web server. This RMI object implements runnable interface, since I can't extend this class from Thread (it already extends from UnicastRemoteObject). So each time I call upon a method from this object, only one process gets started and other objects need to wait till this process finishes.
    I need to start multiple processes at the sametime so that other clients don't have to wait for this thread to finish.
    Please let me know if anybody has any other solution than installing an application server on this backend machine.
    Here is my code.
    public class iLinkOnlineSession extends UnicastRemoteObject implements Session, Serializable, Runnable
      public iLinkOnlineSession(String sessName, String sessId, String rootLogs, String rootWrks) throws RemoteException
        setSessionId(sessId);
        setName(sessName);
        ROOT_LOGS = rootLogs;
        ROOT_WORKSPACE = rootWrks;
        searchKeys_ = new Vector();
        searchObjects_ = new Hashtable();
        Thread s = new Thread(this);
        s.start();
      public void run()
        System.out.println("running");
      public String checkLogin(String user, String passwd)
        String msg = "";
        String cmd = "iLinkOnlineLogin";
        cmd += " param "+ user + " param " + passwd;
        System.out.println("cmd: " + cmd);
        try
          Runtime run = Runtime.getRuntime();
          Process proc = run.exec(cmd);           // Call to the external program.
          InputStream in = proc.getInputStream();
          Reader inp = new InputStreamReader(in);
          BufferedReader rd = new BufferedReader(inp);
          String line = rd.readLine();
          while(line != null)
            System.out.println(line);
            msg += line;
            line = rd.readLine();       
          int res = proc.waitFor();
        }catch(Exception e)
             e.printStackTrace();
        System.out.println("Msg: " + msg);
        return msg;
      public String searchObject(String user, String passwd, String param1, String paramVal1, String param2, String paramVal2, String param3, String paramVal3, String relLev, String mfgLoc)
        String cmd = "iLinkOnlineSearch";
        cmd += " param " + user + " param " + passwd + " param " + getSessionId() + " param " + logFile_ + " param " + param1 + " param " + paramVal1 +
              " param " + param2 + " param " + paramVal2 + " param " + param3 + " param " + paramVal3 + " param "
              + relLev + " param " + mfgLoc;
        System.out.println("cmd: " + cmd);
        try
          Runtime run = Runtime.getRuntime();
          Process proc = run.exec(cmd);                // External program.
          InputStream in = proc.getInputStream();
          Reader inp = new InputStreamReader(in);
          BufferedReader rd = new BufferedReader(inp);
          FileWriter out = new FileWriter(resultFile_);
          System.out.println("Filename: "+resultFile_);
          BufferedWriter wout = new BufferedWriter(out);
          String line = rd.readLine();
           while(line != null)
            System.out.println(line);
            wout.write(line);
            wout.newLine();
            wout.flush();
            line = rd.readLine();
          int res = proc.waitFor();
          wout.close();
          if(res == 0)
            boolean ret = createResultTable();
            if(ret == true)
              return GlobalConstants.SUCCESS_MSG;
            else
              return GlobalConstants.ERROR_MSG;
        }catch(Exception e)
                e.printStackTrace();
        System.out.println("getting results");
        return GlobalConstants.ERROR_MSG;
      }

    I guess I don't get it.
    RMI servers are inherently multi-threaded, so why are you running separate servers for every client?

  • After completing the OS X Mavericks everything runs slow

    After completing the OS X Mavericks everything runs slow.  Programs, menus and files.  When I click on them it is like they hesitate to open.  Programs are slow at opening and working with them.

    First, back up all data immediately, as your boot drive might be failing.
    Step 1
    This diagnostic procedure will query the log for messages that may indicate a system issue. It changes nothing, and therefore will not, in itself, solve your problem.
    If you have more than one user account, these instructions must be carried out as an administrator.
    Triple-click anywhere in the line below on this page to select it:
    syslog -k Sender kernel -k Message CReq 'GPU |hfs: Ru|I/O e|find tok|n Cause: -|NVDA\(|timed? ?o' | tail | open -ef
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V). I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key.
    The command may take a noticeable amount of time to run. Wait for a new line ending in a dollar sign (“$”) to appear.
    A TextEdit window will open with the output of the command. Normally the command will produce no output, and the window will be empty. If the TextEdit window (not the Terminal window) has anything in it, stop here and post it — the text, please, not a screenshot. The title of the TextEdit window doesn't matter, and you don't need to post that.
    Step 2
    There are a few other possible causes of generalized slow performance that you can rule out easily.
    Disconnect all non-essential wired peripherals and remove aftermarket expansion cards, if any.
    Reset the System Management Controller.
    Run Software Update. If there's a firmware update, install it.
    If you're booting from an aftermarket SSD, see whether there's a firmware update for it.
    If you have a portable computer, check the cycle count of the battery. It may be due for replacement.
    If you have many image or video files on the Desktop with preview icons, move them to another folder.
    If applicable, uncheck all boxes in the iCloud preference pane. See whether there's any change.
    Check your keychains in Keychain Access for excessively duplicated items.
    Boot into Recovery mode, launch Disk Utility, and run Repair Disk.
    If you have a MacBook Pro with dual graphics, disable automatic graphics switching in the Energy Saverpreference pane for better performance at the cost of shorter battery life.
    Step 3
    When you notice the problem, launch the Activity Monitor application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Activity Monitor in the icon grid.
    Select the CPU tab of the Activity Monitor window.
    Select All Processes from the View menu or the menu in the toolbar, if not already selected.
    Click the heading of the % CPU column in the process table to sort the entries by CPU usage. You may have to click it twice to get the highest value at the top. What is it, and what is the process? Also post the values for User, System, and Idle at the bottom of the window.
    Select the Memory tab. What value is shown in the bottom part of the window for Swap used?
    Next, select the Disk tab. Post the approximate values shown for Reads in/sec and Writes out/sec (not Reads in andWrites out.)
    Step 4
    If you have more than one user account, you must be logged in as an administrator to carry out this step.
    Launch the Console application in the same way you launched Activity Monitor. Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Select the 50 or so most recent entries in the log. Copy them to the Clipboard by pressing the key combinationcommand-C. Paste into a reply to this message (command-V). You're looking for entries at the end of the log, not at the beginning.
    When posting a log extract, be selective. Don't post more than is requested.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some personal information, such as your name, may appear in the log. Anonymize before posting. That should be easy to do if your extract is not too long.

  • Cancel Payment Program after Payment Run is executed

    Hi Friends,
    Can any one please tell me what should be the process to reverse payment program after executing payment run in F110.
    We executed Payment program, it cleared vendor open items but it did not generate the checks and looks like I need to cancel that payment program and regenerate it.
    Please help me.
    Thanks

    Check note 17975

  • Need to run the BDC job immediately after XK02 is saved.

    Hi all.
        I have to trigger a batch job (BDC program) after changing the customer thru xk02 TRANACTION.
    I found one exit EXIT_SAPMF02K_001 which checks before saving. But my requirement is job (BDC prog) should run after saving. So I guess its of no use. Do we have any BADI ( method)....?Can you pls let me know how to procede.
    If workflow is the solution...
    I have run the event traces by transaction code swel & sels, I could not find any event triggering to tigger the workflow  ( to perform background task) Do I need to create Change document & BOR for acheiving this thru workflow .
    Cheers,
    sami.

    Hi Neha.
           Thanks for quik turn around. But I need this z program to run after all changes are done in XK02 because I need to use the changed vendor data in the BDC program. This is the exit which triggers before save, so I couldn't get the changed vendor data from database table to use in z program (BDC).
    Hope I am clear.
    Cheers,
    sami.

  • How to schedule a job to run after completion of each run using DBMS_JOB ?

    Hi Gurus,
    Please let me know if the subject requirement can be fulfilled. I want to schedule a job using DBMS_JOB to run a script sequentially after completion of each run.
    Thanks in advance.
    Santosh

    Hi Santosh
    Instead to use the old dbms_job package use the dbms_scheduler and raise / catch events.
    Oracle create dbms_scheduler also for this purpose you need.
    You can find tons of examples on the web.
    Aurelio

Maybe you are looking for

  • Converting Signature data into PKCS#7 format

    Hi All, Is there any java api available to convert signature bytes in to PKCS#7 format. Here is the scenario. downloaded a trail digital id(abc.pfx) file from verisign site. then retrieved the private key, certificate and public key information from

  • Best Practice Site Collection vs SubSite

    Anyone can give me best practice on create site collection vs subsite? I generally have request for create site ,but struggle to deal with what is best. here what I have so far projects.contoso.com (web app and top level site collection) teams.contos

  • Case Program problem

    Hi, I moved to Czech Republic for two semesters of exchange studies this fall. I wanted an iPhone 4 and since in Finland we only had the ones locked to a single carrier I ordered mine from the UK to be able to use it here in the Czech Republic as wel

  • EP 6.0 Innerpage, Navigation Panel, Related Links issues

    I have been trying to reposition the navigation panel and related links panel on my pages but haven't had any luck. What I am trying to do is I want to be able to create a template where I can move the relate links panel to any location I want. I als

  • SQL error for searches within Arch forums

    Hi guys, Since last night, when ever I try to run a search, whether it be a pre-defined search like New Posts or last 12h, or a keyword search within the search page, I get an error: Could not delete old search id sessions DEBUG MODE SQL Error : 1016