Not a huge fan...
If the procedures are in a package, OWA_Util only returns the package name. Not the subprogram:
create or replace package pkg as
procedure master;
procedure slave;
end;
/
create or replace package body pkg as
procedure master as
begin
slave ();
end;
procedure slave as
l_owner varchar2(128);
l_name varchar2(128);
l_lineno number;
l_caller_t varchar2(128);
begin
owa_util.who_called_me(l_owner, l_name,l_lineno,l_caller_t);
dbms_output.put_line( ' owner =' ||l_owner);
dbms_output.put_line( ' name =' ||l_name);
dbms_output.put_line( ' lineno =' ||l_lineno);
dbms_output.put_line( ' caller_t =' ||l_caller_t);
end;
end;
/
exec pkg.master;
owner =CHRIS
name =PKG.MASTER
lineno =4
caller_t =PACKAGE BODY
So this won't work if you're doing the good thing and using packages.
It's also a bit messy if you need to defer the commit when other procedures call it. You have to change the child procedure. But with a parameter or wrapper you don't.