Calling a pl\sql package main precedure from a SHL script

If I run this procedure from TOAD suppl_load_main MY package is executed,
I need to be able to handle this to the user, so they can run it from our application, I am using a shl script to call this precedure, I done this before and it works, I never done using the main precedure from a package where the main call other precedures, I know I am doing the right stuff in the application registering the
jobs, creating the links for the shl etc...
I guess the question is, it is possible to call the Main precedure(that call other precedures) from the shl script, or what I am doing wrong
Thank you
PROCEDURE suppl_load_main (
      p_one_up_number     IN   NUMBER,
      p_process_name      IN   VARCHAR2,
      p_audit_or_update   IN   VARCHAR2,
      p_user              IN   VARCHAR2 DEFAULT NULL
   IS
      Modification History
      08/11/2009 Creator:
      This is the precedure that will execute the all package, there are not parameters,
      the package just need to be executed from this precedure.
      Changes:
      p_applicant_main_err_code   VARCHAR2 (2000);
      p_main_err_code             NUMBER;
      p_ora_err_msg               VARCHAR2 (2000);
      p_insert_err_code           VARCHAR2 (2000);
      p_ora_err_code              VARCHAR2 (2000);
      p_srtpers_err_code          VARCHAR2 (2000);
      p_gurmail_err_code          VARCHAR2 (2000);
      v_out_path                  VARCHAR2 (2000)               := 'MIDD_LOG';
      v_out_file                  VARCHAR2 (2000)
         :=    'common_app_supl_load_pkg'
            || '_'
            || TO_CHAR (SYSDATE, 'YYYYMMDDHH');
      v_file_handle               UTL_FILE.file_type;
      p_refresh_err_code          VARCHAR2 (20000);
      v_email                     saturn_midd.mail.email_con;
      v_mailto                    saturn_midd.mail.email_address;
      v_mailfrom                  saturn_midd.mail.email_address;
      v_mailsubject               VARCHAR2 (65)                  := '';
      v_mailmessage               VARCHAR2 (32000)               := '';
      v_database_name             VARCHAR2 (10);
   BEGIN
      SELECT ora_database_name
        INTO v_database_name
        FROM DUAL;
      v_database_name :=
              SUBSTR (ora_database_name, 1, INSTR (ora_database_name, '.') - 1);
      -- isolate instance name
      v_file_handle := UTL_FILE.fopen (v_out_path, v_out_file, 'w');
      UTL_FILE.put_line (v_file_handle, v_database_name);
      UTL_FILE.put_line (v_file_handle,
                         ' ' || TO_CHAR (SYSDATE, 'DD-MON-YYYY HH:MI:SS')
      UTL_FILE.put_line (v_file_handle, 'Starting the stuu_MISS_LOAD_main...');
      srtiden_insert (p_insert_err_code, p_ora_err_code, p_ora_err_msg);
      srtaddr_insert (p_insert_err_code, p_ora_err_code, p_ora_err_msg);
      srtpers_insert (p_insert_err_code, p_ora_err_code, p_ora_err_msg);
      upd_srtpers_day_mon_yr (p_srtpers_err_code,
                              p_ora_err_code,
                              p_ora_err_msg
      srttele_home (p_insert_err_code, p_ora_err_code, p_ora_err_msg);
      appl_gurmail_insert (p_gurmail_err_code, p_ora_err_code, p_ora_err_msg);
      p_main_err_code := '0';
      UTL_FILE.put_line (v_file_handle,
                         CHR (10) || 'All procedures ended successfully.'
      IF p_applicant_main_err_code = 0
      THEN
         UTL_FILE.fremove (v_out_path, v_out_file);
      END IF;
      v_mailto.email := '[email protected]';
      v_mailfrom.email := '[email protected]';
      v_mailsubject :=
              v_database_name || ': common_app_supl_load_pkg,testing email_1 ';
      saturn_midd.mail.MESSAGE
                             (v_email,
                              v_mailto,
                              v_mailfrom,
                              v_mailsubject,
                                 v_database_name
                              || ': *common_app_supl_load_pkg testing email* '
                              || CHR (100)
                              || 'All procedures ended successfully: '
                              || v_out_path
                              || '/'
                              || v_out_file
   EXCEPTION
      WHEN OTHERS
      THEN
         p_applicant_main_err_code := '1';
         p_ora_err_msg := SUBSTR (SQLERRM, 1, 2000);
         p_ora_err_code := SQLCODE;
         v_mailto.email := '[email protected]';
         v_mailfrom.email := '[email protected]';
         v_mailsubject := v_database_name || ': commonapp_supl_load_pkg';
         saturn_midd.mail.MESSAGE
                     (v_email,
                      v_mailto,
                      v_mailfrom,
                      v_mailsubject,
                         v_database_name
                      || ': *commonapp_supl_load_pkg ended testing email_2* '
                      || CHR (100)
                      || 'Output log is on the server MIDD_LOG: '
                      || v_out_path
                      || '/'
                      || v_out_file
         saturn_midd.mail.message_end (v_email);
   END suppl_load_main;
END commonapp_supl_load_pkg;here is the shl
v_audit_or_update VARCHAR (1) := 'A';
The application needs this parameter...
/* Formatted on 2009/02/06 15:17 (Formatter Plus v4.8.8) */
--   Author:       
--   Date Written: August 2009
--   Purpose:  This script calls the PROCEDURE saturn_midd. suppl_load_main
--  Version Control:
SET serveroutput ON SIZE 1000000
DECLARE
   v_audit_or_update   VARCHAR (1)                      := 'A';
   job_num             NUMBER                           := NULL;
   process_name        VARCHAR2 (8)                     := NULL;
   v_user              VARCHAR2 (30)                    := NULL;
BEGIN
   job_num := TO_NUMBER (&1);
   process_name := '&2';
   v_user := UPPER ('&3');
   -- Retrieve the parameters for this job submission, so they can be passed to
   -- the stored procedure.
   SELECT UPPER (gjbprun_value)
     INTO v_audit_or_update
     FROM general.gjbprun
    WHERE gjbprun_job = UPPER (process_name)
      AND gjbprun_one_up_no = TO_NUMBER (job_num)
      AND gjbprun_number = '01';
   -- Now call the stored procedure to do the work.
saturn_midd.commonapp_supl_load_pkg.suppl_load_main( job_num,
                                                      process_name,
                                                      v_audit_or_update,
                                                      v_user);
EXCEPTION
   WHEN NO_DATA_FOUND
   THEN
      -- Put a message in the job log
      DBMS_OUTPUT.put_line
                    ('No parameters in Process Run Parameter Table (GJBPRUN)');
END;
EXIT;
/

what I am doing wrong supl_load_main invokes a whole bunch of commands that could each potentially fail, but it has one generic exception handler that sends an email (or that's what it looks like, maybe it desn't even do that - what do saturn_midd.mail.MESSAGE and saturn_midd.mail.message_end do?) and doesn't re-raise the exception, so anything could be failing and you wouldn't know.
There seems to be some confusion between "p_" variables (normally parameters) and "v_" (normally local variables) which suggests that some wholesale copying and pasting might have gone on and therefore that some of the assignments might not be doing what they were originally intended for. For example, after assigning SUBSTR (SQLERRM, 1, 2000) to p_ora_err_msg, it is not used again. Perhaps originally p_ora_err_msg was returned to the caller, written to a logfile etc.
I'm not a fan of including the word "main" in procedure names or the assumption that one procedure in a package should be more important than any others, but I do see it a lot so I guess you're not alone in that approach.

Similar Messages

  • Calling a PL/SQL Package from a controller

    Hi ,
    I have to add some busines funtionality to the standard existing oco page .
    i have extened the standard controller and add the validation logic there , now if the validation is true i have to call a pl/sql package to do some functions . now i am facing few issues here
    a) can i call a pl/sql package from a controller ?
    b) should i extend the standard AM and call the pl/sql package from the extended am . is extending am allowed ?
    please let me know the best sol to achieve this

    a) can i call a pl/sql package from a controller ?<b>Yes</b> you can call a pl/sql procedure from controller through <b>OracleCallableStatement</b> object.
    <br>
    b) should i extend the standard AM and call the pl/sql package from the extended am . is extending am allowed ?Extending AM is <b>allowed</b>, but as can achieve your goal through the CO extension, why bother to touch AM :)
    --saroj                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to call at PL/SQL package?

    Hi,
    How to call a PL/SQL package from withing a VORowImpl?
    Also what packages need to be imported for this?
    Thanks,
    AD

    Hi,
    Thanks for the replies friends.
    I understand this is not a good practice to call a pl/sql package. I tried as per the OAF standards.
    My requirement is to display the GL String in a region of type table. This is in iExpense and the region is (ReviewBusinessCCardTblRN.xml) i.e. the Review page in the Expense report creation steps.
    The data in this region is not coming directly from one VO. There are two VOs involved in it.
    1> BusinessCCardLinesForReviewVO
    2> ReceiptBasedLinesVO (This is the actual source of data and it contains a SQL statement)
    The "BusinessCCardLinesForReviewVORowImpl" calls methods in "ReceiptBasedLinesVORowImpl" to get all the data.
    So, my approach was to
    1> Extend "ReceiptBasedLinesVO" and add an attribute for the GL String in the SQL statement.
    2> Write a method in the "ReceiptBasedLinesVOExRowImpl" to fetch the GL String.
    3> Extend BusinessCCardLinesForReviewVO and add an attribute for the GL String.
    4> In the extended VO's (BusinessCCardLinesForReviewVOExRowImpl) row impl, call "ReceiptBasedLinesVOExRowImpl" GL String method.
    5> Then use "BusinessCCardLinesForReviewVO" GL string attribute to display in the region.
    Is there anything wrong with this approach?
    But, this does not seem to be working.
    Steps 3, 4, 5 are working as I tested with hard coded values in "BusinessCCardLinesForReviewVOExRowImpl".
    But when I call method in "ReceiptBasedLinesVOExRowImpl" to get the GL String, it does not working. No error returned. The page displays all the values as it was displaying in the standard functionality.
    As this is an urgent requirement, I thought of writting a PL/SQL function which would take CCID from "BusinessCCardLinesForReviewVO" and return the GL String.
    And call this PL/SQL funtion in "BusinessCCardLinesForReviewVOExRowImpl".
    Please help me on this.
    Srini: Could you please give the exact syntax for calling the PL/SQL stored function in VORowImpl.
    Thanks,
    AD

  • Call a PL/SQL procedure or function from applet

    Could anyone please let me know how I could call a PL/SQL procedure
    or function from a JDBC method from applet with Internet Explorer?

    It depends from where you are calling your PLSQL routine. If it is SQL*Plus then you can use & (ampersand) with the variable to be input at run time.
    If you are executing the PLSQL routine from another application (some front end application) then it's not possible. Because when a procedure is executing at server side, the front end application does not have control, and the control is only transfered back to front end application when the PLSQL routine either completes successfully or throws an exception.
    In either case, you can not go back to the PLSQL routine.
    In this case, what you can do is, write code in your front end application to get that variable value from user and then pass that value to PLSQL routine.

  • Calling custom pl/sql package on termination of Employee

    Hi,
    I want to call a custom pl/sql package that will create an element entry for employees, with their outstanding holiday entitlement upon termination.
    One way I have tried to do this is by personalizing the end employment form, but I get this error - ORA-00923: FROM keyword not found where expected
    from this code:
    <h5> ='declare
    l_element_entry_id NUMBER;
    l_object_version_number NUMBER;
    l_create_warning BOOLEAN;
    begin
    pay_element_entry_api.create_element_entry(p_validate => FALSE
    ,p_effective_date => (${item.period_of_service.actual_termination_date.value})
    ,p_business_group_id => 106
    ,p_assignment_id => (select assignment_id from per_all_assignments_f where person_id = ${item.period_of_service.person_id}
    and primary_flag = 'Y')
    ,p_element_link_id => 3499
    ,p_entry_type => 'E'
    ,p_input_value_id1 => 7318
    ,p_entry_value1 => (XX_PERSNS_UTILS.GetLeaveAccrual(${item.period_of_service.person_id}))
    --,p_cost_allocation_keyflex_id => ee_asg_api_rec.cost_allocation_keyflex_id
    ,p_effective_start_date => ((${item.period_of_service.actual_termination_date.value})-1)
    ,p_effective_end_date => ${item.period_of_service.actual_termination_date.value}
    ,p_element_entry_id => l_element_entry_id
    ,p_object_version_number => l_object_version_number
    ,p_create_warning => l_create_warning
    end'
    </h5>
    I also thought another way to accomplish this would be using business events but under Workflow Administrator I can see the Business Events and subscriptions but I can only search for existing set-up, I can't create my own.
    Does anyone have any ideas why this personalisation isn't working or has any other ideas of how to go about this?
    Thanks

    This is a tough solution to implement. The drawbacks of Forms Personalization, if you get it working, are that it won't be called from other areas (People Management templates, Self Service Termination etc). The drawbacks of API User Hooks are that they're not used in all places either. Finally, as mentioned, reverse termination means that you need to then backout such holiday payout entries.
    The most reliable way to do this is with an batch process, eg, concurrent program, that runs, say, daily:
    1) Find all employees physically terminated yesterday (regardless of their actual termination date)
    2) Calculate and create the holiday payout entry (if it's not already there)
    3) Find all employees who were updated yesterday and HAVE the holiday payout entry (this is the way to detect those who have been reverse terminated)
    4) Date-track purge the holiday payout entry.
    5) Consider API User Hooks to pick up late changes to absence records or anything that might affect any holiday already paid out so that you can update the holiday payout entry
    6) Configure retro to handle holiday payout for retrospective terminations, deductions for those who were paid holiday payout and later reverse terminated, and subsequent changes to the amount paid out (eg, because of late changes to absence records)

  • Calling a function in the main movie from a loaded swf

    I realize this is probably a very basic question, but I have
    loaded a SWF file into another movie. I now want to call a function
    in the main SWF. Is there a way to do that? Alternatively, I have a
    custom class where I could put the function, but I haven't been
    able to figure out how to call it from the loaded SWF either. Do I
    somehow need to associate the class with the main movie,
    or...?

    Never mind - I was doing something very stupid and wasn't
    calling the function as a method of a movie clip. I was simply
    calling checkTarget(event) rather than
    event.currentTarget.checkTarget(event); which seems to work.

  • Call a PL/SQL Package

    Hi All,
    I'm using ADF BC, JDev 11G.
    I need to call a stored package to do the validations for the data entered in the page design. I would like to know how to call the package from AppmoduleImpl.java Any example for reference would be helpful.
    Thanks in Advance, assistance will be appreciated.
    Jyothi

    Use a method like the following inside your AppModuleImpl file.
      public Integer myMethod(String pParam1, int pParam2) {
        int returnValue = 0;
        String selectDML = "{? = call pkg_name.pkg_function(?,?)}";
        CallableStatement statement = getDBTransaction().createCallableStatement(selectDML, 1);
        try {
          statement.registerOutParameter(1, Types.INTEGER);
          statement.setInt(1, returnValue);
          statement.setString(2, pParam1);
          statement.setInt(3, pParam2);
          statement.execute();
          returnValue = statement.getInt(1);
          statement.close();
          return returnValue;
        } catch (Exception ex) {
          throw new JboException(ex);
      }The above a example uses a pkg with 1 out and 2 in params, customize it to your needs.
    Then you could use it inside a managed bean like follows:
      private int returnValue;
      public int getReturnValue() {
        ApplicationModule am =
          BindingContext.getCurrent().getDefaultDataControl().getApplicationModule();
        AppModuleImpl appModuleImpl = (AppModuleImpl)am;
        returnValue = appModuleImpl.myMethod("aString", 0);
        return returnValue;
      }Hope that helps.
    Matthew.

  • Calling one java program (with main method) from another

    Hello,
    How can I start another java program from one? Lets
    say I want Second.java to start by calling it from
    First.java. How do I do it? The two programs are given
    below. Any help is appreciated.
    Thanks,
    Amanda
    First.java
    import java.io.*;
    import java.lang.reflect.*;
    public class  First
         public static void main(String[] args)
              Process theProcess=null;
              System.out.println("Hello World from First.java!");
              String second=new String("Second.java");
              //System.load(second);
              //Runtime.getRuntime().load(second);
              try
                   theProcess=Runtime.getRuntime().exec( "Second.java"
                   System.out.println("after exec");
              catch (IOException ioe)
                   System.out.println(">>IOException thrown in
    First.java while calling
    Second.java."+ioe.getMessage());
    Second.java
    public class  Second
         public static void main(String[] args)
              System.out.println("Hello World from Second.java!");
    }

    Stop posting here. The crosspost remark was to alert others that there is a duplicate topic - all answers should be centralized in one so as to not waste people's time duplicating answers when they don't see both topics and the answers therein.

  • Passing arguments to main method from a shell script

    The main method of my class accept more than 10 arguments so my shell script execute this class like this :
    java -cp xxxx mypackage.MyClass $*
    The problem is that some of those arguments allows spaces. When i execute this script like this :
    myscript.sh firstparam secondparam ...... tenthparm "eleventh param"
    or
    myscript.sh firstparam secondparam ...... tenthparm 'eleventh param'
    the java class consider that my eleventh param is 'eleven' and not 'eleventh param'
    The same class works well with an equivalent dos script.

    I had this problem once also, and I found there are several ways to fix it. One way is to replace all of the spaces in the arguments with _ characters, or you can concantate all of the arguments into one String at runtime (with spaces in between) and use code to separate the arguments out. With the quotation marks, this code would be simple. If the spaces in one argument are used to divide different parts of the argument, just make them spearate arguments.

  • Calling User written pl/sql Packages from forms 9ias

    I want to call Pl/sql package (my own) from forms 9ias.
    Actaully i am upgrading my application forms 6i to 9ias forms.
    Please suggest me a solution.

    Same way as 6i. What is the problem ?

  • How to call a PL/SQL procedure from a xml Data Template

    We have a requirement in which we need to call a pl/sql package.(dot)procedure from a Data Template of XML Publisher.
    we have registered a Data Template & a RTF Template in the XML Publisher Responsibility in the Oracle 11.5.10 instance(Front End).
    In the Data Query part of the Data Template , we have to get the data from a Custom View.
    This view needs to be populated by a PL/SQL procedure.And this procedure needs to be called from this Data Template only.
    Can anybody suggest the solution.
    Thanks,
    Sachin

    Call the procecure in the After Parameter Form trigger, which can be scripted in the Data Template.
    BTW, there is a specialized XML Publisher forum:
    BI Publisher

  • Issue in Calling PL/SQL packages using callable statement

    Hi ,
    I have the requirement of calling two pl/sql packages , After call of first package is successful , i need to pass the output of that first package as input to second package.
    Since i have called both the packages in same method of AM, first package gets executed successfully but second package doesnt get the input values required from first package and results in error.
    Looks like since commit is happening in the single session second package is passed with NULL values.
    Need suggestion for proper way of calling pl/sql packages when second package is dependant on first one:
    Code used inside AM Method:
    if("PENDING_XXX".equals(regVORow.getRegStatus()))
    regVORow.setRegStatus("VENDOR_CREATED");
    getOADBTransaction().commit();
    OracleCallableStatement cStmt = null;
    OADBTransaction dbTxn = getOADBTransaction();
    NUMBER vendor_id = new NUMBER(-1);
    NUMBER vendor_site_id = new NUMBER(-1);
    int vendor_id_value = -2000;
    String vendor_number = null;
    try
    cStmt = (OracleCallableStatement)dbTxn.createCallableStatement("begin *XXB_POS_PVT.create_vendo*r( p_vendor_name => :1, p_supplier_reg_id => :2, p_vendor_id=>:3); end;", 1);
    cStmt.setString(1, regVORow.getSupplierName());
    cStmt.setNUMBER(2, new Number(Integer.parseInt(supplierId)));
    cStmt.registerOutParameter(3, 4);
    cStmt.execute();
    vendor_id = cStmt.getNUMBER(3);
    vendor_id_value = vendor_id.intValue();
    catch(SQLException e)
    throw new OAException(e.getMessage());
    Number vendorId = new Number(vendor_id_value);
    regVORow.setVendorId(vendorId);
    if(vendorId != null)
    vendor_number = getSupplierVendorNumber(vendorId);
    getOADBTransaction().commit();
    AsiPosSupplierOpCosVOImpl regOpCosVO = (AsiPosSupplierOpCosVOImpl)this.getAsiPosSupplierOpCosVO1();
    AsiPosSupplierOpCosVORowImpl row = null;
    int fetchedRowCount = regOpCosVO.getFetchedRowCount();
    RowSetIterator createIter1 = regOpCosVO.createRowSetIterator("createIter1");
    if(fetchedRowCount > 0)
    createIter1.setRangeStart(0);
    createIter1.setRangeSize(fetchedRowCount);
    for(int i = 0; i < fetchedRowCount; i++)
    row = (AsiPosSupplierOpCosVORowImpl)createIter1.getRowAtRangeIndex(i);
    if(row.getApprovalStatus().equalsIgnoreCase("HEAD_APPROVED"))
    try
    oadbtransactionimpl.writeDiagnostics(this,"Creating Site - " + vendor_id_value+" "+row.getSupplierOpcoCode()+" "+supplierId,1);
    cStmt = (OracleCallableStatement)dbTxn.createCallableStatement("begin *XXB_POS_PVT.create_vendor_sites*(p_supplier_reg_id => :1, p_vendor_id=>:2, p_opco_code=>:3, p_vendor_site_id=>:4); end;", 1);
    cStmt.setNUMBER(1, new Number(Integer.parseInt(supplierId)));
    cStmt.setNUMBER(2, new Number(vendor_id_value));
    cStmt.setString(3,row.getSupplierOpcoCode());
    cStmt.registerOutParameter(4, 4);
    cStmt.execute();
    vendor_site_id = cStmt.getNUMBER(4);
    getOADBTransaction().commit();                                    
    catch(SQLException e)
    throw new OAException(e.getMessage());
    createIter1.closeRowSetIterator();

    Hi ,
    There are some validation that can be performed from Entity level ( EO ) , you can go through them in Jdev guide .
    It depends on the business requirement , not all validation can be performed from Entity level .
    Let us know your business requirement , will try to clear your doubt .
    --Keerthi                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Calling PL/SQL user defined functions from ODI Constraints

    Hi All,
    We are trying to call user defined PL/SQL functions from ODI. We are able to call them from ODI's User functions. But when we are trying to call them from ODI Constraints under Models, it is throwing an error 'ORA-00920 invalid relational operator'. Kindly let me know if anyone has faced the same issue and got the resolution for the same. Thanks in Advance.
    Regards,
    Abhishek Sharma

    Hi Ace,
    Thanks for the response, the same error was coming in operator also.
    I am able to call PL?SQL user defined functions from ODI Constraints. We have to first call ODI User functions from the ODI constraints as we cant call PL/SQL function (compiled in database) directly.
    From the ODI User functions, we can then call the PL/SQL functions.
    Please reach out to me if you need further details reg this.

  • Problems with PL/SQL packages

    Hello,
    I face the following problem with PL/SQL stored procedures. The Oracle
    version is 8.0.5 on Windows NT 4. The PL/SQL package has a set of procedures and functions.
    The main procedure of the PL/SQL package is triggered from VC++ executable. If for some reason,
    an exception is caught in the stored procedure (like no_data_found
    exception), then the following problem occurs.
    If we try to trigger the stored procedure again through the VC++ executable,
    the variables in the stored procedures have the values as in the previous
    execution. They are not getting initialised. (The same database connection
    is used in VC++ executable).
    Currently, only if a new connection to the database is used , the problem is
    solved.
    Also, change in the input parameters of the procedure is not reflected, once the procedure fails because of any exception. Only the input which was given during the time of execution when the procedure failed,is considered.
    What could be the reason for this problem and how can this be corrected?
    Please send in your suggestions.
    Thanks and Regards,
    Ramya Priya
    null

    Hi Keith,
    I am connecting to the database as the package owner..
    I have noticed earlier that I have problems when capturing triggers also.. The content of one large trigger contains 36371 characters and when capturing it from DB, the content was truncated to 28020 characters in Designer.
    Our ideas with capturing the DB packages/procedures were to use the Designer as version control system.
    We wanted to have all objects used in a project in Designer.. entities, tables, triggers, packages, procedures, Forms files, etc. in order to make a configuration for a project release.
    Thank you,
    Claudia

  • Oracle Reports with PL/SQL package in before Trigger

    I have an oracle report which is set to run as a concurrent program in Oracle Apps. My before report trigger calls a pl/sql package. I am debating using errbuf and retcode, since I have not defined the pl/sql package as a concurrent program. But if I do add errbuf and retcode to the pl/sql package parameters, how do I call them in the trigger.
    function BeforeReport return boolean is
    begin
    delete from XXDK_SAMS2_MEAN_RATIO;
    delete from XXDK_SALES_RATIO_TOTALS;
    commit;
    XXDK_SAMS2_SALES_RATIO_RPT_PKG.INSERT_SALES*(:errbuf, :retcode*, :neighborhood, :salefrom, :saleto, :verfrom, :verto, :tax,
    :deed1, :deed2, :deed3, :tran1, :tran2, :tran3, :accnttype);
    return (TRUE);
    end;
    And do I add errbuf and ret code as paramters in the registered setup?

    Hi,
    please see if the code in these documents help.
    Note: 73492.1 - Creating a PL/SQL Concurrent Program in Oracle Applications
    Note: 221542.1 - Sample Code for FND_SUBMIT and FND_REQUEST API's
    Regards,
    Hussein

Maybe you are looking for