How do I get the procedure name

Hi,
With help of our application we are updating one table (P_Balance) in this account status and date through some procedures.
in some situation only account status column get proper value, but date column having NULL value.
Now we decided to track this, through which procedure this date column get updated null value.
For this I decided to write one trigger for the table "P_BALANCE" through which procedure this update is happening.
How do I get the procedure name.

You could use DBMS_UTILITY.FORMAT_CALL_STACK and do it. Something like this.
SQL> create table track_call_stack
  2  (
  3     program_name varchar2(30),
  4     call_stack varchar2(4000)
  5  );
Table created.
SQL> create table t
  2  (
  3    no integer
  4  );
Table created.
SQL> create or replace trigger t_trig before insert on t for each row
  2  begin
  3    if :new.no is null then
  4       insert into track_call_stack
  5       (
  6          program_name,
  7          call_stack
  8       )
  9       values
10       (
11          'T_TRIG',
12          dbms_utility.format_call_stack
13       );
14    end if;
15  end;
16  /
Trigger created.
SQL> insert into t values (null);
1 row created.
SQL> select * from track_call_stack;
PROGRAM_NAME                   CALL_STACK
T_TRIG                         ----- PL/SQL Call Stack -----
                                 object      line  object
                                 handle    number  name
                               3a7ac0ea8         1  anonymous block
                               3a2bb9d78         3  ARBORU.T_TRIG
SQL> create or replace procedure p1
  2  as
  3  begin
  4      insert into t values (null);
  5  end;
  6  /
Procedure created.
SQL> create or replace procedure p2
  2  as
  3  begin
  4      insert into t values (1);
  5      p1;
  6  end;
  7  /
Procedure created.
SQL> exec p2;
PL/SQL procedure successfully completed.
SQL> select * from track_call_stack;
PROGRAM_NAME                   CALL_STACK
T_TRIG                         ----- PL/SQL Call Stack -----
                                 object      line  object
                                 handle    number  name
                               3a7ac0ea8         1  anonymous block
                               3a2bb9d78         3  ARBORU.T_TRIG
T_TRIG                         ----- PL/SQL Call Stack -----
                                 object      line  object
                                 handle    number  name
                               3a7ac0ea8         1  anonymous block
                               3a2bb9d78         3  ARBORU.T_TRIG
                               3a2b32a10         4  procedure ARBORU.P1
                               3a61db6a8         5  procedure ARBORU.P2
                               3a653c3a0         1  anonymous block

Similar Messages

  • How do I get the file names on a customized proof sheet?

    How do I get the file names on a customized proof sheet?

    Actually, I really don't know what you say.
    But when you see the properties of a file in Windows, you can see there are two file size. One is called "SIze" and the other one is called "Size on disk".
    Therefore, I would like to know the size on disk but not just the size.

  • How do I get the file name?

    I'm kind of new to javascript -- working with a colleague who has Adobe Acrobat Professional -- I've got an *old* version of Adobe Acrobat and most of the functions don't work -- but how do we get the file name -- we're trying to develop an application -- so if the user opens c:\something.pdf, we'd like to know the file name (something.pdf).
    If we get a fully qualified path, that's fine -- I think I can parse it.
    Thank you in advance.

    The 'paty' property of the 'doc' object has been available since version 3.01.
    Using the following in the JavaScript console when the Acobat JS API Refenece is open:
    this.path;
    returns:
    this.path;
    /C/Program Files/Adobe/Acrobat 8.0/Help/ENU/JS_api_reference.pdf

  • How do I get the directory name that a class is located in?

    How do I get the directory name that a class is located in? I have a class located under /com/dhcmc and I want to be able to retrieve the "/com/dhcmc" that the class is residing under so that I can then use this directoy name to build a relative path name for the other directories supporting the application such as the images directory etc i.e.
    |---com
    |   \---dhcmc       (my class resides here)
    |       +---images  (supporting app dirs under the class dir)
    |       +---config  (supporting app dirs under the class dir)

    You can try the methods.
    Class.getClassLoader()
    Class.getResourceAsStream()
    Class.getResource()
    You probably wont get the complete directory path, but you might
    be able to load the files relative to your classes directory.

  • How can I get the infoset name by giving the name of a program of a query?

    How can I get the infoset name by giving the name of a program of a SAP Query?
    Regards,
    Subho

    Use FM RSAQ_DECODE_REPORT_NAME.
    You can also use AQLQCAT table.

  • C Programming: How can we get the filesystem name for a given file-path?

    C Programming: How can we get the filesystem name for a given file-path?
    Say I have a filepath=/mnt1/file1
    Using some OS API like stat, can I get the Filesystem /mnt ?
    Thanks in advance,
    -V

    Enter the command up to the point of entering the file path and add a space, then drag the file into the terminal window. It will fill out the path.
    If you need to go further into the contents of the Application package, you can continue with /Contents...
    Another way is to start typing and then hit Tab to auto-complete. It will stop where it can't determine the next letter.
    So, type /App tab and it will fill in /Applications. Type a / and start with the name of the app, then tab and it should complete. Continue till you have the correct path.
    Spaces will be replaced with \<space>, so, App Store would end up as /Applications/App\ Store.app

  • How do I get the user name and password for the Apple Extreme Router to connect to a Slingbox

    How do I get the user name and password for the Apple Extreme Router to set up my Slingbox?  It will not accept the Apple Extreme Name and password.

    The AirPort Extreme does not have a User Name, but it does have a device name and device password, which you may have already tried.
    There is also a Wireless Network Name and Wireless Network Password for the AirPort Extreme, which might be what the Slingbox is looking for if you are trying to connect it to your wireless network.
    There are no other "user names" or "passwords" on the AirPort Extreme.
    You established the device name, device password, wireless network name and wireless network password when you originally configured the AirPort Extreme.
    If you cannot remember these, you will need to perform a Soft Rest to reset everything. Follow the instructions in this Apple support document:
    Resetting an AirPort Base Station or Time Capsule FAQ

  • How can I get the host name from Email address?

    hi
    When I using socket to develope an email-sending servlet,I don't know how to get the host name from emial address.can you help me,thanks

    Stripping off the user name will give you the domain of from field in the message. This is not the same as the host. Take a look at:
    http://www.stopspam.org/email/headers/headers.html
    Theres a pretty good discussion about email headers and how to use the information. You probably want to check the information here against the RFC.
    Sean

  • How can we get the table name...

    Hi All,
    How can we get the actual table name for an argument if its datatype is %ROWTYPE.
    For Ex :
    function ACCOUNT_UPDATE (account_no number,
    person person%rowtype,
    amounts dbms_describe.number_table,
    trans_date date)
    return accounts.balance%type;
    In the above function 'ACCOUNT_UPDATE', for argument person the datatype is 'person%rowtype'.
    Is there any way to get the name from Data Dictionary tables.
    I tried using All_Arguments and DBMS_DESCRIBE, I can able to get all the individual fields of %ROWTYPE by I could not able to know the exact table name thru the DD.
    my requirement is dynamically I need to declare a variable for the argument datatype.
    Your help is highly appreciated.
    Thanks

    hi vinay,
    this is the easiest way to find the tablename of a particular field.
    t.code:XD01.
    enter.
    select the kunnr field.
    press F1.
    the top of the screen u will get 'Technical setting icon.
    select that one.then u will get tablename,fieldname,parameter id also.
    if helps give the rewards.
    regards,
    akash.k

  • How can I get the path name and rename it?

    I Hope someone who knows more about automator than I can help me out here. What I'm trying to do is get the path file name, while also changing part of it. Here is my example:
    I can get the path name with this "Get Path" script I found http://automatorworld.com/archives/get-path/all-comments/
    It does half the job so I just need to tweak it but know how. When I get the path this is what I'll get: /Volumes/Public/Creative Services/Campaigns/2010/NCDDiv-32CDV Upgrade/NCDDIV-32Versions.xls
    I need to remove the beginning part"/volumes" to "file://///nhmanmkt01"
    This is so I can send the path from our sever where we keep our files to my windows friends so they can open it.
    Thanks for any help you can provide!

    ok, make the following workflow.
    1. get selected finder items.
    2. run shell script
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #ADD8E6;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    for f in "$@"
    do
    echo "$f"|sed 's%/Volumes%file://///nhmanmkt01%'
    done</pre>
    set the script to accept input as arguments
    3. copy to clipboard
    save it as a finder plugin.

  • How can I get the query name in webitem method ?

    Hello,
    I have defined a new web item but I can't retrieved parameter of my webitem in the RENDER method for instance. I have declared a parameter in the RSRRENDERATR table like this :
    REN_NAME : MY_WEBITEM
    ATR_NAME : MY_PARAM
    ATR TYP : TEXT
    CHR MAX LEN : 50
    How can I do this ? How can I get the MY_PARAM value in the RENDER method ?
    Thanks a lot
    GC.
    Edited by: CoGr on Feb 11, 2008 12:10 PM

    Hi ,
    data l_r_view type ref cl_rsr_www_view.
    data l_t_text_symbols type rrx1_t_txt_symbols.
    l_r_view =? n_r_data_provider.
    CALL METHOD L_R_VIEW->n_r_request->TEXT_ELEMENTS_GET
      IMPORTING
        E_T_TXT_ELEMENTS = l_t_text_symbols.
    l_t_text_symbols contains all DP information like Query technical name, or Report text last load etc.
    best regards,
    kai

  • How can I get the inbox name of exchange?

    I wanna get the letters from exchange server, the code i writed below:
    Session session1 = Session.getInstance(new Properties(), null);
    session1.setDebug(true);
    Store store = session1.getStore("pop3");
    store.connect(pop,-1,popuser,poppwd);
    Folder folder = store.getDefaultFolder();
    folder = folder.getFolder("INBOX");
    folder.open(Folder.READ_WRITE);
    the erro report displayed:
    "no such mailbox in this server"
    and i don't know how can i know the mailbox name in my exchange server? is it "INBOX"?
    any idea?
    thank you!

    You can use the following to get a list of the folders that are on the server. I don't know what rules Exchange uses when accessed through POP3 to name its inbox but you should be able to get a complete list this way.
    =======================================================================
    Folder rf = store.getDefaultFolder();
    if ((rf.getType() & Folder.HOLDS_FOLDERS) != 0)
    Folder[] f = rf.list("%");
    int count1 = 0;
    for (int i = 0; i < f.length; i++)
    System.out.println(f.getName);

  • How to i get the class name ? please help me

    hi friends
    i want to know how to get the class name from my java program
    public class sample
    public static void main(String args[])
    how to i get sample.
    please help me.
    thanks in advance                                                                                                                                                                                                                                                                                                                                                                                                                                           

    I can't recall which forum member gave the following solution, but it works
    in static contexts and it's copy-and-paste friendly -- you don't hard-code the
    name of the class, only a dummy class that you use to make this hack work:
    public class Foo {
        private static class Dummy{}
        public static void main(String[] args) {
            Class cls = Dummy.class.getEnclosingClass();
            String name = cls.getName();
            System.out.println(name);
    }

  • Junit : How can I get the method name (say testMyAddress) that failed

    My code is below
              TestSuite masterSuite = new TestSuite(testClass);
              TestResult result = new TestResult();
              masterSuite.run(result);
                   Enumeration errors = result.errors();
                   while (errors.hasMoreElements())
                        TestFailure error = (TestFailure)errors.nextElement();
                        Test test = error.failedTest();
    /*will give me the class name but how can I get the method that threw the exception.
    I can get fName (that contains the method name) field to get the method,but being private I cannot hold of the field.
    Wondering if there is any easy way to get the method name that threw exception,without writing unneccessary code
                        Class c1 = test.getClass();
    thx
    m

    getting all methods is no good!
    My test class looks like this
    MyTestClass{
    testGoodData(){
    asserttrue(.....);
    testBadData(){
    asserttrue(.....);
    testNullData(){
    asserttrue(.....);
    someHelperMethod(){
    thx
    m

  • How can i get  the column name   for assigned constraint name  from  the  user_constraints   table?????

    Hi  ,
    I  have a table  so  many constraints   on so  many  columns. I  need to  know  which column has which  constraint plsql dev?? like below...
    table_name -------- col_name ------ constraint_name_of_that_col
        xxxxxx              xxxxxxx              xxxxxxxxxxxxxxxx
    or else please let me know  how can i  get the  corresponding col_name for a particular  constraint name???

    My be this can give you a help:
    [code]
    SELECT *
    FROM   ALL_CONSTRAINTS
    WHERE  R_CONSTRAINT_NAME IN (SELECT CONSTRAINT_NAME
                                                               FROM   ALL_CONSTRAINTS
                                                               WHERE  TABLE_NAME = 'TABLE_NAME'
    [/code]

Maybe you are looking for