PL/SQL: Error "PLS-00306: wrong number or types of arguments in call to" triggered for table of numbers

The reason why you are facing the PLS-00306 error is incompatibility of NUMLIST collection type, defined in the package specification and NUMLIST collection type defined in the anonymous PL/SQL block. Even though definitions of those two collection types are the same, they are not compatible. In your anonymous PL/SQL block you have to declare and then pass into the GETSERVICES_API procedure a variable of PKGCOMSUPPORT_SERVICE.NUMLIST data type.

create or replace package PKG as
  type t_numlist is table of number index by varchar2(50);
  procedure SomeProc(p_var in pkg.t_numlist);
end;
/

create or replace package body PKG as
  procedure someproc(p_var in pkg.t_numlist) is
  begin
    null;
  end;
end;
/

declare
  type t_numlist is table of number index by varchar2(50);
  l_var t_numlist;
begin
  pkg.someproc(l_var);
end;

ORA-06550: line 5, column 3:
PLS-00306: wrong number or types of arguments in call to 'SOMEPROC'

declare
  --type t_numlist is table of number index by varchar2(50);
  l_var pkg.t_numlist;
begin
  pkg.someproc(l_var);
end;

anonymous block completed

Tags:

Oracle

Plsql