10g: re-raise the exception modifies the call stack

Hello! I'm "Oracle PL/SQL Reference" and trying to re-raise the exception:
begin
  dbms_output.put_line('line a');
  raise no_data_found;
exception
  when others then
      dbms_output.put_line('line b');
      raise;
end;
Oracle reports exception was thrown on line 7, not 3. Apparently "re-raise" modifies the call stack, making it of no use: I can throw a new exception with the same success. It is not re - raise a conventional sense of the term. The question is, is there a possibility to actually STILL raise exception, without changing the call stack?

A reference to 'Lines followed by Steven Feuerstein'

Impact of multiple reminders

Often, an exception occurs at the bottom of the execution stack. If you want this exception to propagate all the way to the PL/SQL block outside, it should be re-relief within each exception handler in the stack of blocks. Listing 3 shows an example of such an event.

Code Listing 3: Re-raising exceptions to the outermost block on the stack

CREATE OR REPLACE PROCEDURE proc1 IS
BEGIN
   DBMS_OUTPUT.put_line ('running proc1');
   RAISE NO_DATA_FOUND;
EXCEPTION
   WHEN OTHERS THEN
      DBMS_OUTPUT.put_line (
         'Error stack in block where raised:');
      my_putline (
         DBMS_UTILITY.format_error_backtrace);
      RAISE;
END;
/
CREATE OR REPLACE PROCEDURE proc2
IS
   l_str VARCHAR2 (30) := 'calling proc1';
BEGIN
   DBMS_OUTPUT.put_line (l_str);
   proc1;
END;
/
CREATE OR REPLACE PROCEDURE proc3 IS
BEGIN
   DBMS_OUTPUT.put_line ('calling proc2');
   proc2;
EXCEPTION
   WHEN OTHERS
   THEN
      DBMS_OUTPUT.put_line ('Error stack at top level:');
      my_putline (DBMS_UTILITY.format_error_backtrace);
      bt.show_info (DBMS_UTILITY.format_error_backtrace);
END;
/

When I run the code in Listing 3, I see the following result:

SQL> exec proc3
calling proc2
calling proc1
running proc1
Error stack in block where raised:
ORA-06512: at "SCOTT.PROC1", line 4
Error stack at top level:
ORA-06512: at "SCOTT.PROC1", line 11
ORA-06512: at "SCOTT.PROC2", line 6
ORA-06512: at "SCOTT.PROC3", line 4

Program owner = SCOTT
Program name = PROC1
Line number = 11

When I call the function backtrace in the program at the lowest level, it correctly identifies the line 4 of proc1 as the line where the error is mentioned. I then re - raise the same exception using the statement of RECOVERY. When the exception propagates to the outermost block, I call the backtrace function once again and this time it shows that the error was raised at line 11 of proc1.

This behavior, we can conclude that DBMS_UTILITY. FORMAT_ERROR_BACKTRACE watch the running back to the last trace LIFT during its session. As soon as you issue a STIMULUS to a specific exception or re - raise the current exception, you restart the cell which produces the backtrace function. This means that if you want to take advantage of the DBMS_UTILITY. FORMAT_ERROR_BACKTRACE, take one of the following two approaches:

Call the function backtrace in the section of the exception to the block in which the error was raised. This way you have (and can connect) that line number critical, even if the exception is re-relief more further upward in the stack.
Avoid exception handlers in your carpet intermediate programs and call the function backtrace in the section except for the outermost program in your stack.

Full article available here

http://www.Oracle.com/technology/oramag/Oracle/05-Mar/o25plsql.html

Tags: Database

Similar Questions

  • False ASCII control characters values in Variables and the call stack in CVI2013?

    Hello

    I think that there is an error in the window "Variables and stack calls" If you want to find your variables in ASCII format.

    (0-31) control characters are not displayed correctly. They are offset by 2.

    For example:

    Character in decimal format is 10 (LF), but when you're chancing to ASCII it is projection \012.

    The same with 13 (CR). This character is \015 as ASCII.

    I think that it was no problem in CVI2012.

    Best regards

    Gunther

    I do not use CVI2013 Yes so I can't answer about this specific product, but the code you are showing are the octal equivalent of the specified decimal value: it is possible that control characters (or generally the natually those non-printable) is replaced by their octal equivalent to the chain.

  • Power Manager 2.37 crash when connecting (with the call stack)

    Recently, I installed Power Manager 2.37 on my T400 Thinkoad (Vista x 64) and am now seeing the crash following each time someone connects to Windows. Anyone else seeing this?

    System.Windows.Markup.XamlParseException was not handled
    Message ="cannot be cast to type 'System.Windows.Controls.StackPanel' object type 'System.Windows.Controls.Image.  Error the object 'System.Windows.Controls.StackPanel' in the file of markup "PWMUIAux; component/sliderpanel.xaml. »
    Source = "PresentationFramework".
    LineNumber = 0
    LinePosition = 0
    NameContext = "Header".
    UidContext = "MenuItem_3."
    StackTrace:
    at System.Windows.Markup.XamlParseException.ThrowException (String message, Exception innerException, Int32 lineNumber, linePosition Int32, Uri baseUri, XamlObjectIds currentXamlObjectIds, XamlObjectIds contextXamlObjectIds, Type objectType)
    to System.Windows.Markup.XamlParseException.ThrowException (ParserContext parserContext, lineNumber, linePosition, String message, Exception innerException Int32 Int32)
    at System.Windows.Markup.BamlRecordReader.ThrowExceptionWithLine (String message, Exception innerException)
    at System.Windows.Markup.BamlRecordReader.CreateInstanceFromType (Type type, typeId Int16, Boolean throwOnFail)
    at System.Windows.Markup.BamlRecordReader.GetElementAndFlags (BamlElementStartRecord bamlElementStartRecord, object, element, ReaderFlags & flags, Type, delayCreatedType, Int16 & delayCreatedTypeId)
    at System.Windows.Markup.BamlRecordReader.BaseReadElementStartRecord (BamlElementStartRecord bamlElementRecord)
    at System.Windows.Markup.BamlRecordReader.ReadElementStartRecord (BamlElementStartRecord bamlElementRecord)
    at System.Windows.Markup.BamlRecordReader.ReadRecord (BamlRecord bamlRecord)
    at System.Windows.Markup.BamlRecordReader.Read (Boolean singleRecord)
    at System.Windows.Markup.TreeBuilderBamlTranslator.ParseFragment)
    at System.Windows.Markup.TreeBuilder.Parse)
    at System.Windows.Markup.XamlReader.LoadBaml (Stream stream, ParserContext parserContext, parent of the object, Boolean closeStream)
    at System.Windows.Application.LoadComponent (object component, Uri resourceLocator)
    at PWMUIAux.TaskTrayMenu.InitializeComponent)
    to PWMUIAux.TaskTrayMenu... ctor()
    to PWMUIAux.MainWindow... ctor()
    at PWMUIAux.App.GetMainWindowHandle)
    at PWMUIAux.App.App_Startup (Object sender, StartupEventArgs e)
    to System.Windows.Application.OnStartup (StartupEventArgs e)
    to System.Windows.Application. <.ctor>b__0 (Object unused)
    at System.Windows.Threading.ExceptionWrapper.InternalRealCall (delegate callback, object args, Boolean isSingleParameter)
    at System.Windows.Threading.ExceptionWrapper.TryCatchWhen (Object source, delegate callback, object args, Boolean isSingleParameter, delegate catchHandler)
    at System.Windows.Threading.Dispatcher.WrappedInvoke (delegate callback, object args, Boolean isSingleParameter, delegate catchHandler)
    at System.Windows.Threading.DispatcherOperation.InvokeImpl)
    at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext (Object state)
    at System.Threading.ExecutionContext.runTryCode (object userData)
    System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup (code TryCode, CleanupCode backoutCode, object userData)
    at System.Threading.ExecutionContext.RunInternal (ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Threading.ExecutionContext.Run (ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Windows.Threading.DispatcherOperation.Invoke)
    at System.Windows.Threading.Dispatcher.ProcessQueue)
    at System.Windows.Threading.Dispatcher.WndProcHook (IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean & handled)
    to the millisecond. Win32.HwndWrapper.WndProc (IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean & handled)
    to the millisecond. Win32.HwndSubclass.DispatcherCallbackOperation (Object o)
    at System.Windows.Threading.ExceptionWrapper.InternalRealCall (delegate callback, object args, Boolean isSingleParameter)
    at System.Windows.Threading.ExceptionWrapper.TryCatchWhen (Object source, delegate callback, object args, Boolean isSingleParameter, delegate catchHandler)
    at System.Windows.Threading.Dispatcher.WrappedInvoke (delegate callback, object args, Boolean isSingleParameter, delegate catchHandler)
    to System.Windows.Threading.Dispatcher.InvokeImpl (priority DispatcherPriority, TimeSpan timeout, Delegate method, object args, Boolean isSingleParameter)
    at System.Windows.Threading.Dispatcher.Invoke (DispatcherPriority priority, method Delegate, Object arg)
    to the millisecond. Win32.HwndSubclass.SubclassWndProc (IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
    to the millisecond. Win32.UnsafeNativeMethods.DispatchMessage (MSG & msg)
    at System.Windows.Threading.Dispatcher.PushFrameImpl (DispatcherFrame frame)
    at System.Windows.Threading.Dispatcher.PushFrame (DispatcherFrame frame)
    at System.Windows.Threading.Dispatcher.Run)
    at System.Windows.Application.RunDispatcher(Object ignore)
    System.Windows.Application.RunInternal (window)
    System.Windows.Application.Run (window)
    at System.Windows.Application.Run)
    at PWMUIAux.App.Main)
    InnerException: System.InvalidCastException
    Message = "Cannot be cast to an object of type 'System.Windows.Controls.StackPanel' to type 'System.Windows.Controls.Image'."
    Source = "PWMUIAux".
    StackTrace:
    at PWMUIAux.SliderPanel.System.Windows.Markup.IComponentConnector.Connect (Int32 connectionId, object target)
    at System.Windows.Markup.BamlRecordReader.ReadConnectionId (BamlConnectionIdRecord bamlConnectionIdRecord)
    at System.Windows.Markup.BamlRecordReader.ReadRecord (BamlRecord bamlRecord)
    InnerException:

    There are newer versions of Power Manager available, the last one I think is 2.50. You should try to install a new, to see if that solved the problem.

  • Can how I download a call stack when there is an error?

    VI "call the string" print only one stack of calls from the VI which contains the string of appeal VI.

    Since I use a Subvi, which manages errors and the chain of appeal VI cannot be located in the VI where an error occurs,

    VI "call the string" isn't useful in a logging error VI.

    In java, you have Throwable.printStackTrace () that prints the call stack.

    Is there an equivalent of Throwable.printStackTrace () LabVIEW?

    CITA wrote:

    nathand / / there is no call chain in the cluster of error.

    rolfk / / the problem is that the first element of the array is in the depths of the call chain.
    Suppose I put "call the string" VI in D.vi
    E.VI called D.vi (D<>
    And the tree of VI is 'A '.<><><><>
    If a VI was an error in A.i, VI "call the string" would return only 'D.vi' and "E.vi" in the returned array.
    I want to see "A.i", 'B.vi', 'C.vi', 'D.vi' and "E.vi" in the table of call chain.

    But it is impossible to place "call the string" VI at the lowest level (A.i in this case) for a large canvas of the screws.
    A.I could be included at the next to last level later in time.

    Well, you may need to rethink what you expect here. You want to have the same as structured exceptions management, but also that there is indeed patents on several of these implementations, LabVIEW works a little different since it is data flow. Basically what I do in LabVIEW, is to have a VI that is placed where an error occurs. It checks the error condition and if violations adds the actual call stack (called string - the number of levels the error checker uses) more than the additional error information in the error cluster. Basically, this is what in other languages is the throw statement. All consecutive screws have this cluster of error usually wired through and do nothing (except the close function that tries to close all resources in any case) if there is an error in. Then at the end of your transaction, usually in a higher level VI there is an error handler, which records the information, shows a dialog box or all that logical for an error in this regard. If your stack is determined at the point where the error occurs, but you don't have much code every time, you can write a Subvi, you can drop into the diagram to manage this for you and add the cluster of error information.

    The cluster of error is not exactly the most ideal way to manage the structured exception handling, but it is a mechanism that has been introduced a long time ago and worked pretty well, or of less not pretty bad a lot of people were worried trying to find a more universal (and always easy to handle) MECHANISM.

  • HELP blackBerry Smartphones: intercepted the calls missed on the fritz, no Exception: java.lang.NullPointerException

    Hi all - I tried to figure this thing out of these last hours... and I'm about to smash my phone against the wall (of course, I've gotten nowhere with it).

    Here's the problem: about 2 days ago I noticed that my phone is no longer maintaining missing calls in the call log (the last "missed calls" are dated 3/22). Instead, what happens is that I'm going to take notice of the number of calls on my home screen, but then when I go on my call log, I see that calls that were actually sent or received and not those missed. Not long after that notice, the following message appeared: Eception Exception: java.lang.NullPointerException. Also, until this happened, I used to get a pop up after each missed call that would tell me that I missed a call and give me the possibility to display or dismiss the alert. Is no longer comes after he missed a call, so I think it's the functionality of java which was damaged.

    So I tried to pull the battery and all that jazz, but nothing has changed. At one point, pulling the battery caused the phone to give me some other errors of java and back to put on the original page of the home screen, but after removing the battery once more, everything is returned to my original problem. Only happened once. Today I finally decided to search online for a quick fix and I was thinking about something. I tried pulling the battery and remove the sim/memory card, then tried to re-sync, then try clearing the addressbook of device and re-sync, tried to backup everything, then checked more OS updates (mine is already the most recent)... and now I'm stuck. The only thing I have not actually tried is wiping and nine with a reload of the OS. I would really like to avoid this

    Also, for some reason after that the software update RIM has checked my phone for its version of the OS, my ringtone settings reset itself. Not sure if this is related to the java problem or just a chance to complication/bad?

    Does anyone have an idea what could have happened to my phone? It is literally out of nowhere, so you can imagine my frustration...

    Any suggestions on how to fix it?

    Yes, you will need to remove the current operating system, and reload later.

    The software seems to be corrupted.

    Make sure you have the latest version of the software for your device and your carrier installed on the computer.

    It's the device, software, not the Office Manager.

    Once done, go to drive C: Program Files: common files: Research in Motion: App Loader and double-click on loader.exe.

    Once the Welcome screen appears, plug the battery in and click Next. When you see the PIN number appear after maybe a few minutes press next.

    Once he arrives at the device application part, select only things you need, uncheck all other languages, etc..

    On the last page before you click on finish, you see an option "EITHER", click here and make sure that both check boxes are fixed.

    Do not press the save option and select Finish

    This will fix the problem.

  • Raise the Exception in loop For

    Currently my loop code is
    FOR i IN 2..vt_records.count
            LOOP
              EXIT WHEN INSTR(vt_records(i), v_delimiter,2) = 0;
                csv_to_array(vt_records(i), vt_record, v_delimiter);
    
              --| Workaround for the case when the last column is null
              IF vt_record.count < v_expected_csv_cols
                THEN
                  FOR i IN 1..(v_expected_csv_cols - vt_record.COUNT)
                    LOOP
                      --RAISE_APPLICATION_ERROR(-20000, 'vt_Record.COUNT=' || vt_record.count || ' - loopcount=' || (v_expected_csv_cols-vt_record.COUNT));
                      vt_record(vt_record.COUNT+1) := NULL;
                    END LOOP;
              END IF;
    
             begin
             --{
               INSERT INTO cit_interface_correlation (
               massupdateid,
               primarymatkey_hr,
               geokey_hr,
               depmatkey_hr,
               promokey_hr,
               statcalcday,
               usercorfactor,
               inst_user,
               inst_session,
               inst_date
               ) 
               VALUES
               (
               seq_cit_interface_correlation.nextval,
               vt_record(1),
               TRIM(vt_record(2)),
               TRIM(vt_record(3)),
               vt_record(4),
               TO_DATE(TRIM(vt_record(5)),'DD.MM.YYYY'),
               TRIM(vt_record(6)),
               v('APP_USER'),
               v('APP_SESSION'),
               sysdate
               );
             --}
             end;
          END LOOP;
    {code]
    What I need to do is raise an exception if vt_record(5) is greater than sysdate.
    If any line has a date greater than sysdate then the loop should fail and not carry on.
    
    Cheers
    
    Gus                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                

    Like this?

    for i in 2..vt_records.count
    loop
         exit when instr(vt_records(i), v_delimiter,2) = 0;
    
         csv_to_array(vt_records(i), vt_record, v_delimiter);
    
         if vt_record.count < v_expected_csv_cols
         then
              for i in 1..(v_expected_csv_cols - vt_record.count)
              loop
                   vt_record(vt_record.count+1) := null;
              end loop;
         end if;
    
         if vt_record(5) > sysdate then
              raise_application_error(-20001, 'vt_record(5) is greater than sysdate');
         else
              insert into cit_interface_correlation
              (
                   massupdateid,
                   primarymatkey_hr,
                   geokey_hr,
                   depmatkey_hr,
                   promokey_hr,
                   statcalcday,
                   usercorfactor,
                   inst_user,
                   inst_session,
                   inst_date
              )
              values
              (
                   seq_cit_interface_correlation.nextval,
                   vt_record(1),
                   trim(vt_record(2)),
                   trim(vt_record(3)),
                   vt_record(4),
                   to_date(trim(vt_record(5)),'dd.mm.yyyy'),
                   trim(vt_record(6)),
                   v('APP_USER'),
                   v('APP_SESSION'),
                   sysdate
              );
         end if;
    end loop;
    
  • raise the exception ORA-00942

    -How to raise an exception for 6550 or 942?  Here is the anonymous block that I am running in SQL Developer, who does not throw an exception:

    --(J'ajouterais que c'est un exemple d'autonomes; le tableau "image_masterr" n'existe pas)

    -I am running in 10.2.0.1

    DECLARE
    lcl_temp1 VARCHAR2 (10);
    v_error_code NUMBER;
    v_error_message VARCHAR2 (255);
    no_table EXCEPTION;
    no_table_942 EXCEPTION;
    PRAGMA EXCEPTION_INIT(no_table,-06550);
    PRAGMA EXCEPTION_INIT(no_table_942,-00942);
    BEGIN
    DECLARE
    lcl_temp VARCHAR2 (20);
    BEGIN
    v_error_code: = SQLCODE;
    v_error_message: = SQLERRM;
    SELECT count (1) IN the lcl_temp of image_masterr;
    v_error_code: = SQLCODE;
    v_error_message: = SQLERRM;
    DBMS_OUTPUT. Put_line ("there is no problem ' |") lcl_temp);
    EXCEPTION
    WHEN no_table OR no_table_942 THEN
    DBMS_OUTPUT. Put_line ('there is a problem');
    WHILE OTHERS THEN
    DBMS_OUTPUT. Put_line ('there is a problem');
    END;
    DBMS_OUTPUT. Put_line ("it's no problem :'|| v_error_code | v_error_message);
    END;

    We must distinguish between exceptions at compile time and exceptions at run time. You can only handle exceptions at the moment is running. So if you have a static SQL referencing the nonexistent table you will get the compile error (btw, ora-06550 said explicitly you - compile error). Now if you have a dynamic sql code in your block PL/SQL with reference to non-existent table, you won't get compile time error. Exception will be thrown when you run the dynamic sql code. In this case, you can catch the error "table or view does not exist" and manipulate appropriatry.

    SY.

  • Unplug the headphones of Walkman app silenced all functions of the phone except for incoming calls

    I found a bug that caused the alarm become silent. I am able to reproduce consistently and ahd a firend with a different Xperia V confirm.

    I use using a Sony build 4.1 version (. 490) with ADWLauncher (but my friend was also able to reproduce this with regular Sony Launcher, also on the 4.1 build)

    to reproduce:

    (1) check base case: all applications closed, adjust the volume to maximum using rocking of the volume on the side of the phone. to release the keys, you should hear a tone giving you the current volume

    It also means that the sound works

    (2) plug in headphones

    (3) open app Walkman and listen to a song

    (4) once the track has begun and you can hear in the headphones, unplug the earphones

    track must stop (correct behavior)

    5) press "Home" to return to the home screen

    (6) repeat step (1)... sound is now DISABLED, autour and shows volume knob slides it is not cut, but when I release the button it does not play the sound

    critical, it also cuts the alarm

    (so if you want that the game alarm for 2 minutes in the future before the departure the sequence above, when it fires it is silent after steps 1 through 6 have been made)

    some things that eliminate the effect once it arrives in this State buggy: If you receive a phone call, then he makes it sound and after the call, his resume (no matter what you did with the call - ignore, answer etc, all that is needed is for the phone to ring)

    also sometimes re - insert and remove the earphones also restores sound

    phone is fully updated from the Google store set to have the latest versinos of applications

    I tested this same sequence using other music apps (of rocket, Google Reader Play Music) and the phone has NOT lost his after step (4) and everythnig functioned normally.

    This bug seems to be isolated to the sony Walkman android app.

    I quite like the walkman for sony hopy app can look at this and fix it with an update of the application itself - as all other music apps I tested are causing not easy

    I do not know if this was presented in a recent version of Walkman or the 4.1 update... Maybe someone could test on a pre-version 4.1 phone to see if it still happens

    the recent firmware 9.1.A.1.140 seems to fix this problem. was not able to reproduce once I have updated.

    Thanks sony!

  • PLS-00306: wrong number or types of arguments in the call to 'UPDATE_ORDER_NUMBER_SEQUENCE '.

    Hi Please help me solve the error given by this procedure

    TEXT

    --------------------------------------------------------------------------------

    PROCEDURE UPDATE_ORDER_NUMBER_SEQUENCE)

    sequenceName IN VARCHAR2,

    Inc. in full)

    AS

    stmt VARCHAR2 (2000);

    number of l_n;

    Start

    BEGIN

    -change the increment to Inc.

    stmt: = 'ALTER SEQUENCE | sequenceName | ' INCREMENT ' |

    Inc.;

    TEXT

    --------------------------------------------------------------------------------

    dbms_output.put_line (' execution "' | stmt |) '''');

    EXECUTE IMMEDIATE stmt;

    -Read the following value

    stmt: = "SELECT" | sequenceName | '. DOUBLE NEXTVAL ';

    dbms_output.put_line (' execution "' | stmt |) '''');

    EXECUTE IMMEDIATE stmt in l_n;

    -change the increment of 1

    stmt: = 'ALTER SEQUENCE | sequenceName | ' INCREMENT OF 1';

    dbms_output.put_line (' execution "' | stmt |) '''');

    EXECUTE IMMEDIATE stmt;

    EXCEPTION

    TEXT

    --------------------------------------------------------------------------------

    While some OTHER THEN dbms_output.put_line (SQLERRM);

    END;

    end UPDATE_ORDER_NUMBER_SEQUENCE;

    following error please help me solve this error

    ERROR on line 1:

    ORA-06550: line 1, column 7:

    PLS-00306: wrong number or types of arguments in the call to

    'UPDATE_ORDER_NUMBER_SEQUENCE '.

    ORA-06550: line 1, column 7:

    PL/SQL: Statement ignored

    Well, the error message is pretty self-explanatory, isn't it? What you use

    to call this procedure actually raises this error.

    However, you have not posted the SQL that actually calls this procedure

    so please post that.

    That said, the whole procedure seems wrong - what business requirement is there for

    edit sequences? This isn't normally how they should be used.

  • PLS-00306: wrong number or types of arguments in the call

    Hello

    I get this error when I run the script to test below:
    < font color = "red" >
    PLS-00306: wrong number or types of arguments in the call to 'SPLIT_AMOUNT '.
    < / make >

    This script is to test that the package below that I wrote. It seems to use the same 9 parameters of the same type:

    TEST SCRIPT+ *.
    declare
      TYPE g_table_number  IS TABLE OF  NUMBER INDEX BY BINARY_INTEGER;
      p_customer_trx_ids        g_table_number;
      p_total_amount_to_apply   NUMBER := 10;
      p_total_amount_to_adjust  NUMBER;  
       --
      p_result                  NUMBER;
      p_message                 VARCHAR2(200);
      p_payment_schedule_ids    g_table_number;
      p_terms_sequence_numbers  g_table_number;
      p_apply_amounts           g_table_number;
      p_adjust_amounts          g_table_number;
    begin
      p_customer_trx_ids(1)        := 23613;
      p_customer_trx_ids(2)        := 23614;
     hirap.split_amount
      (
       p_customer_trx_ids        
      ,p_total_amount_to_apply   
      ,p_total_amount_to_adjust 
      ,p_result                  
      ,p_message                
      ,p_payment_schedule_ids   
      ,p_terms_sequence_numbers 
      ,p_apply_amounts          
      ,p_adjust_amounts         
      );
      for i IN p_customer_trx_ids.FIRST .. p_customer_trx_ids.LAST LOOP
        dbms_output.put_line( 
        i || ' p_customer_trx_id: ' || p_customer_trx_ids (i) || ' p_apply_amounts(i): ' ||
         p_apply_amounts(i) || ' p_adjust_amounts: ' || p_adjust_amounts(i) );
      END LOOP;
    end;
    /
    PACKAGE+ *.
    CREATE OR REPLACE PACKAGE hirap
    AS
    TYPE g_table_number  IS TABLE OF  NUMBER INDEX BY BINARY_INTEGER;
    
    PROCEDURE split_amount
      (
       p_customer_trx_ids        IN   g_table_number
      ,p_total_amount_to_apply   IN   NUMBER
      ,p_total_amount_to_adjust  IN   NUMBER
       --
      ,p_result                  OUT  NUMBER
      ,p_message                 OUT  VARCHAR2
      ,p_payment_schedule_ids    OUT  g_table_number
      ,p_terms_sequence_numbers  OUT  g_table_number
      ,p_apply_amounts           OUT  g_table_number
      ,p_adjust_amounts          OUT  g_table_number
      );
    
    END hirap;
    /
    
    CREATE OR REPLACE PACKAGE BODY hirap
    AS
    PROCEDURE split_amount
      (
       p_customer_trx_ids        IN   g_table_number
      ,p_total_amount_to_apply   IN   NUMBER
      ,p_total_amount_to_adjust  IN   NUMBER
       --
      ,p_result                  OUT  NUMBER
      ,p_message                 OUT  VARCHAR2
      ,p_payment_schedule_ids    OUT  g_table_number
      ,p_terms_sequence_numbers  OUT  g_table_number
      ,p_apply_amounts           OUT  g_table_number
      ,p_adjust_amounts          OUT  g_table_number
      )
    IS
      l_total_pay_sched_amount   NUMBER;
      l_customer_trx_id          NUMBER;
      l_amount_due_remainings    g_table_number;
    
      CURSOR pay is
            SELECT p.payment_schedule_id
                  ,p.terms_sequence_number
                  ,p.amount_due_remaining
            FROM   ar_payment_schedules_all p
            WHERE  customer_trx_id = l_customer_trx_id
            AND    p.terms_sequence_number =
                  (SELECT  min(p1.terms_sequence_number)
                   FROM    ar_payment_schedules_all p1
                   WHERE   p1.customer_trx_id = l_customer_trx_id
                   AND     p1.status          = 'OP'
                  );
    
    
    BEGIN
      p_result := 0; -- means OK
    
      -- read the payment schedule for each transaction and store values and totals:
      FOR i IN p_customer_trx_ids.FIRST .. p_customer_trx_ids.LAST LOOP
        l_customer_trx_id          := p_customer_trx_ids(i);
        l_total_pay_sched_amount   := 0;
          BEGIN
            OPEN  pay;
            FETCH pay INTO
                   p_payment_schedule_ids(i)
                  ,p_terms_sequence_numbers(i)
                  ,l_amount_due_remainings(i);
    
            CLOSE pay;
            l_total_pay_sched_amount   := l_total_pay_sched_amount + l_amount_due_remainings(i);
         
          EXCEPTION WHEN NO_DATA_FOUND THEN
            fnd_file.put_line(fnd_file.LOG, 'Transaction does not exist for CUSTOMER_TRX_ID: ' ||
                              p_customer_trx_ids(i) );
            RAISE;
          WHEN OTHERS THEN
              RAISE;
          END;
      END LOOP;
    
      -- save values for each payment schedule based on total
      FOR i IN p_customer_trx_ids.FIRST .. p_customer_trx_ids.LAST LOOP
        p_apply_amounts(i)         := round
                                        (
                                         l_amount_due_remainings(i) / l_total_pay_sched_amount
                                         * (p_total_amount_to_apply + p_total_amount_to_adjust)
                                         , 2
                                        );
        p_adjust_amounts(i)        := l_amount_due_remainings(i) - p_apply_amounts(i);
    
      END LOOP;
    
    EXCEPTION
      WHEN OTHERS THEN
        p_result := 2;
        p_message := 'SQLCODE= ' || SQLCODE || ', SQLERRM = ' || SQLERRM;
        fnd_file.put_line( fnd_file.LOG , TO_CHAR(SYSDATE, 'HH24:MI:SS') || ' - ' || p_message );
    END;
    --
    END hirap;
    /
    Does anyone know what is the problem?

    Thank you
    Steve

    Hi, Steve,.

    The package contains a data type called g_table_number and also a procedure called split_amount.
    That does not create another data type (different), also called g_table_number, outside of the package, any more that it prevents you from creating another procedure, also called split_amount, also. When you want to reference the data type or the procedure outside the package from the package, then you must prefix the name with the name of the package. You do this correctly when you reference the name of the procedure of your anonymous block:

     hirap.split_amount
      (
       p_customer_trx_ids     ...
    

    Now you must do the same when you reference the data type:

    declare
      p_customer_trx_ids        hirap.g_table_number;
      p_total_amount_to_apply   NUMBER := 10;
      p_total_amount_to_adjust  NUMBER;
       --
      p_result                  NUMBER;
      p_message                 VARCHAR2(200);
      p_payment_schedule_ids    hirap.g_table_number;
      p_terms_sequence_numbers  hirap.g_table_number;
      p_apply_amounts           hirap.g_table_number;
      p_adjust_amounts          hirap.g_table_number;
    begin ...
    

    If you do not create another type of (different) data outside of the package, it will be the same as the type of data inside the packaging, even if the name is the same and they are defined in the same way. The package expects the arguments of the type hirap.g_table_number, so you have to give the hirap.g_table_number of type arguments.

  • How to raise the exec.vi system administrator on Win7

    Hi guys

    I build an installer to our application and want to inject the driver OR not required for the program interface with our material in Win7... I'll use pnputil.exe to add and install our signed driver... But pnputil will work only if cmd prompt is amounted to administrator (being administrator is not enough by using cmd)... This is easily done in the environment of win7 (ctrl + shift + enter to the search bar after typing cmd) but y at - it a command that works on win7 I could call to enable this rise happen without user interaction? I wanted very much as for create a post installer that calls the installer of NOR raise the program, and then call the function pnputil since the exec.vi system, which leaves the system with the installed driver and a plug ' gaming experience to the user.

    Any good suggestions?

    Best regards

    Jacob Navne

    LV8.6.1 - win7 / XP

    If you use the option "run command line after installing" Installer, I think that it runs the command line with the same rights that the installer had, that rights should be admin high you're looking for.

    It worked for me in the past to win7.

  • management of the script errors when using the step of the call placed

    I have a script which is activated by a trigger of jtapi. At some point places the caller on hold, makes a call using step Place call, plays a prompt and then terminates the call.

    If the trigger (first contact) hangs up when the phone for the second contact rings, when the second contact answers the phone plays the default script or "Sorry we currently live the problems of the system."

    Here's what I did (without success) to try to get around it: changed the default script for the application (do not know why it does not work.) This logic is invoked in a subflow, maybe that's the problem?), placed a Terminate step for the second contact in case of square step call, put in a bunch of steps On Error Goto who attend a stage finish to the second contact.

    Brandon, until the original caller is replaced, an 'exception' will be thrown.

    To make up for it, to the step "On Exception GoTo" > choose the ContactInactiveException > choose the label you want the call to go into the script > clears the exception (on no exception) and then play your .wav file (sorry, the band hung up.. blah, blah) > and then terminate.

    who should git'r done.

    Pleae rate useful positions.

  • How to trigger the call by program key

    Hi guys,.

    How to raise the event to programmatically call key?

    Scenario:

    > Device is now enabled with the phone call screen. The user presses the number for example say "123".

    Now, is there a way by which we need programmatically call the event to press button 'call '.

    > If the problem mentioned above is not possible, is there a way to recover the value of number or current telephone channel that is currently active in the screen of the phone (in the example below the "123")

    PhoneArguments phArg = new PhoneArguments (PhoneArguments.ARG_CALL, "123");

    Invoke.InvokeApplication (Invoke.APP_TYPE_PHONE, phArg)

    Thank you

    You can use getForegroundProcessId() in the ApplicationManager class to determine the current foreground process.

    Click the star on the left to give glory to a post.

  • Procedural error the call for VARRAY String as parameter

    Hello

    I get the error during the call to the procedure:

    Here are the steps:

    CREATE or REPLACE TYPE PART_TYPE IS an OBJECT (part_number VARCHAR2 (120));

    CREATE OR REPLACE TYPE PART_REC_TBL IS VARRAY (1000) of PART_TYPE ;

    I have a stored procedure in the package:

    create or replace package TEST_PART_SEARCH_PKG AUTHID CURRENT_USER AS

    PROCEDURE ADD_TO_PART)

    p_part_number_list IN PART_REC_TBL ,

    p_ord_number IN Varchar2,

    x_error_flag OUT Varchar2,

    x_error_msg OUT Varchar2

    );

    end TEST_PART_SEARCH_PKG;

    When I call the Package:

    DECLARE

    v_flag varchar2 (100);

    v_err_msg varchar2 (100);

    BEGIN

    TEST_PART_SEARCH_PKG. ADD_TO_PART ('09031518,0897701 ',' 003146M 56', v_flag, v_err_msg);

    END;

    error report-

    ORA-06550: line 5, column 6:

    PLS-00306: wrong number or types of arguments in the call to 'ADD_TO_PART '.

    ORA-06550: line 5, column 6:

    PL/SQL: Statement ignored

    It would be helpful if someone can help me on this

    Obviously. There are no part_number, so turn in your package and get rid of it:

    FOR indx1 IN 1.p_lot_number_list. COUNTY

    LOOP

    BEGIN

    SELECT

    inventory_item_id

    IN

    var_item_id

    Of

    test_part_number_v

    WHERE

    PART_NUMBER = p_part_number_list (indx1);

    EXCEPTION

    WHILE OTHERS THEN

    var_item_id: = NULL;

    END;

    SY.

  • dbAdapter fails during the call to procedure package oracle object type in the parameter out

    JDeveloper 1.1.1.6

    Oracle 11g

    Existing package procedure is defined with the table of objects in input parameters and.

    Package myPackage

    procedure processRecon (numero_projet VARCHAR2,

    INST_ID select NUMBER,

    recon_type VARCHAR2,

    gis_design_stock GMPVT. GMPVT_GIS_DESIGN_STOCK_T,

    stock_uop GMPVT. GMPVT_STOCK_CODES_T,

    x_status OUT VARCHAR2,

    x_escalation OUT VARCHAR2,

    x_recon_error ON GMPVT. GMPVT_GIS_RECON_ERR_T) IS

    GMPVT. GMPVT_GIS_RECON_ERR_T is an array of GMPVT objects. GMPVT_GIS_RECON_ERR, who has 12 fields including the new I added it.

    I have added a new field to the GMPVT object. GMPVT_GIS_DESIGN_STOCK, where GMPVT. GMPVT_GIS_DESIGN_STOCK_T is a table of GMPVT. GMPVT_GIS_DESIGN_STOCK, no problems encountered during the test.

    Next, I added a new field for the object of type GMPVT. GMPVT_GIS_RECON_ERR, the following error below occurs when the DBAdapter is called

    < Summary > Exception occurred when the link was invoked. Exception occurred during invocation of the JCA binding: "JCA binding run operation 'processStockRecon' failed due to the reference: Interaction processing error." Error in the processing of applications from running. GMP_SOA_RECON_PKG. Interaction of the PROCESSRECON API. An error occurred during the processing of the interaction to invoke APPS. GMP_SOA_RECON_PKG. PROCESSRECON API. Cause: java.lang.ArrayIndexOutOfBoundsException: 12 check to make sure that the XML file containing the data of the parameter matches the parameter definition in the XSD. This exception is considered non reproducible, probably due to an error of modeling. ". The called JCA adapter threw an exception of resource. Please review the error message above carefully to determine a resolution. < / Summary >

    I confirmed that the XSD for the stored procedure has in fact change, which has been generated by JDeveloper as I refreshed the database adapter.

    The statement "Cause: java.lang.ArrayIndexOutOfBoundsException: 12" I can't that assume somehow SOA has 12 parameters but the 12 setting was not saved.

    Any thoughts on what I might be missing. I can provide more information if necessary.

    Hello

    This problem has been resolved. Not deployed SOA composite and then deployed to the server of the SOA. For some reason, SOA has been either you see does not changes in the file XSD (cached?) or the XSD was not get updated.

    Thank you

Maybe you are looking for

  • RoboForm does not work on version 4.o1

    I updated Firefox to version 4 and RoboForm does not work anymore. When filling out the forms is clicked nothing happens. When I open the connection menu and click a site to connect nothing happens. It still works fine using IE so I doubt that there

  • HP Officejet 6700: HP Officejet 6700 Premium all in one network problems

    Printer = printer HP e-all-in-one Officejet 6700 PremiumModel = H711nNumber of product = CN538AFirmware version = MPM5CN1450ARLocation = IrelandPrinted pages total: 152Scanned pages: 58 Other details available on request... I've had this printer for

  • Why to acquire her VI % 27s does not record correct samples % 2Fch

    Hi all Not an important issue right now, but interested if anyone knows why. LV2011 using full development and work with the base acquire its VI.  Its very strange, but I put the sampling to tell 48000 Hz and samples/ch 96000 frequency assuming I'd g

  • The computer hangs when you access network resources

    I have this problem with a couple of computers at work.  Here's the question: Computer does not display the network icon in the system tray.  When you try to access everything which concerns internet, nothing works.  IE Page not found errors, etc.  W

  • E3000 Max Throughput for internet and USB NAS

    I ran some tests to see what I can do to speed to the interenet and disk NAS. I have a NIC card (1394) and the max connection I get East of 400 MB/s. The card is supposed to be the card 10/100/1000 and E3000 is the same thing... so why can't connect