Creating a PLSQL Procedure as Concurrent Program

Folks:
I am new both to PLSQL and Concurrent program creation. I am actually working on a process for deploying changes from one environment to another, so I want to create a simpel PLSQL procedure that I can then register as a concurrent program, and finally test the download/uplaod of this procedure and program from one instance to another.
I tried reading the Developer documentation on creating concurrent program, but couldn't find the information I was looking for. Here are some of my questions:
1) The PLSQL procedure that I want to run as concurrent program, can it be declared within a new custom package, or does it have to be created as a procedure.
2) In the concurrent program executable registration window, can i specify directly the name of this new procedure or do I need to create an additional wrapper PLSQL procedure that has Concurrent Program related attribute (Developer guide seemed to incline that way).
3) What should be put in the 'File' parameter on Concurrent Program Execution Window in the case of pl/sql concurrent program. There is no file, so what to put in there?
4) Any other place I can find step by step how to for making a 'PLSQL" package a concurrent program?

Hi,
1) Create PL/SQL Package with "main" procedure that has arguments ERRBUF and RETCODE plus your other required arguments.
2) xxxx_pkg.main as per 1.
3) xxxx_pkg.main (the package and procedure name)
4) Best place to look is at an existing program! Plenty of basic examples on the net. Here's a link that has basic package and screens:
http://garethroberts.blogspot.com/2007/10/excel-file-output-from-oracle.html
Regards,
Gareth
Blog: http://garethroberts.blogspot.com/

Similar Messages

  • How to create a value sets for concurrent program?

    Hi Friends,
    I am creating a concurrent program with a parameter period...
    In the value set for the parameter period, I am using the following query :
    ---where application_id = 101
    and set_of_books_id = :$PROFILES$.gl_set_of_bks_id
    and closing_status IN ( 'O', 'F', 'C')
    order by period_year, period_num' ----
    In my cursor, i have a condition 'where set_of_books_id = ' ---
    How can I pass the above set of books id into the cursor ?? it is not working when I am defining another parameter as Book and passing that value to the cursor....
    I need that period parameter to return all the periods for the set of books where we are running the concurrent request from...I also need to get the set of books id for my cursor...
    Hope I am making sense...All that I am trying is to have period parameter and also a SOB id in cursor condition...
    Rgds,

    Hi Vamsi /Nitin,
    Let me explain the whole thing now.....
    My plsql procedure is ......
    CREATE OR REPLACE procedure GL_INT(
         perrbuff     out varchar2,
         pretcode     out varchar2,
    pbook          in varchar2,
    pperiod          in varchar2
         ) is
    cursor cur1 (p_sdate in date, p_edate in date )is
    select distinct group_id groupid,
    user_je_source_name source
    from gl_interface
         where accounting_date >= p_sdate
    and accounting_date <= p_edate
    and set_of_books_id = pbook;
    cursor cur2 is
    select distinct start_date sdate,
         end_date edate, period_name period
    from gl_period_statuses
    where      period_name = pperiod
         and set_of_books_id = pbook
         and application_id = 101;
    i               cur1%rowtype;
    j               cur2%rowtype;
    begin
    open cur2;
                   fnd_file.put_line(fnd_file.output,'PERIOD'||'----'||'GROUPID'||
                                       '----'|| 'SOURCE');
              loop
                   fetch cur2 into J;
    exit when cur2%notfound;
                   open cur1(J.sdate,J.edate);
                   loop
              fetch cur1 into I;
                        exit when cur1%notfound;
              fnd_file.put_line(fnd_file.output, J.period||'----'||I.groupid||'----'||
                                  I.source);
                   end loop;
              end loop;
         Close cur1;
    close cur2;
    Exception when others then dbms_output.put_line(SQLERRM);     
    end;
    ==================================================================================================
    For SOB value set, I have passed the default value as vamsi suggested ($profiles$.gl_set_of_bks_id)....
    For period value set, I have entered query as ..where application_id = 101
    and set_of_books_id = :$PROFILES$.gl_set_of_bks_id
    and closing_status IN ( 'O', 'F', 'C')
    order by period_year, period_num...................
    It still doesn't work....I don't know how to derive those Periods based on the SOBs and at the same time pass SOB id into the cursors...
    Please help...
    Rgds,
    Murali

  • OAF: Creating PDF output without calling concurrent program.

    Hi Everyone,
    i want to Create PDF output in OAF.
    I wil be having one button “Convert PDF” on my OAF page. On clicking on that button my page should generate pdf output without calling concurrent program(Because running a concurrent program may take much time sometimes.).
    How can I do that?
    I have never generated pdf outputs so plz help me to get out of this.
    What are the possible ways to get this?
    Any example?
    Any suggestions wil be really useful.
    Thanks.....

    Hi ,
    Please refer to -
    http://apps2fusion.com/at/85-daxesh/515-oa-framework-xml-publisher-integration
    http://apps2fusion.com/at/51-ps/260-integrating-xml-publisher-and-oa-framework
    Regards,
    Ashish

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

  • How to run a pl/sql stored procedure as a concurrent program

    Hi All,
    I created a package PURGE_DEAL_REQUESTS. It contains a procedure QPR_DELETE_CANCELLED_REQUESTS. I want to run this stored procedure as concurrent program in ebs suite....
    Can anyone tell me how to run this procedure as a concurrent program(in ebs suite).....?
    Thanks
    Swathi.

    You need to add the concurrent program to the group of the responsibility that will run the report. For more details, please refer to:
    Note: 73492.1 - Creating a PL/SQL Concurrent Program in Oracle Applications
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=73492.1
    Note: 133991.1 - How to Register a Custom Report
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=133991.1

  • Html forms in plsql procedure prob

    Hi,
    i have created a plsql procedure and have included a javascript part in order to link two drop down menus in a web site. but even though when you select a category at the first drop down menu it successfully updates the options at the second, the Action of the form doesnt work (the parameter doesnt pass to the procedure they should according to the Action command. If i don't use the first drop down menu though and add few options at the second, the Action works fine...can u please help me???
    This is the code after the java script part...
    htp.print('<FORM NAME="select_mem" ACTION="'||f_host||'search" METHOD="post">');
    htp.print('<SELECT name="Category" onChange="updateList(this.form, this.options[selectedIndex].value, this.form.Subject.length)" >');
    for sel_t in ctype loop
    htp.print('<option value="'||replace(sel_t.mem_type,' ','_')'">'||sel_t.mem_type||'</option>');
         end loop;
    htp.print('</SELECT>');
    htp.print('<br>');
    htp.print('<select name="Subject" id="Subject" >');
    htp.print('<option value="None" SELECTED>- Please Choose a Category Above - </option>');
         htp.print('</select>');
    htp.print('<INPUT TYPE="submit" value="submit">');
    htp.print('</FORM>');

    sorry, dimi, but this forum is limited to questions about the product Oracle HTML DB. if you're not sure what OTN discussion forum is best suited for your question, i think they'd have you ask for the correct one at...
    Community Feedback (No Product Questions)
    regards,
    raj
    ps-my answer to the second question at the top of Pop List and Developer Toolbar shows an easy way in htmldb to implement the type of thing you're after.

  • Java Concurrent Programs classpath

    We have created a number of Java concurrent programs that work fine using the AF_CLASSPATH.
    For one particular concurrent program, we would like to prepend the AF_CLASSPATH with a specific JAR.
    We can't do this prepend on a global level.
    Is this possible and if so what would the GUI fields look like?
    Regards
    Ben

    There shouldnt be any Issue by adding your Jar to the Classpath, or you can keep the Jar file under $JAVA_TOP with this there is no modification to the classpath, ensure your custom code doesnt override the seeded java code.

  • Call Concurrent Program

    Hi,
    Could you suggest me some Logic on the below:
    ============================================
    I wrote a Package/Procedure (Main Concurrent Program).
    In this (above) procedure i have to call a Child Concurrent Program 5 times (these 5 programs should run parallely).
    Ie..I will call it through FND_REQUEST.SUBMIT_REQUEST.
    1st Child Conc Progm will have Parameter = 1
    .Simillarly
    5th Child Conc Progm will have Parameter = 5
    I was thinking to have FOR LOOP 1..5 and then call FND_REQUEST.SUBMIT_REQUEST.
    Not exactly sure how to call.
    Could you thow some thoughts.
    Database: 10g
    Thanks

    something
    declare
    v_request_id   number;
    begin
      for i in 1 .. 5 loop
        v_request_id := fnd_request.submit_request(application => <short_name>,
                                                   program     => <short_name_of_cp>,
                                                   description => NULL,
                                                   start_time  => NULL,
                                                   sub_request => FALSE,
                                                   argument1   => i);
        if v_request_id > 0 then
          fnd_file.put_line(fnd_file.log, 'successfully submitted');     
          commit;
        else
          fnd_file.put_line(fnd_file.log, 'not submitted');
          rollback;
        end if;
      end loop;
    end;

  • Pass input value to a concurrent program of type PL/SQL procedure

    Hi,
    I have created an executable program which is based on "PL/SQL Stored Procedure" method and created a concurrent program which calls this executable. It is available from SRS.
    The relevant stored procedure requires an input variable as parameter.
    How can I pass this parameter when calling the concurrent program from SRS? I tried to follow the same logic as when passing parameters while calling SRS based on "Oracle reports", so create a new parameter, but "token" field is disabled.
    Please help me which is the trick here.
    Thank you.

    Pl see these MOS Docs
    73492.1 - Creating a PL/SQL Concurrent Program in Oracle Applications
    1016543.102 - Custom Stored Procedure Run as Concurrent Request Fails w/ PLS-306 AND ORA-6550
    HTH
    Srini

  • How to call a concurrent program with some parameters in a stored procedure

    Hi All,
    I have made two procedures, xx_nidhi_proc1 and xx_nidhi_proc2.
    xx_nidhi_proc1 takes four parameters from front end and is registered as concurrent program in oracle apps and running fine alone.
    xx_nidhi_proc2 calls the concurrent program of xx_nidhi_proc1 which is XX_NIDS_PROC1_PROG1.
    But the problem in my code is , It runs the second concurrent program for xx_nidhi_proc2 but shows the Inactive- No Manager status for my first concurrent program XX_NIDS_PROC1_PROG1,
    Please find out the error in my code...
    CREATE OR REPLACE PACKAGE BODY NIDHI IS
    procedure xx_nidhi_proc1 (errbuf OUT VARCHAR2,
    retcode OUT VARCHAR2,
    name_t varchar2,
    empno varchar2,
    doj date,
    desig varchar2) is
    begin
    fnd_file.PUT_LINE(Fnd_File.output,'/**************Start of the output **********/');
    fnd_file.PUT_LINE(Fnd_File.output, 'Name:'||name_t);
    fnd_file.PUT_LINE(Fnd_File.output, 'Number:'||empno);
    fnd_file.PUT_LINE(Fnd_File.output, 'DOJ:'|| to_char(doj, 'DD-MON-RRRR'));
    fnd_file.PUT_LINE(Fnd_File.output, 'Designation:'||desig);
    fnd_file.PUT_LINE(Fnd_File.output,'/**************End of the output **********/');
    errbuf:='SUCCESS';
    retcode:='SUCCESS';
    end xx_nidhi_proc1;
    --calls the xx_nidhi_proc1 as concurrent program.
    procedure xx_nidhi_proc21 (errbuf OUT VARCHAR2,
    retcode OUT VARCHAR2)
    is
    v_request_id number;
    begin
    fnd_file.PUT_LINE(Fnd_File.output,'/**************Start of the output **********/');
    fnd_file.PUT_LINE(Fnd_File.output, 'Deptartment Number:'||'Computer');
    fnd_file.PUT_LINE(Fnd_File.output, 'Location:'||'TCS Towers');
    fnd_file.PUT_LINE(fnd_file.output,'Starting XX_NIDS_PROC1_PROG1');
    fnd_global.apps_initialize(user_id => 1318 ,resp_id => 50578, resp_appl_id => 201);
    v_request_id := FND_REQUEST.SUBMIT_REQUEST('PO',
    'XX_NIDS_PROC1_PROG1',
    null,
    null,
    TRUE,
    'Nidhi gupta',
    138609,
    '12-Dec-2003',
    'ASE');
    commit;
    fnd_file.PUT_LINE(fnd_file.OUTPUT,'Request ID is '||to_char(v_request_id));
    fnd_file.PUT_LINE(fnd_file.OUTPUT,'End XX_NIDS_PROC1_PROG1');
    fnd_file.PUT_LINE(Fnd_File.output,'/**************End of the output **********/');
    errbuf:='SUCCESS';
    retcode:='SUCCESS';
    end xx_nidhi_proc21;
    Thanks
    Nidhi
    END NIDHI;

    Nidhi this might help u
    v_num_request_load_id :=
    fnd_request.submit_request (c_chr_application_short_name,
    c_chr_apl_short_name,
    NULL,
    NULL,
    FALSE,
    p_chr_allocation_view,
    p_chr_flow_type,     
    p_chr_operating_unit,
    p_dte_planned_from,          
    p_dte_planned_to,
    p_num_application_id,
    p_num_loc_seg1_id,
    p_num_loc_seg2_id,
    p_num_organization_id,
    p_num_responsibility_id,
    p_num_session_id,
    p_num_user_id,
    p_chr_arrival_status,
    p_chr_statuses,
    p_chr_locations,
    p_chr_transport_unit
    COMMIT;
    IF v_num_request_load_id = 0
    THEN
              o_num_stat := 2;
         o_chr_err_msg := 'Report could not be submitted';
    END IF;
              o_chr_err_msg := 'Request Id :' || v_num_request_load_id;
              v_boo_wait :=
         fnd_concurrent.wait_for_request (v_num_request_load_id,
    c_num_interval,
    c_num_max_wait,
    v_chr_phase,
    v_chr_status,
    v_chr_dev_phase,
    v_chr_dev_status,
    v_chr_err_buf
    IF v_chr_dev_phase = 'COMPLETE' /* 1.1 */
    THEN
    IF v_chr_dev_status = 'NORMAL' /* 1.2 */
    THEN
    BEGIN
    -- some your own logic
    EXCEPTION
    WHEN OTHERS THEN
         o_chr_err_msg := o_chr_err_msg||' Unable to determine Report File Path.';
                   o_num_stat := 2;
    END;
    ELSIF v_chr_dev_status = 'WARNING'                                             /* 1.2 */
    THEN
    o_chr_err_msg := o_chr_err_msg||' Report program completed with Warning.';
    ELSE                                                                                               /* 1.2 */
    o_chr_err_msg := o_chr_err_msg||' Report program completed with Error.';
    END IF; /* 1.2 */
    ELSE /* 1.1 */
    o_chr_err_msg := 'Report program Timed Out.';
    END IF; /* 1.1 */

  • FELX-SSV EXCEPTION Error while creating SIT through concurrent program

    I am trying to create an SIT through concurrent program using API with all hard coded values for all API parameters, I am getting FLEX-SSV Exception error but the same code is working fine in TOAD.
    Procedure :-
    CREATEORREPLACEPROCEDURE XX_ABSENCE_TEST
    P_ERR_BUF OUTVARCHAR2,
    P_RETCODE OUTNUMBER
    IS
    L_ANALYSIS_CRITERIA_ID        NUMBER;
    L_OUT_PERSON_ANALYSIS_ID      NUMBER;
    L_PEA_OBJECT_VERSION_NUMBER   NUMBER;
    L_ERR_MESG varchar2(3000);
    BEGIN
    INSERTINTOXX_DEBUGVALUES('Starting',0,0);
    HR_SIT_API.CREATE_SIT
    (P_VALIDATE                       =>FALSE,
    P_PERSON_ID                      =>59021,
    P_BUSINESS_GROUP_ID              =>3036,
    P_ID_FLEX_NUM                    =>50320,
    P_EFFECTIVE_DATE                 =>'02-APR-15',
    P_DATE_FROM                      =>'02-APR-15',
    P_SEGMENT1                       =>'Annual Leave',
    P_SEGMENT3                       =>'02-APR-15',
    P_SEGMENT5                       =>'05-APR-15',
    P_SEGMENT10                      =>59021,--I.PERSON_ID,
    P_SEGMENT15                      =>'02-APR-15',
    P_ANALYSIS_CRITERIA_ID           => L_ANALYSIS_CRITERIA_ID,
    P_PERSON_ANALYSIS_ID             => L_OUT_PERSON_ANALYSIS_ID,
    P_PEA_OBJECT_VERSION_NUMBER      => L_PEA_OBJECT_VERSION_NUMBER
    INSERTINTOXX_DEBUGVALUES('Created',NULL,NULL);
    COMMIT;
    EXCEPTION
    WHENOTHERSTHEN
    L_ERR_MESG :=
                                 L_ERR_MESG || SUBSTR(SQLERRM,1,250)
                                 || CHR(10);
    INSERTINTOXX_DEBUGVALUES('Exception',L_ERR_MESG,NULL);
    commit;
    END;
    Regards,
    Pradeep

    It looks like more of an issue with connecting to essbase, usually "java.lang.UnsatisfiedLinkError: no HspEssbaseEnv in java.library.path" means planning has not been installed or deployed correctly, what OS is it running on?
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Cal plsql pkg from Java concurrent program

    Hi,
    I try to execute one plsql pkg inside a java concurrent pgm.plsql code executed from view output i got the out put.Bt my status Shows ERROR.
    this is my code
    try{
    System.out.println("transation type inside try block "+deptno);
    CallableStatement cs=con.prepareCall("{call XX_ANE_DEPT2_PKG.XX_ANE_DEPT2_PRC(?,?,?)}");
    cs.setString(1,null);
    cs.setString(2,null);
    cs.setString(3,deptno);
    cs.execute();
    con.commit();
    cs.close();
    //LF.writeln("Generating Programs for Application : " + transactionType, LogFile.STATEMENT);
    //OF.writeln( " Available Concurrent Programs for Application " +transactionType );
    catch(SQLException ex){
    lRC.setCompletion(ReqCompletion.ERROR, ex.toString());
    finally
    pCpContext.releaseJDBCConnection();
    I dont knw why the status is error any one pls help.If it is wrong method any one pls give a sample pgm to cal a PKG in concurrent pgm.
    pls help
    Edited by: aneeshmathew on Dec 28, 2010 4:49 AM
    Edited by: aneeshmathew on Dec 28, 2010 4:49 AM

    Are you able run this concurrent program from form application.? if it erroring out there what error you are getting.
    Thanks

  • Create a new responsibility to run a concurrent program

    Hi, I have a very basic question. I have written a concurrent program in Java, I want to create a new responsibility and assign roles/function to it so that user can access and run my Java concurrent program.
    I am new to EBS so I don't have an idea how to achieve this. Please let me know if there is a guide that provides me with steps to create a Responsibilities, roles/functions and then access my Java concurrent program from it.
    Also generally we provide patches for changes that we do in EBS environment. So once I create roles and responsibilities then how to create a patch for my changes so that they can be applied on other EBS environments.
    My Environment details are as follows:
    EBS - 12.1.3
    DB - Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    OS - Linux <host_name> 2.6.9-89.0.0.0.1.ELhugemem #1 SMP Tue May 19 04:38:38 EDT 2009 i686 i686 i386 GNU/Linux
    Thanks!

    Oracle guides are available here. Check System Administrator guide for details on responsibility, concurrent program etc.
    http://docs.oracle.com/cd/E18727_01/nav/technology.htm
    Additionally below links might be useful.
    http://docs.oracle.com/cd/E18727_01/doc.121/e12843/T156458T156461.htm
    http://www.in-oracle.com/Oracle-Apps/11i/create-responsabilities-apps.php
    http://www.exforsys.com/tutorials/oracle-apps/oracle-apps-sys-admin-users-and-responsibilities.html
    http://my.safaribooksonline.com/book/databases/oracle/9781849684842/making-a-concurrent-program-available-to-a-user/id286752990
    http://oracle.anilpassi.com/java-concurrent-programs-in-oracle.html
    http://erpschools.com/articles/concurrent-program-registration-and-add-it-to-request-group
    Thanks
    Shree

  • Create Host Concurrent Program with parameters

    Hi All,
    I have created a host concurrent program in Oracle APPS with one parameter. My shell script in unix is this :
    cd $1
    mv _oracle.txt Especificacion.txt
    it is in $AC_TOP/bin directory.
    When I execute the host concurrent program with oracle APPS with one parameters that is the path that I want to send it to shell script this error occurs.
    /hogr-949-000/oracle/prodappl/ac/11.5.0/bin/xx_opm_cambio_nomarch_iweb: cd: bad argument count
    mv: cannot rename _oracle.txt to Especificacion.txt:
    No such file or directory
    /hogr-949-000/oracle/prodappl/ac/11.5.0/bin/xx_opm_cambio_nomarch_iweb
    Program exited with status 1
    I have read many papers in metalink and I understand that at first parameter it includes many details programs such as, user id, concurrent program name, etc etc, and not only the value that I want to send.
    So I know the problem, but my question is, how can I resolve it ?. I'm not a unix expert.
    Please,
    Thanks in advance
    Mariano.-

    It doesn't work. But I finally find the solution. The point is this...
    p1=`echo $1|cut -f9 -d " "|cut -f2 -d '"'`
    In f1, f2, f3, etc you receive the information of the concurrent, and in f9 receive the first value of your parameter that you create in de concurrent program.
    Regards,
    Mariano.-

  • PLSQL WANTS TO RUN  WINDOWS PROGRAM FROM PLSQL PROCEDURE

    WANTS TO RUN WINDOWS PROGRAM FROM PLSQL PROCEDURE.
    I want to run EXE file from pl/sql program , i have tried host it does
    work in pl/sql .
    Is there any Solution to this problem
    Thank you

    Hi,
    It sounds like what you are trying to do, is run one mapping in a pre-mapping process of another mapping. You use a wrapper that implements sqlplus_exec_template.sql in PL/SQL. Is that correct?
    I don't think that by the way you execute this mapping, it ends up in the context of the process flow. The reason is because according to Warehouse Builder the mapping is being invoked standalone (through the wrapper that implements the template). As a result, the context in which Warehouse Builder would log the messages is lost.
    What I suggest you do (assuming I understand the problem correctly), is run the mapping as a separate mapping in the process flow. Because in the current release we do not support passing output parameters in the process flow, you will have to (temporarily) store the results of the first mapping in a table and pick it up from there in the other mapping. In the next major release (autumn 2004) we will support passing parameters between activities.
    Thanks,
    Mark.

Maybe you are looking for

  • Mail step in workflow is in infinite loop.

    Dear All,        I have created a workflow with deadline monitoring feature.In the workflow created,I have defined a mail step in a loop with loop condition priority = 8 and three minute for deadline.When the workflow gets triggered , the mail step i

  • How do in add a calendar event on my iPhone

    Since I changed over to icloud, my iphone doesn't sync up the ical with my computer.

  • Oracle 10gR2 (10.1.2.0.0)

    is there any way to install 10gR2 (10.1.2.0.0) on unbreakable Linux ? i had install 10.1.2.0.2 on unbreakable but it's not possible installation 10.1.2.0.0 ! ! !

  • Using 'change all' in Get Info

    I am trying to use the 'change all' tab on get info to make all similar documents open with the same application. Whenever I select an application and choose 'select all' it just flips back to the default. In this case, all my word docs are no longer

  • Oracle Financial Consolidation Hub FCH Historical Rates

    There is a requirement to enter data for Historical rates in Oracle R12. I only know that GCS is the schema for historical rates table. Please, I need to know if there are any interface tables or API relates to this upload. Also any technical web lin