0
votes

Im getting this error:

ORA-06550:line 1, column 25:PLS-00302: component PA_EXCEPTION_LIST_UPDATE must be declared: line1, column 7:PL/SQL: Statement ignored.

I can't figure out what i did wrong.

   PROCEDURE Pa_exception_list_update (p_ceid collection_entities.ceid%TYPE,
                                            p_idusr users.idusr%TYPE
                                            )
        IS 
        v_idusr users.idusr%TYPE;
        v_ceid collection_entities.ceid%TYPE;

        BEGIN
          INSERT INTO pa_exception_list(pa_exception_list_id,
                                        ceid,
                                        creation_date,
                                        created_by)
          VALUES(pa_exception_list_seq.nextval, p_ceid, SYSDATE, p_idusr);
        END Pa_exception_list_update;
4
Usually the script starts with "create or replace procedure...". - Rene
This procedure is part of a large package which starts with this statement. - h0neybaLL
So maybe the problem is elsewhere in that package? Maybe you are calling the procedure before it has been declared? - Rene
+1, as the only 2 places where PA_EXCEPTION_LIST_UPDATE is mentioned are at CREATE and END procedure. Therefore, it must be somewhere else. - Littlefoot
Also check out the answer to this question: stackoverflow.com/questions/42722228/… - alexs

4 Answers

2
votes

It looks like you are calling the procedure before it has been declared.

Look at this example. Procedure A calls procedure B. But B is unknown at that moment.

create or replace package test is
begin
end test;

create or replace package body test is
procedure a
is
begin 
  b;
end;


procedure b is
begin
  -- do someting
end;

end test;

Solution. Change the order of the procedures within the package or place the procedure in the package specification.

create or replace package test is
begin
  procedure b;
end test;

create or replace package body test is
procedure a
is
begin 
  b;
end;


procedure b is
begin
  -- do someting
end;

end test;
0
votes

According error message the error appears at line 1.

In case this is a stand-alone procedure you must write like create or replace procedure Pa_exception_list_update ...

In case this is part of a PL/SQL Package then you must write like

CREATE OR REPLACE PACKAGE BODY <package name> AS

procedure Pa_exception_list_update ...
0
votes

I think you are missing something when you declare.

p_ceid IN collection_entities.ceid%TYPE, p_idusr IN users.idusr%TYPE

0
votes

I also faced the same problem. After checking I found that, the procedure i was calling did not exist in the package!. Later changed the procedure name and it worked.