Parent Concurrent Program executes  rest of the logic  before PAUSED STATE.

Procedure parent_cp (errbuf out nocopy varchar2, retcode out nocopy varchar2) IS
ret number;
i number;
BEGIN
fnd_msg_pub.initialize;
BEGIN ---Block A
req_data := fnd_conc_global.request_data;
if (req_data is not null) then
i := to_number(req_data);
if (i < 5 ) then
errbuf := 'Done!';
retcode := 0 ;
return;
end if;
else
i := 1;
end if;
for i in 1 .. 4 loop
ret := fnd_request.submit_request('CZ', 'Child','Delete Localized Text - Child Number : ' ||TO_CHAR(vChildNo), NULL,TRUE, vChildMdlRange);
fnd_conc_global.set_req_globals(conc_status => 'PAUSED', request_data => to_char(vChildNo)) ;
IF (ret = 0 ) THEN
errbuf := fnd_Message.get;
retcode := 2;
ELSE
errbuf := 'Sub-Request submitted!';
retcode := 0 ;
END IF;
END LOOP;
END;
BEGIN ---block B
dbms_output.put_line(' Block after submitting Child CP ');
END;
END parent_cp;
when i execute the above Parent CP ,it submitted 4 Child CPs and Parent CP went into Pause state. Before Parent CP went into Pause state it executed the Block B.
My Requirement is it should execute the block B after completion of all child CPs.
Please suggest how to achieve the above requirement.
Thanks,
Murali.

Procedure parent_cp (errbuf out nocopy varchar2, retcode out nocopy varchar2) IS
ret number;
i number;
BEGIN
fnd_msg_pub.initialize;
BEGIN ---Block A
req_data := fnd_conc_global.request_data;
if (req_data is not null) then
i := to_number(req_data);
if (i < 5 ) then
errbuf := 'Done!';
retcode := 0 ;
return;
end if;
else
i := 1;
end if;
for j in 1 .. 4 loop
vRequestId(j) := fnd_request.submit_request('CZ', 'Child','Delete Localized Text - Child Number : ' ||TO_CHAR(vChildNo), NULL,TRUE, vChildMdlRange);
fnd_conc_global.set_req_globals(conc_status => 'PAUSED', request_data => to_char(vChildNo)) ;
IF (vRequestId(j) = 0 ) THEN
errbuf := fnd_Message.get;
retcode := 2;
ELSE
errbuf := 'Sub-Request submitted!';
retcode := 0 ;
END IF;
END LOOP;
END;
BEGIN ---block B
For j in vRequestId.FIRST..vRequestId.LAST LOOP
fnd_file.put_line(fnd_file.log,' reuest' || vRequestId(j));
vrequeststatus := fnd_concurrent.get_request_status(vRequestId(j),
     NULL,
NULL,
     phase,
     status,
     dev_phase ,
     dev_status ,
     message );
WHILE (dev_phase != 'COMPLETE') LOOP
fnd_file.put_line(fnd_file.log,' while loop' || vRequestId(j));
vrequeststatus := fnd_concurrent.wait_for_request(vRequestId(j),
60,
     10,
     phase ,
     status ,
     dev_phase ,
     dev_status ,
     message );
END LOOP;
END LOOP;
dbms_output.put_line(' Block after submitting Child CP ');
END;
END parent_cp;
The above procedure was the Parent CP. Here the problem is in fnd_request.submit_request('CZ', 'Child','Delete Localized Text - Child Number : ' ||TO_CHAR(vChildNo), NULL,TRUE, vChildMdlRange); i have given sub_request as True and used fnd_conc_global.set_req_globals(conc_status => 'PAUSED', request_data => to_char(vChildNo)) ; to make parent CP to pause it.
It submits 4 child CPs as expected but the phase as INACTIVE and status NO MANAGER and PARENT CP was always in running state.
If i make sub_request parameter of fnd_request.sub_request to FALSE . It submits 4 child CPs as expected with the phase as PENDING and status NORMAL and PARENT CP was always in running state. But child cps are never changing the Phase as RUNNING. It is always in PENDING STATE.
Please suggest how to use fnd_conc_global.set_req_globals and fnd_concurrent.wait_for_request together.

Similar Messages

  • Spawning child program from parent concurrent program.

    Hi All,
    I am trying to spawn multiple child programs from Parent concurrent program, Parent concurrent program is having execution method as HOST.
    Here is how I designed it.
    1. Parent Concurrent program (Parent Conc program with execution method as HOST).
    2. Host file is abc.prog calls PLSQL package xyz.main.
    3. xyz.main has logic to launch multiple child programs - (Child Conc program with execution method as PLSQL stored proc) using fnd_request.submit_request utility.
    All the child programs are getting launched but are in INACTIVE/NOMANAGER state. Could you please let me know how to overcome this issue.
    Both Parent and child programs are added to standard concurrent manager. This issue is only coming when parent program as execution method as HOST if parent program execution method is PLSQL stored procedure then child programs are running fine..
    I also tired initializing apps in HOST file (abc.prog) before calling PLSQL package xyz.main.
    Thanks.
    Sham.

    hi,
    even i was facing the same issue. while submitting the child requests through fnd_request.submit_request i tried the following:
    FND_REQUEST.submit_request (
    application => 'Application Short Name',
    program => 'Program Executable Name',
    description => 'Program Description',
    start_time => NULL,
    sub_request => FALSE,
    argument1 => 'Input 1',
    argument2 => 'Input 2' );
    After this the Programs were submitted successfully.

  • Want to remove concurrent program executable

    if any body knows that
    how to remove the record from concurrent program executable if it is wrongly entered.
    the record is also added to concurrent programs. it was wrongly entered in another application but if want to correct the thing. it does not work.
    pls help,
    ashok

    https://www.google.com/search?q=howto+remove+avast+mackbook+pro

  • 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

  • TS1702 Why are my apps updates and apps remaining in the "waiting" and "pause" state?

    I get update notices for my apps but when I click to update my apps remain in the "waiting" and "Pause" state.
    I have tried powering down my phone and restarting it to see if that will resovle the problem but it's not correcting the problem.
    I have deleted several apps just to remove them. 
    Anyone have any suggestions?
    Glam33

    Try tapping the App, so that it changes to Paused instead of Waiting, then tap it again to resume the install.
    Make sure you don't have any paused downloads in other apps either, like the iTunes Store.
    You can also try resetting or restoring the iPhone.
    And, if that doesn't do it, try contacting Apple through Express Lane.

  • Concurrent program - Executable

    Hi
    I need help related to oracle 11i apps concurrent program.
    I have writen a interface using pl/sql now I want this excetable to be register under concurrent program in 11i apps
    Can you please provide me tutorial that helps me to register the executable in concurrent pogram.
    it would be great if explain me step by step process
    Thanks

    Hi,
    you seem to have the wrong forum for this.
    Check out the apps documentation at http://download-west.oracle.com/docs/cd/B11454_01/11.5.9/html/technologyset.html
    in particular the Oracle Applications Developers Guide.
    Regards,
    Jon.

  • Concurrent program executable 11i

    Hi,
    I am just starting with the bi publisher.Can anyone please explain me how it differs in 11i and r12..?
    like creation of data definition.and concurrent program..i know in r12 for creating the concurrent program thr is one standard executable is thr..but how can i achieve this in 11i..
    Please help me.
    Thanks
    Bharat

    Hi,
    you seem to have the wrong forum for this.
    Check out the apps documentation at http://download-west.oracle.com/docs/cd/B11454_01/11.5.9/html/technologyset.html
    in particular the Oracle Applications Developers Guide.
    Regards,
    Jon.

  • Reg: Creating sub menu for a concurrent program under menu on the Menu bar

    Hi all,
    I would like to know, how we can create a sub menu for a conc. program under a sub menu on the Menu Bar ?
    Thanks In Advance.
    Regards,
    Neeti

    It is a 2 step process. First, enable a new menu entry, which when called will fire a user-named trigger, where the call to the concurrent programs form is the executed. How to do it depends on the release. Previous to 11.5.10, this has to be done trough custom.pll, and 11i10 an r12 with forms personalization. Documentation and examples exists for both cases, have a look on metalink.

  • Changing concurrent program,executable short names

    hi,
    i created one report and registered in apps, with some executable short name and concurrent program short name.
    now i want to create a new program with the same short names, and no need of the first report.
    how can i do it?
    can anybody plz give any clue.
    with regards
    kiran

    You can not have two concurrent programs with the same short name but you probably already know that from trying it. Since you need a new program with the same short name and you don't need the old program, simply rename the program and description of your existing program. You will have to change the executable to point to the code of your new program.

  • How to stop concurrent programs from appearing in the SRS window ?

    Hi All,
    We have hundreds of custom concurrent programs registered under a custom application.
    Except for 3 hidden programs (which will be submitted internally from another concurrent program), all the others should appear in the SRS window. Therefore, instead of individually registering each program in the request group, we have registered the application itself, in the request group.
    However by doing this, the 3 hidden concurrent programs are also appearing in the SRS window. The concurrent program define form doesn’t allow us to uncheck the “show in SRS” checkbox if we have parameters define for a concurrent program.
    Is there any way that we can prevent these hidden programs from appearing in the SRS window, in our case?

    Hi,
    Create a new request group and add all but the 3 programs, using a PL/SQL script calling fnd_program.add_to_group.
    Regards,
    Gareth
    Blog: http://garethroberts.blogspot.com/

  • In SQL Loader based Concurrent Program, how to get the current request id

    Hi All,
    I am trying the following control file.
    OPTIONS ( SKIP = 1 , ERRORS = 0 )
    LOAD DATA
    INFILE *
    REPLACE INTO TABLE XXPA_ASSET_TRANS_INTERFACE
    FIELDS TERMINATED by ',' OPTIONALLY ENCLOSED BY'"'
    TRAILING NULLCOLS
         Project_Number
         ,Asset_Name
         ,Location_Country Constant USA
         ,request_id CHAR "fnd_global.conc_request_id"
    in request id column I am getting -1 ...
    Please lt me know how can i get the current request id in the request_id field.
    Thanks

    Hi
    To my knowledge, this can't be achieved with SQL*Loader concurrent programs. Depending on what You are using the request id, the options provided may be useful.
    I had a similar issue, requiring the use of user_id and login_id for who columns, and the solution applied was:
    - Define a template for the control file, with place holders for the additional info:
    user_id constant "x_user_id"
    - Create a shell to receive the additional info as parameters, and use sed to change the template file to generate the control file, using the parameter to replace placeholders.
    Create a request set to launch the shell concurrent program and then the sql loader program, whose control file now has the additional information required.
    Caution when more than one middle tier node is used.

  • Downloaded the installation program, execute it and the screen and mouse blink intermittently and does not open the installation program. The computer is new, windows 7 professional 64 bit SP1.

    run the CreativeCloudSet-Up program, screen and mouse blink intermittently. And the program does not open. My computer is new, freshly removed from box. Windows 7 pro 64bit SP1

    Jorgeb55956766 I am sorry that you are facing difficulty installing the Creative Cloud Desktop application.  Have you utilized the steps listed in Error: "Failed to install" | Creative Cloud Desktop to reinstall the Creative Cloud Desktop application?  If so do you receive any specific error messages?

  • No getting Report Output in OAF for java Concurrent program Method

    I am not getting report output for java Concurrent Program(Concurrent Program Executable Method), for the reports which are of type PL/SQL Stored Procedure getting the output. for some of the reports the executable method is 'java Concurrent Program', so is there any thing i need to modify in my code.
    Thanks
    Babu

    The Concurrent request is not able to generate output
    getting following error in FNDCPREQUESTVIEWPAGE
    The concurrent request 9923758 did not create an output file.
    so what may be reasons for this?
    Thanks
    Babu

  • Register concurrent programs parameter customization.

    Is there a way to register customization of concurrent programs parameters (I need to make one of the parameters mandatory) like it is done with customized files in applcust.txt?

    Sorry about the late reply, but the issue with applcust.txt is that it only checks files updated by the patch. To provide an update to a concurrent program definition, Oracle includes an LDT file in the patch, but the name of the file doesn't have to relate to the concurrent program being updated. For example, the Purchasing concurrent program POXACREC is defined in the following files (look for the BEGIN PROGRAM "POXACREC" "PO" line in the ldt files in $PO_TOP/patch/115/import/US), shown in their applcust.txt format:
    po patch/115/import/US cst4946920_1.ldt
    po patch/115/import/US poprg.ldt
    po patch/115/import/US poxacrec.ldt
    Based on the name of the file and the concurrent program name, you would assume the last of these is the "correct" one, but all three could provide an update to the concurrent program definition. If you have multiple files defining your customised concurrent program, I would suggest you list all three in your applcust.txt. However, even if you list all three, there is nothing stopping Oracle from updating the POXACREC concurrent program with a file called abc123.ldt.
    To help with this, I would suggest for your concurrent program you also include the concurrent program executable itself in the applcust.txt file (po reports/US POXACREC.rdf in my example) as a change to parameters in an unexpected ldt file would require a change in the program as well.
    This basic problem can occur with any of data provided by LDT files or objects where the object name is not dependent on the file name - even views can be updated by odf files or sql files.
    theFurryOne

  • Concurrent Program not executing

    Hi All,
    I have created new custom concurrent program of type SQL*Plus to purge the data. To my surprize when I submit the program, program is not getting executed, which I can confirm saying the data is not getting deleted. Also the log messages mentioned script is also not displayed in the LOG.
    No debug message is displayed in neither LOG nor OUTPUT.
    Executable File Name is correctly given and taken care of all other mandatory stuff while registration.
    Bleow the script:
    I am passing Number of Days ( 500 ) as parameter to this program.
    So here &1 = 500:
    DECLARE
    L_deleted_rec_cnt NUMBER;
    BEGIN
    fnd_file.put_line ( fnd_file.LOG, ' Conc Program Starts');
    DELETE
    FROM xxX_TABLE_NAME
    WHERE TRUNC (creation_date) < TRUNC (SYSDATE- &1);
    L_deleted_rec_cnt := SQL%ROWCOUNT;
    IF L_deleted_rec_cnt > 0 THEN
    COMMIT;
    fnd_file.put_line ( fnd_file.LOG, L_deleted_rec_cnt||' Records purged');
    ELSE
    fnd_file.put_line ( fnd_file.LOG, ' No Records to purge');
    END IF;
    fnd_file.put_line ( fnd_file.OUTPUT, ' Conc Program End');
    EXCEPTION
    WHEN OTHERS THEN
    fnd_file.put_line (fnd_file.LOG, 'Error in purging '||SQLCODE||' '||SQLERRM);
    END;
    Please advise.
    Regards,
    Ram

    It is 11i and the LOG is showing as Concurrent Program executed succesfully. THere is not error reported in the LOG.
    And also nothing writter to OUT file also.
    Content in LOG file:
    XXXX Customer Advocacy: Version : 1.0 - Development
    Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
    XXCC module: XXXX Error Log Purge
    Current system time is 28-DEC-2009 04:55:46
    +-----------------------------
    | Starting concurrent program execution...
    +-----------------------------
    Arguments
    450
    Start of log messages from FND_FILE
    End of log messages from FND_FILE
    Executing request completion options...
    ------------- 1) PRINT   -------------
    Printing output file.
    Request ID : 52374634      
    Number of copies : 0      
    Printer : noprint
    Finished executing request completion options.
    Concurrent request completed successfully
    Current system time is 28-DEC-2009 04:55:47
    Content in Out FIle:
    Input truncated to 2 characters
    Regards,
    Ram

Maybe you are looking for