title: Error PLS-00323 in package body, procedure name is correct
body: <p>the follow code is getting an error PLS-00323 in two places.  The first place is on the procedure spt_save_casedetail and it says "subprogram or cursor 'spt_save_casedetail' is declared in the package specification and must be defined in the package body".  Here is the code (warning its long):</p>
  
  <pre><code>create or replace
  package body ct_cu_act_um1_pg
  is
  
  procedure spt_save_casedetail (
  p_primarymemberplanid_in      in casedetail.primarymemberplanid%type,
  p_servicetypecd_in            in casedetail.servicetypecd%type,
  p_notifydt_in                 in casedetail.notifydt%type,
  p_assignedentityid_in         in casedetail.assignedentityid%type,
  p_startdt_in                  in casedetail.startdt%type,
  p_enddt_in                    in casedetail.enddt%type,
  p_caretypemnemonic_in         in casedetail.caretypemnemonic%type,
  p_casestatusmnemonic_in       in casedetail.casestatusmnemonic%type,
  p_odsorderingproviderid_in    in casedetail.odsorderingproviderid%type,
  p_sourcemnemonic_in           in casedetail.sourcemnemonic%type,
  p_caseresolutionmnemonic_in   in casedetail.caseresolutionmnemonic%type,
  p_odsservicingproviderid_in   in casedetail.odsservicingproviderid%type,
  p_serviceitemmnemonic_in      in casedetail.serviceitemmnemonic%type,
  p_providerinnetworkind_in     in casedetail.providerinnetworkind%type,
  p_detailtxt_in                in casedetail.detailtxt%type,
  p_odsfacilityvendorid_in      in casedetail.odsfacilityvendorid%type,
  p_servicelocationcd_in        in casedetail.servicelocationcd%type,
  p_facilityinnetworkind_in     in casedetail.facilityinnetworkind%type,
  p_audit_user_in               in casedetail.updatedby%type,
  p_return_cur_out              out sys_refcursor,
  p_err_code_out                out number,
  p_err_mesg_out                out varchar2)
  is
  v_casedetailid                casedetail.casedetailid%type;
  begin
  select casedetail_seq.nextval into v_casedetailid from dual;
  if v_casedetailid is null
    then
      insert into casedetail
        (casedetailid,
         primarymemberplanid,
         servicetypecd,
         notifydt,
         assignedentityid,
         startdt,
         enddt,
         caretypemnemonic,
         casestatusmnemonic,
         odsorderingproviderid,
         sourcemnemonic,
         caseresolutionmnemonic,
         odsservicingproviderid,
         serviceitemmnemonic,
         providerinnetworkind,
         detailtxt,
         odsfacilityvendorid,
         servicelocationcd,
         facilityinnetworkind)
      values
        (casedetail_seq.nextval,
         p_primarymemberplanid_in,
         p_servicetypecd_in,
         p_notifydt_in,
         p_assignedentityid_in,
         p_startdt_in,
         p_enddt_in,
         p_caretypemnemonic_in,
         p_casestatusmnemonic_in,
         p_odsorderingproviderid_in,
         p_sourcemnemonic_in,
         p_caseresolutionmnemonic_in,
         p_odsservicingproviderid_in,
         p_serviceitemmnemonic_in,
         p_providerinnetworkind_in,
         p_detailtxt_in,
         p_odsfacilityvendorid_in,
         p_servicelocationcd_in,
         p_facilityinnetworkind_in);
  
      open p_return_cur_out for
        select casedetail_seq.currval
        from dual;
    else
      update casedetail
        set primarymemberplanid = p_primarymemberplanid_in,
            servicetypecd = p_servicetypecd_in,
            notifydt = p_notifydt_in,
            assignedentityid = p_assignedentityid_in,
            startdt = p_startdt_in,
            enddt = p_enddt_in,
            caretypemnemonic = p_caretypemnemonic_in,
            casestatusmnemonic = p_casestatusmnemonic_in,
            odsorderingproviderid = p_odsorderingproviderid_in,
            sourcemnemonic = p_sourcemnemonic_in,
            caseresolutionmnemonic = p_caseresolutionmnemonic_in,
            odsservicingproviderid = p_odsservicingproviderid_in,
            serviceitemmnemonic = p_serviceitemmnemonic_in,
            providerinnetworkind = p_providerinnetworkind_in,
            detailtxt = p_detailtxt_in,
            odsfacilityvendorid = p_odsfacilityvendorid_in,
            servicelocationcd = p_servicelocationcd_in,
            facilityinnetworkind = p_facilityinnetworkind_in,
            updateddt = systimestamp,
            updatedby = p_audit_user_in
        where casedetailid = v_casedetailid;
  
      open p_return_cur_out for
        select casedetail_seq.currval
        from dual;
  end if;
  
  p_err_code_out := 0;
  exception
  when others then
    p_err_code_out := -1;
    p_err_mesg_out := 'error in ct_cu_act_um1_pg.spt_save_casedetail =&gt;'|| sqlerrm;
  end spt_save_casedetail;
  </code></pre>
  
  <p>Here is the package spec:</p>
  
  <pre><code>create or replace
  package ct_cu_act_um1_pg
  is
  
    procedure spt_save_casedetail (
  p_primarymemberplanid_in      in casedetail.primarymemberplanid%type,
  p_servicetypecd_in            in casedetail.servicetypecd%type,
  p_notifydt_in                 in casedetail.notifydt%type,
  p_assignedentityid_in         in casedetail.assignedentityid%type,
  p_startdt_in                  in casedetail.startdt%type,
  p_enddt_in                    in casedetail.enddt%type,
  p_caretypemnemonic_in         in casedetail.caretypemnemonic%type,
  p_casestatusmnemonic_in       in casedetail.casestatusmnemonic%type,
  p_odsorderingproviderid_in    in casedetail.odsorderingproviderid%type,
  p_sourcemnemonic_in           in casedetail.sourcemnemonic%type,
  p_caseresolutionmnemonic_in   in casedetail.caseresolutionmnemonic%type,
  p_odsservicingproviderid_in   in casedetail.odsservicingproviderid%type,
  p_serviceitemmnemonic_in      in casedetail.serviceitemmnemonic%type,
  p_providerinnetworkind_in     in casedetail.providerinnetworkind%type,
  p_detailtxt_in                in casedetail.detailtxt%type,
  p_odsfacilityvendorid_in      in casedetail.odsfacilityvendorid%type,
  p_servicelocationcd_in        in casedetail.servicelocationcd%type,
  p_facilityinnetworkind_in     in casedetail.facilityinnetworkind%type,
  p_return_cur_out              out sys_refcursor,
  p_err_code_out                out number,
  p_err_mesg_out                out varchar2
    );
  </code></pre>
  
  <p>The second place im getting the same error is where I defined v_casedetailid.  Ive checked to make sure everything is spelt correctly, but maybe I'm missing something because I've been looking at it for awhile.  Any help is appreciated, thanks.</p>