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

Similar Messages

  • 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

  • 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 a PL/SQL procedure from Portal

    Env.Info: Windows NT Server 4 (Service Pack 3) / Oracle 8i R3 EE / Oracle Portal 3.0 Production.
    I created a new schema "BISAPPS" and created a user with the same name. Ran provsyns.sql script to grant Portal API access. Created a new package under this new schema and compiled it against the database. After that I registered the schema as a portal provider. There were no errors.
    Now I logged into Portal using the account PORTAL30. Refreshed the portlet repository and the new portlets appeared. I added the new portlet to the page. It is displayed successfully.
    New portlet allows the user to enter a bug-number and lets the user to either view or edit. If the user clicks on the button "Edit", it opens a new window and displays the contents from BugDB application. But if the user clicks on "Show", it should display the output generated by a PL/SQL procedure (Owned by the above New Schema - BISAPPS) in a separate window. But instead it is displaying the following error in the separate window:
    bisapps_pkg.buginfo: PROCEDURE DOESN'T EXIST.
    DAD name: PORTAL30
    PROCEDURE : bisapps_pkg.buginfo
    URL : http://host_name:80/pls/portal30/bisapps_pkg.buginfo
    And list of environment variables ....
    Can anyone help me? How can I call a PL/SQL procedure when the button is clicked? Thanks in advance.

    You must grant EXECUTE privilege on your procedure to the PORTAL30_PUBLIC user. If the error still persists, create a PUBLIC synonym for your procedure.

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

  • How to call a PL/SQL procedure from a Java class?

    Hi,
    I am new to the E-BusinessSuite and I want to develop a Portal with Java Portlets which display and write data from some E-Business databases (e.g. Customer Relationship Management or Human Resource). These data have been defined in the TCA (Trading Community Architecture) data model. I can access this data with PL/SQL API's. The next problem is how to get the data in the Java class. So, how do you call a PL/SQL procedure from a Java program?
    Can anyone let me know how to solve that problem?
    Thanks in advance,
    Chang Si Chou

    Have a look at this example:
    final ApplicationModule am = panelBinding.getApplicationModule();
    try
         final CallableStatement stmt = ((DBTransaction)am.getTransaction()).
                                                                                         createCallableStatement("{? = call some_pck.some_function(?, ?)}", 10);
         stmt.registerOutParameter(1, OracleTypes.VARCHAR);
         stmt.setInt(2, ((oracle.jbo.domain.Number)key.getAttribute(0)).intValue());
         stmt.setString(3, "Test");
         stmt.execute();
         stmt.close();
         return stmt.getString(1);
    catch (Exception ex)
         panelBinding.reportException(ex);
         return null;
    }Hope This Helps

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

  • "identifier DBMS_FGA must be declared" When called from PL/SQL package...

    Hi there,
    I am trying to call dbms_fga dynamically (of sorts) from a package, and I am getting the error as per the title.
    I have tried as many ways as i can think of calling this from another package, with similar results each time.
    The user/owner of the package has DBA rights, so it doesn't appear to be a permissions issue.
    Oracle Version is 11.1.0.6.0 on Suse.
    any ideas on this anyone?
    Cheers
    CODE:
    Attempt 1:
    PROCEDURE enable_sql_auditing (on_off in boolean default false) is
    v_ssql varchar2(900);
    cursor c1 is
    select table_name
    from all_all_tables
    where owner=gcv_pkg_owner;
    begin
    for rec in c1 loop
    sys.dbms_fga.add_policy(object_schema =>''|| gcv_pkg_owner ||'',
    object_name => ''|| rec.table_name ||'',
    policy_name => ''|| rec.table_name || '_AUDIT''',
    handler_schema => ''|| gcv_pkg_owner ||'',
    handler_module => 'FGA_SQL',
    enable => true);
    end loop;
    end enable_sql_auditing;
    Attempt 2:
    PROCEDURE enable_sql_auditing (on_off in boolean default false) is
    v_ssql varchar2(900);
    cursor c1 is
    select table_name
    from all_all_tables
    where owner=gcv_pkg_owner;
    begin
    for rec in c1 loop
    v_ssql := 'begin sys.dbms_fga.add_policy(object_schema =>''' ||gcv_pkg_owner|| ''', object_name => '''||rec.table_name||''', policy_name => '''||rec.table_name||'_AUDIT'', enable => true); end;';
    execute immediate (v_ssql);
    end loop;
    end enable_sql_auditing;

    Frenchwood wrote:
    The user/owner of the package has DBA rights, so it doesn't appear to be a permissions issue.But it is.
    DBA is a role.
    permissions within PL/SQL have to be directly granted rather than through roles.
    i.e. you need to directly grant execute permission on the package to the required user(s).

  • How to Compile the PL/SQL Package/ Procedure using shell script

    Hi,
    I tried to Compiled the shell script but I am facing some error.
    Can any one help me how to compile the PL/SQL shell script without error. Awaiting for your valuable reply.
    Thanks,
    Arun Prakash

    user8726849 wrote:
    PL/SQL shell script without errorWhat's a PL/SQL shell script?
    Can you please post exactly what you are trying to do (As in the actual code that you are executing and its output)? Also please post it in \ tags (See FAQ).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How can i import java.sql package for midlet development

    I am trying to write a midlet app using Wireless Toolkit 2.5.2. I would like to connect my application to JavaDB in embedded mode. But when I write "import java.sql.*;", I get an error "package java.sql does not exist
    ". I would like to know how can i include this package. please help.

    FBL wrote:
    Sorry to jump in, but isn't there limited jdbc using unconventional methods?
    [http://developers.sun.com/mobility/configurations/articles/cdc/jdbc/|http://developers.sun.com/mobility/configurations/articles/cdc/jdbc/]
    If so, I feel this may better answer the OPs question.
    -TresAbove article refers to CDC - it is useless in CLDC midlets

  • How to call (in PL/SQL) a Procedure with a VARRAY OUT parameter

    Please help, I always get this error:
    PLS-00306: wrong number or types of arguments in call to 'GET_ITEM'
    It's a simple procedure, what is wrong?
    create or replace
    package XXVDF_XPOS_NEW_SALE_TEST as
         type serial_nos               is varray(200)     of     varchar2(20);
    procedure get_item
    (P_SERIALS           IN serial_nos);
    end XXVDF_XPOS_NEW_SALE_TEST;
    create or replace
    package body XXVDF_XPOS_NEW_SALE_TEST as
    procedure get_item
         (P_SERIALS          IN serial_nos)
    is
    begin
         p_serials(1) := 'sdw';
    end get_item;
    end XXVDF_XPOS_NEW_SALE_TEST;
    declare
         type serial_nos               is varray(200) of     varchar2(20);
         P_SERIALS          serial_nos := serial_nos();
    begin
    null;
         XXVDF_XPOS_NEW_SALE_TEST.get_item(P_SERIALS);
         dbms_output.put_line('P_SERIAL_NUMBERS ' ||P_SERIALS(1));
    end;
    thanks, Steve White

    Correction those INs should say OUT:
    create or replace
    package XXVDF_XPOS_NEW_SALE_TEST as
         type serial_nos               is varray(200)     of     varchar2(20);
    procedure get_item
    (P_SERIALS           OUT serial_nos);
    end XXVDF_XPOS_NEW_SALE_TEST;
    create or replace
    package body XXVDF_XPOS_NEW_SALE_TEST as
    procedure get_item
         (P_SERIALS          OUT serial_nos)
    is
    begin
         p_serials(1) := 'sdw';
    end get_item;
    end XXVDF_XPOS_NEW_SALE_TEST;
    declare
         type serial_nos               is varray(200) of     varchar2(20);
         P_SERIALS          serial_nos := serial_nos();
    begin
    null;
         XXVDF_XPOS_NEW_SALE_TEST.get_item(P_SERIALS);
         dbms_output.put_line('P_SERIAL_NUMBERS ' ||P_SERIALS(1));
    end;
    ========
    XXVDF_XPOS_NEW_SALE_TEST.get_item(P_SERIALS);
    ERROR at line 7:
    ORA-06550: line 7, column 2:
    PLS-00306: wrong number or types of arguments in call to 'GET_ITEM'
    ORA-06550: line 7, column 2:
    PL/SQL: Statement ignored

  • How to run a PL/SQL package procedure

    I can run a procedure in Jdeveloper 9.0.3, but How can run a procedure of a package not using SQL*PLUS

    You can run a procedure or function in a package the same way you run a top level procedure or package. Select the package containing the procedure in the navigator and select 'Run' from the context menu. In the Run PL/SQL dialog, select the procedure/function you wish to run from the list in the top left-hand side.
    - John McGinnis
    Oracle JDeveloper Team

  • How to call functions that return package local types?

    Hi everyone, I have a Pl/Sql function in a package that returns a package-local type.
    I would like to call this function from Java, but I don't know what to pass to "statement.registerOutParameter()"
    (it gives this error:
    Unable to resolve type: "XDRIVE_B2B.TEST1.MYTYPE)
    Here's the simple version with one package:
    package TESTPKG IS
    TYPE MYTYPE IS VARRAY(1) OF INTEGER;
    FUNCTION FCT2 RETURN MYTYPE;
    end;
    package body testpkg IS
    FUNCTION FCT2 RETURN MYTYPE IS
    BEGIN
    RETURN mytype(55);
    END;
    end;
    and here's the java code:
    void javatest(OracleConnection conn)
    throws SQLException
    String sql = "{ call ? = testpkg.fct2() }";
    OracleCallableStatement st =
    (OracleCallableStatement) conn.prepareCall(sql);
    st.registerOutParameter(1, OracleTypes.ARRAY, "MYUSERNAME.TESTPKG.MYTYPE");
    st.execute();
    and as I said above, the java code fails with:
    java.sql.SQLException: Fail to construct descriptor: Unable to resolve type: "MYUSERNAME.TEST1.MYTYPE"
    I can't really have this type live outside of a package because in the real case, it's not a VARRAY(1) of integer, it's a VARRAY(1) of MYTABLE%ROWTYPE, which only seems to compile inside a package.
    thanks for any opinions,
    george moudry
    null

    JDBC, JPublisher, and SQLJ do not support PL/SQL-only types. This includes PL/SQL index tables and record types.

  • How ot handle ' in PL/SQL package

    Hi All !
    How can I handle the sign ' in the phrase OU=Admin ID's in this package ?
    DECLARE
    -- Adjust as necessary.
    l_ldap_host VARCHAR2 (256) := 'SERVERNAME';
    l_ldap_port VARCHAR2 (256) := '389';
    l_ldap_user VARCHAR2 (256) := 'CN=username,OU=Admin ID's,OU=XXXXX,DC=XX,DC=XXX,DC=com';
    l_ldap_passwd VARCHAR2 (256) := 'XXXXX';
    l_ldap_base VARCHAR2 (256) := 'DC=XX,DC=XXX,DC=COM';
    l_retval PLS_INTEGER;
    l_session DBMS_LDAP.SESSION;
    l_attrs DBMS_LDAP.string_collection;
    l_message DBMS_LDAP.MESSAGE;
    l_entry DBMS_LDAP.MESSAGE;
    l_attr_name VARCHAR2 (256);
    l_ber_element DBMS_LDAP.ber_element;
    l_vals DBMS_LDAP.string_collection;
    BEGIN
    Get always error....Thanks

    'CN=username,OU=Admin ID's,OU=XXXXX,DC=XX,DC=XXX,DC=com';'CN=username,OU=Admin ID''s,OU=XXXXX,DC=XX,DC=XXX,DC=com';

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

Maybe you are looking for

  • My iphone thinks I'm using a headphone when I'm not, and no sound comes out of the phone. How can I fix this?

    It works fine in my car (when it's connected to bluetooth). But otherwise, the sound on the phone is dead. What can be wrong and how can I fix it?

  • Help with scrollRectToVisible

    Hey, I am having a problem using the scrollRectToVisible method on a JScrollPane. I have an application where the layout is like so: JSplitPane (splitPane) ->JPanel on the right side (rightPanel) (and ignoring the left for now) -->rightPanel contains

  • Apple TV - Purchasing and renting movies / videos in Austria

    I want to buy an Apple TV in the next days, but today I saw, that it is not possible in my region (Austria) to rent or buy movies in iTunes yet. So I'm afraid it would make no sense to buy the Apple TV. Does anybody know, until when movies will be av

  • Dell 30" / G5 question

    hey all, i'm awaiting new mac pro this week...in the mean time i have bought a dell3007wfphc and plugged it into my G5 dual 2.7/os10.4 with an ATI radeon 9650. i'm running it at 2560 x 1600. it looks pretty awesome, except in final cut pro. there are

  • Create Oracle Text stoplist in Java with PL/SQL

    Hi, I need help with this I do connection Oracle database with Java by using JDBC. I need create stoplist in my Oracle Text application that I create with PL/SQL procedure. I want to add stopwords to this stoplist directly in Java therefore I must cr