Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Getting parameters' values passed to a procedure/function

JackKMay 22 2013 — edited May 22 2013
Hi,
I need to find a way to get all the parameters' values passed to a procedure or function. I have:
procedure ac_params(p_proc varchar2) is
begin
  for p in (SELECT * FROM user_arguments
             WHERE package_name = get_prev_unit   -- get_prev_unit gets a procedure/function/package name of previous unit in the CALL_STACK
               AND object_name = p_proc
               AND in_out LIKE 'IN%'
               AND data_level = 0
               AND data_type IN ('CHAR','VARCHAR2','NUMBER','DATE','PL/SQL BOOLEAN')
             ORDER BY position
  ) loop
    dbms_output.put_line(p.argument_name, '<here I need value passed to "adres" function to it''s argument>');
  end loop;
end ac_params;

function adres(p_adr_id varchar2) return varchar2 is
begin
  ac_params('ADRES');
end adres;
Is it possible?

I use Oracle 11.2.0.3
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 19 2013
Added on May 22 2013
8 comments
3,252 views