How to write procedure with this requirement

Hi
I've a skeleton procedure.
In that i need to include the following conditions:
If an exception is returned (sqlca.sqlcode!=0),
the program rolls back the transaction and aborts, logging the Oracle error message.
In case of normal return, the program commits the transactions and exits normally.......................
So could you please give me the idea how to include these 2 conditions..
procedure processFile(
        fname IN VARCHAR2,
        flRcvTmst IN DATE) IS
V_PROC_STS VARCHAR2:='I';
BEGIN
  INSERT INTO TMO_QPP_FL_T (QPP_FL_ID,FL_NM,FL_RCV_TMST,PROC_STS,YR_COVERED)
                    VALUES     (Q_QPP_FL_ID.NEXTVAL,fname,flRcvTmst,V_PROC_STS,NULL)
END;    Thanks,

SQLERRM just gives the error message right? We dont get nothing else. But as a developer i prefer to have the entire error stack, that can help me a lot to debug.
SQL> create or replace procedure p1
  2  as
  3     lVal number;
  4  begin
  5     select 1 into lVal from dual where 1 = 2;
  6  end;
  7  /
Procedure created.
SQL> create or replace procedure p2
  2  as
  3  begin
  4     p1;
  5  end;
  6  /
Procedure created.
SQL> create or replace procedure p3
  2  as
  3  begin
  4     p2;
  5  end;
  6  /
Procedure created.
SQL> set autotrace on
SQL> set autotrace off
SQL> set serveroutput on
SQL> begin
  2     p3;
  3  exception
  4     when others then
  5             dbms_output.put_line(sqlerrm);
  6  end;
  7  /
ORA-01403: no data found
PL/SQL procedure successfully completed.This gives me nothing. How do i know where have i hit "no data found"
SQL> begin
  2     p3;
  3  exception
  4     when others then
  5             dbms_output.put_line(DBMS_UTILITY.FORMAT_ERROR_BACKTRACE);
  6  end;
  7  /
ORA-06512: at "SYSADM.P1", line 5
ORA-06512: at "SYSADM.P2", line 4
ORA-06512:
at "SYSADM.P3", line 4
ORA-06512: at line 2
PL/SQL procedure successfully completed.Here i get a complete error stack telling me at which line the error has been raised at each level. Makes my debugging more easier.
Thanks,
Karthick.

Similar Messages

  • TS1436 I received this message twice on 2 new & separate attempts to burn a playlist to a NEW cd:  "The attempt to burn a disc failed.  The burn failed because of a medium write error."  What is a "medium write error" and how can I deal with this?

    I received this message twice on 2 new & separate attempts to burn a playlist to a NEW cd:  "The attempt to burn a disc failed.  The burn failed because of a medium write error."  What is a "medium write error" and how can I deal with this?

    Hello Pat,
    The following article provides troublehsooting steps and information that can help get iTunes burning discs again.
    Can't burn a CD in iTunes for Windows
    http://support.apple.com/kb/TS1436
    Cheers,
    Allen

  • How to write strings with an underline on the TOP-OF-PAGE of ALV

    How to write strings with an underline on the TOP-OF-PAGE of ALV

    if u r using classes and methods it can be done
    but if u r using normal fms and then u have to use HTML_TOP_OF_PAGE but the drawback for this it cannot be printed when the report is printed .

  • Has anyone experienced problems with Mackeeper? I did not complete downloading this software. Yet, occasionally when on the internet, I will have the MacKeeper multi-colored circle replace my pointer. How do you deal with this?

    Has anyone experienced problems with Mackeeper? I did not complete downloading this software. Yet, occasionally when on the internet, I will have the MacKeeper multi-colored circle replace my pointer. How do you deal with this?

    Welcome to Apple Support Communities
    Don't download MacKeeper. Users complain about this app and it damages OS X. Also, Mac OS X knows how to take care of itself, so you don't need any other cleaning application that may damage OS X. See > https://discussions.apple.com/docs/DOC-3691

  • HT1420 I purchased new computers twice within the same year because they old were damaged in a storm.  However, I can't deauthorize/reauthorize the new computers.  How do I deal with this situation.

    I purchased new computers twice within the same year because they were damaged in a storm.  However, I can't deauthorize/reauthorize the new computers because it has been less than a year.  How do I deal with this situation?

    BrianBlaze wrote:
    I have 3 Computers at home, I am studying computer sciences and am constantly rerformatting my computers, installing windows and linux over and over again.... EVERYTIME I reformat I have to authorize the same computer and so it takes up one of my 5 authorized computers... Anyways after deauthorizing all my computers in september I was not aware I couldn't do it for another year (why does APPLE assume these stupid tactics prevent piracy). Anywysw I need to reach apple and have them make it so I can do it again. I had a similar problem with Playstation and when I called them they fixed it for me... even windows (which you can only have one serial per computer) made it easy because all I had to do was call them and they fixed it for me. Now I need APPLE to do the same and this is the only place I could see to actually say what is going on... I can't believe I have to do this with my iPhone... I wanted an mp3 player and a phone together and if I can't put new songs until September 20, 2012 I am going to freak out!
    HELP!
    Brian
    Try this link: http://www.howtogeek.com/howto/23974/beginner-deauthorize-all-computers-associat ed-with-your-itunes-account/

  • It says that "there was a problem connecting to the server". What's wrong with this, and how can I deal with this problem?

    I just got my new iPad Mini2, and when I choose "sign in with your apple ID", it says that "there was a problem connecting to the server". What's wrong with this, and how can I deal with this problem?

    1. Turn router off for 30 seconds and on again
    2. Settings>General>Reset>Reset Network Settings

  • HT5621 I have moved permanently from the US to live in the UK. when I try to download a UK app I am often told that I cannot use a UK Apple sstore, only a US store. I need to access various UK stores how can I deal with this?

    I have moved permanently from the US to live in the UK. when I try to download a UK app I am often told that I cannot use a UK Apple sstore, only a US store. I need to access various UK stores how can I deal with this?

    Try here
    http://support.apple.com/kb/HT1311
    when you have UK Cards etc best to change as well

  • How can I sync with this library without erasing my data?

    The iPod "Sayira's iPod" is synced with another iTunes library. Do you want to erase this iPod and sync with this iTunes library? An iPod can be synced with only one iTunes library at a time. Erasing and syncing replaces the contents of this iPod with the contents of this iTunes library.
    So, okay, here's my story: My laptop caught a virus, so i sent it to this guy who fixes computers, now that my laptop is fixed, everything is deleted from it. I didn't really mind this too much, but anyway I redownloaded iTunes to my new hardrive and then it said the following (posted above). My question is, how can i sync with this new library without erasing any data from my apps (such as games, photos, videos, music)? I REALLY don't want to lose this data!

    - Transffer iTunes purchases to the computer by:
    iTunes Store: Transferring purchases from your iOS device or iPod to a computer
    - Transfer other music by using a third-party program like one of those discussed here.
    Copy music
    - Connect the iPod to the computer and make a backup by right clicking on the iPod under Devices in iTunes and select Back Up
    - Restore the IPod from that backup
    Note that the backup that iTunes makes does no include symec media like apps and music.

  • How to go ahead with this report

    Dear Pals...
            Greetings....Kindly help me with this report....The purpose of my report is to display the account payable based on the payment terms inside the purchase orders before invoice verification and the account receivable based on sales order.....
    How to go ahead with this report ....The output should be on monthly wise.....
    may i know is there any standard report from SAP for this or may i know the mandatory fields and tables for this....
    Thanks for your time

    Go back to the user if you are unfamialr with the fields you need in your report.   Have this user show you the fields on a screen.   Use the F1 Key to get the technical information.  Once you have this information, begin coding.

  • HT3702 I just purchased several items for I-pad and the billing statement says billed to store credit.  What does this mean ?  I have a $20  i-tunes card how do I pay with this ?

    I just purchased several items for I-pad and the billing statement says billed to store credit.  What does this mean ?  I have a $20  i-tunes card how do I pay with this ?  I'm an old **** and don't talk to anyone who plays with I-pad etc.

    That means it should have used your iTunes card credit = store Credit.
    You can check here...
    View Purchase History...
    Sign Into your Account... Click on your account name... Click on Account.... Purchase History
    http://support.apple.com/kb/HT2727
    If you have any problems...
    Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

  • How to write ! , . with virtual keyboard?

    how to write ! , . with virtual keyboard?
    Thanks!

    What do you mean by virtual keyboard?I guess he means the "Robot" class, and the answer is
    to "press" shift, then press the 1 key, then release
    the 1 key then release shift.Are you basing that on the steering the mouse question?
    I guess.

  • Javascript error on - Help - Learn how to use Numbers with this online...

    I am trying to find out more about Numbers. I am using iTunes 9.1.1 on a Vista PC. I get a Javascript error in Internet Explorer 8 when I try to access:
    Help - Learn how to use Numbers with this online resource.
    http://help.apple.com/numbers/1.0
    The link redirects to the following page:
    http://help.apple.com/iwork/safari/interface/#tan727163ed
    The above page is blank except for boxes for Keynote Help, Pages Help, Numbers help, and a blank input field that seems to do nothing. Here is the Javascript error message from Internet Explorer 8:
    Webpage error details
    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30729)
    Timestamp: Tue, 1 Jun 2010 20:55:54 UTC
    Message: This command is not supported.
    Line: 1
    Char: 41589
    Code: 0
    URI: http://help.apple.com/iwork/safari/interface/javascript.js

    Link also does not work for me in WIN 7 with IE8. However, it does work in Chrome in WIN 7. It also works in Safari on my G4. Suggest you try Chrome or it may work in another browser like FireFox or Safari in Vista.

  • How to write  procedure for creating a row

    Hi
    How to write procedure for creating a new row in data table when button clicked.

    Hi
    I am able to create a row.by writing a method in Application module class.
    method for creating a row in fin_years view:
    public void createRow() {
    Row newRow = (Row)getFinYearsView1().createRow();
    newRow.setNewRowState(Row.STATUS_INITIALIZED);
    //get instance of the above created view object
    ViewObjectImpl vo=getFinYearsView1();
    // to insert row at the end of the table
    vo.insertRowAtRangeIndex(vo.getRangeSize()-1, (Row)newRow);
    System.out.println(getFinYearsView1().getCurrentRowIndex());
    but it doest not create row at last in the data table.Instead it insert row in middle..

  • How to write query for this in TopLink ?

    I am doing a simple search in jsp where the search will the based on the choices chosen by user.
    I had given 3 check boxes for those choices.
    The problem is, query will be based on the choice or choices chosed by the user.
    How to write query for this in TopLink ?
    Thanks in Advance..
    Jayaganesh

    Try below solution, it is NOT best solution but might work:
    Declare @Questions TABLE (QuestionID INT, QuestionText Varchar(100))
    INSERT INTO @Questions
    VALUES (1, 'Comment'), (2, 'Score')
    DECLARE @Answers TABLE (authkey INT, QuestionID INT, questiontext VARCHAR(100), answertext VARCHAR(100))
    INSERT INTO @Answers
    VALUES (101, 1, 'comment', 'hi!!'), (101, 2, 'score', '4'), (102, 1, 'comment', 'excellent'), (102, 2, 'score', '5'), (103, 2, 'score', '6'), (104, 2, 'score', '8')
    SELECT
    A.AuthKey
    ,Q.QuestionID
    ,Q.QuestionText
    ,A.AnswerText
    FROM
    @Questions Q
    INNER JOIN @Answers A ON Q.QuestionID = A.QuestionID
    UNION
    SELECT
    A.AuthKey
    ,Q.QuestionID
    ,Q.QuestionText
    ,Null
    FROM
    @Questions Q
    CROSS JOIN @Answers A
    WHERE
    NOT EXISTS (SELECT 1 FROM @Answers SubQry WHERE SubQry.AuthKey = A.AuthKey AND SubQry.QuestionID = Q.QuestionID)
    Output
    AuthKey | QuestionID
    | QuestionText
    | AnswerText
    101 | 1 | Comment | hi!!
    101 | 2 | Score | 4
    102 | 1 | Comment | excellent
    102 | 2 | Score | 5
    103 | 1 | Comment | NULL
    103 | 2 | Score | 6
    104 | 1 | Comment | NULL
    104 | 2 | Score | 8
    Best Wishes, Arbi; Please vote if you find this posting was helpful or Mark it as answered.

  • My iphone was disable and it say connect to itunes. but when i connect it to my computer, my computer cant detact my device. how do i deal with this situation?

    hi, i have a problems. my iphone is being disable after my daughter play with it and been entering all the wrong code. so my iphone is now disable and it say connect to itunes. i already plug my iphone to my computer, how ever my computer could not detact my devic. and because of that i cant connect it to my itunes. how do i deal with this problems?

    iOS: Device not recognized in iTunes for Windows

Maybe you are looking for

  • How to create an applet within an application?

    Hi. Im trying to make an applet work within a main application but I cant get it to work because then I have 2 of these and it gives me an error: public class java_tester extends JFrame implements MouseListener //MAIN APPLICATION public class MusicPl

  • Connect by prior in Oracle 11g

    I am upgrading an application from 9i to 11g and I've been told that the connect by prior sql is broken. While I am waiting for the example and the error message, is 11g pickier about looping than 9i was? Can someone point me to some documentation on

  • BI BEANS without Oracle OLAP

    Is it possible to use (even with a reduced functionality) BI beans without OLAP (i.e. just using sql, more or less how Discoverer does) ? Tia Tullio

  • Changing LogManager configuration in WebStart

    I have an application that I intend to deploy with WebStart. The application uses the java.util.logging features to display log messages to a Swing control on the screen. I've implemented a class that extends Handler to receive the messages logged to

  • I've searched to no avail

    Ok so, I have a DataGrid that is binded to some XML data. The last column in the grid renders a Link button which when clicked should change the view state to the selected index's XML property I have set that corresponds to a view state i have alread