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

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.

  • How to run a openssl command from a java program

    Hi All
    Please suggest on how to run a openssl command from a java program.
    I am using this
    Runtime runtime = Runtime.getRuntime();
    runtime.exec("openssl pkcs8 -inform der -nocrypt test.der result.pem");
    This is suppose to take test.der as input and create result.pem.
    There are no errors but the file result.pem isnt created.
    Thanks in Advance

    First off is that openssl command correct? Should it be this instead:
    openssl pkcs8 -inform der -nocrypt -in test.der -out result.pem
    Try out your openssl command within a command prompt so that you know that it works ok. I think the command line you specified waits on stdin (well it does for me).
    After that.....
    runtime.exec creates a Process object. If you do this:
    Process openssl = runtime.exec("....")
    then you can examine the return code from openssl to see the exit code - for instance if the input file does not exist then exit = 1. You can test for this with Java
    Alternatively you could get the stderr from the process and look inside it - if it is 0 length then all is good, if it has some text in there then it has likely failed. You could then throw an exception and include the stderr output in the exception messgae. You may need to experiment with this, runnig it first when openssl is happy then running it again when openssl is upset.
    M

  • How to compile and run a .java file from another java program

    hello,
    can any one tell me how to compile and run a *.java* file from another java program which is not in same directory?

    Well a smarter way of implementing this is by using a solution provided by Java Itself.
    If you are using J2SE 6.0+ there is an in built solution provided along with JDK itself and inorder to go ahead with solution the below are set of API which you;d be using it for compiling Java Programs (Files)
    http://java.sun.com/javase/6/docs/api/javax/tools/package-summary.html
    How do i do that ??
    Check out the below articles which would help you of how to do that
    http://www.ibm.com/developerworks/java/library/j-jcomp/index.html
    http://www.javabeat.net/javabeat/java6/articles/java_6_0_compiler_api_1.php
    http://books.google.com/books?id=WVbpv8SQpkEC&pg=PA155&lpg=PA155&dq=%22javax+tools%22+compiling+java+file&source=web&ots=XOt0siYe-f&sig=HH27ovuwvJgklIf8omTykUmy-eM
    Now once we are done with compilation.In order to run a Specific class all you ought to do is create an object and its specific methods of a specified class included in the CLASSPATH which you can manage it easily by usage little bit reflections.
    Hope that might help :)
    REGARDS,
    RaHuL

  • Calling another program from the current program

    Hi all,
    In our requirement we are calling another program from our current program .
    In the current program( from which we are calling ) we are giving file name in the selection screen
    and when we run the current program we are successfully going to other program but our main requirement is to higlight the file name which we had given earlier .
    Note :  The called program doesnt have any selection screen.

    HI
    use EXPORT and IMPORT key words for passing data from one program to another program.
    as the called program is available in the same session you can use above key words which means you are accessing ABAP MEMORY.
    You can also use SET and GET key words which means SAP memory
    take F1 help there are examples tooo and detailes explanation abou the same
    Regards
    Ramchander Rao.K
    Edited by: Ramchander Krishnamraju on Dec 24, 2008 7:05 AM

  • Program  to list all include programs  from the  Sap program list

    My requirement is to display all include programs from the Sap program Table ( D010INC table and TADIR table), From
    here i have to get all include programs.Can anyone give the program code for this requirement

    well, it's your requirement and not ours, so why not try yourself first?

  • How to start an executable program from a java program ?

    Hi,
    does someone know how to start an executable program from a JAVA program ?
    Thanks, Fred.

    Take a look at the Runtime class.
    -S-

  • FM to pass one variant to another called program from a calling program

    Hi Gurus,
    Please let me know the name of the function module to pass one variant to another called program from a calling program without displaying the selection screen of the called program.

    you can use fm rs_variant_fetch to retrieve the variant info.
    Check the abap help on the statement submit to get info on how to call a program with variables, or a variant
    Kind regards, Rob Dielemans

  • How to run a cygwin.bat from a java program?

    Can you please let me know how to run a cygwin.bat file from a java program and to give commands through java program. I have a program to run .exe files, but when I do the same for the cygwin.bat it doesnt work. In task mgr a BASH and a cmd.exe is running. Please help me on this & bit urgent. Thanks in advance!

    Can you please let me know how to run a cygwin.bat
    file from a java program and to give commands through
    java program. I have a program to run .exe files, but
    when I do the same for the cygwin.bat it doesnt work.Of course not. .bat files are no native executables. You need to open a shell first, like "cmd /c cygwin.bat ..."
    & bit urgent. Thanks in advance!If I had read this earlier I wouldn't have replied. Why exactly is your time worth more than anybody else's?

  • How do I run an exe file from a java program?

    I need to run an exe program from within a java program.
    what do I need to do this?
    thanks

    See java.lang.Runtime.exec()

  • Execute a java program from an another program

    Like we can compile a code from wihin a java file by using the following :
    Tool javac = ToolProvider.getSystemJavaCompiler();
    Similarly,can we execute i.e. run a java program from within a java file i.e. running d java command from within the java file ??If yes then please tell me how??

    suppose on the Unix box or from a Unix script ( korn, perl, bourne, bash) you can run the following java program
    java ${JAVA_OPTS} -jar ${GMR_APPS_DIR}/risk.jar -I -c ${COB} -r ${BATCH} -o ${XML_DIR}
    in java you can do the following :
    Runtime rt = Runtime.getRuntime();
              try {
                   Process process = rt.exec("java ${JAVA_OPTS} -jar ${GMR_APPS_DIR}/risk.jar -I -c ${COB} -r ${BATCH} -o ${XML_DIR}
    // OR
                   Process process = rt.exec("/export/apps/Tools/apache-tomcat-5.5.17/bin/startup.sh");
                   // process.destroy(); if you want to kill the process
                   process.waitFor();
                   int RC = process.exitValue();      
                   System.out.println(returnOutput(process.getErrorStream()));
                   System.out.println(returnOutput(process.getInputStream()));
              } catch (Exception ex) {
                   ex.printStackTrace();
    empty the output stream from the script
    private String returnOutput(InputStream is) throws Exception {
                   String s;
                   StringBuffer strBuff = new StringBuffer();
                   BufferedReader br = new BufferedReader(new InputStreamReader(is));
                   while ((s = br.readLine()) != null) {
                        strBuff.append(s);
                   return strBuff.toString();
              }You need to relace the ${} by the appropriate values.
    Regards,
    Alan Mehio
    London, UK
    Edited by: alan_mehio on Jan 16, 2008 4:21 PM

  • Do you want to allow the following program from Unknown Publisher - Program Name: CompMgmtLauncher.exe etc

    Dear All,
    I'm facing some issue in WINDOWS SERVER 2008 R2 on each windows settings its prompting for UAC  like on windows settings (Server Manager, Network Settings, Firewall Settings etc) and in Publisher "Unknown"
    is showing though its windows settings.
    ERROR: "Do you want to allow
    the following program from Unknown Publisher. . . . "
    Program Name: CompMgmtLauncher.exe 
    These prompts only occurs with domain user though its a member of administrator group on that local machine while logging with local administrator user this doesn't happen.
    Thanks
    REGARDS DANISH DANIE

    Hi Danie Danish,
    Would you please let me know current situation of this issue? Have you referred to britishdhez’s suggestion
    and solved it?
    Just additional. Please use anti-virus software to scan the server. Meanwhile, please run
    sfc /scannow command to check protected system files.
    If any update, please feel free to let us know.
    Hope this helps.
    Best regards,
    Justin Gu

  • Compiling Java program from other java program

    Hi,
    How can I compile and capture the compilation result from another java program?
    Thanks

    As if I had seen somewhere a hint about being able to
    programatically compile with the help of the class
    sun/tools/javac/Main found in the tools.jar.I saw that article, too, but when I took a look at the JDK's source code, it became apparent that none of the classes in tools.jar are supported. Your program could break with any new version of the JDK.
    If you're still interested, here's the URL:
    http://java.sun.com/developer/JDCTechTips/2003/tt0722.html

  • How to call a Dialog Program from another Dialog Program

    Dear All,
    How can I call a dialog program with return value from another dialog program?
    Regards,
    Alok.

    Hi Alok,
    1. Insted of creating 2 different Dialog program. It's good to create as many screens as you want in same module pool program. Any way you can use the different TCODE for each screen.
    2. Another and The best way is to create a function group and then inside function group use the function 2 module... In the function group define a global variable which will be present for both the function group if they are getting executed in sequence. and inside the Function Module call the screens using command " call screen <screenno>".
    3. You can use set / get parameter to pass values of a field between two dynpro program.

  • How to pass values to a module pool program from another Report Program

    Hi ..
    Please let me know how I can pass values to a MODULE POOL selection screen field from another Report Program.
    Thanks
    RK

    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9e0435c111d1829f0000e829fbfe/frameset.htm

Maybe you are looking for

  • TrueCrypt 6.2 system drive encryption hangs system sometimes a day

    Hi, I use truecrypt for years with xp and vista - last with Vista and T500, a few weeks ago I installed windows 7 x64 rtm. Every thing works fine and so I checked step by step my usual installed apps and tools. I see win7 is not supported by truecryp

  • IPod Touch - unable to sync any video

    Hello, I'm a prou owner of the new iPod Touch, but I have big problems with syncing videos on it. I tried almost everything I found here as suggestions, but nothing helped. Every single time I get the report: +Track "0" could not be copied on your iP

  • "You may need to enter the name and password for an admin" ....

    Hi everyone! I'm getting this error when trying to copy files over to a network drive. First, it'll pop up and say: "You may need to enter the name and password for an administrator on this computer to change the item named" At the same time, it will

  • Moblie me  FYI

    FYI If you get the free trial of moblie me and you don't want it anymore, it WILL DELETE ALL OF YOUR CALENDAR NOTES!!!! If you want to share your calendar notes with another iPhone or cpu best way to do that is through google calendar. http://www.goo

  • How do I get rid of a shadow using PS Elements 4.0

    Hi, I'm using Photoshop Elements 4.0 for Windows. I suck at Photoshop, but I need to get rid of a shadow that is cast on my son in a picture I have. If anyone could take time to help this pathetic guy I would appreciate it. Thanks.