Home » SQL & PL/SQL » SQL & PL/SQL » package error
package error [message #652085] Wed, 01 June 2016 05:22 Go to next message
narang_me12
Messages: 1
Registered: May 2009
Location: CHANDIGARH
Junior Member
i have create a package but when i compile package body
then it show err pls-00337 too many application
pls help

CREATE OR REPLACE PACKAGE HR_HERO
  IS
--
-- To modify this template, edit file PKGSPEC.TXT in TEMPLATE
-- directory of SQL Navigator
--
-- Purpose: Briefly explain the functionality of the package
--
-- MODIFICATION HISTORY
-- Person      Date    Comments
-- ---------   ------  ------------------------------------------
   -- Enter package declarations as shown below

--   variable_name   datatype;
    FUNCTION EmpID2Code(p_EmpID number) RETURN NUMBER;
    FUNCTION EmpID2Name(p_EmpID number) RETURN varchar;
    FUNCTION EmpID2JDate(p_EmpID number) RETURN Date;

    FUNCTION EmpCode2ID(p_Code number) RETURN NUMBER;
    FUNCTION EmpCode2Name(p_Code number) RETURN varchar;
    FUNCTION CadreID2Name(p_Cadre number) RETURN varchar;
    FUNCTION SubCadreID2Name(p_SubCadre number) RETURN varchar;
    FUNCTION DeptID2Name(p_DeptID number) RETURN varchar;
    FUNCTION DeptID2Code(p_DeptID number) RETURN varchar;
    FUNCTION CCNID2SName(p_CCNID number) RETURN varchar;
    FUNCTION SName2CCNID(p_SName varchar2) RETURN number;
    FUNCTION EmpID2BankAC(p_EmpID number) RETURN varchar;
    FUNCTION DesigID2Name(p_DesgID number) RETURN varchar;
    FUNCTION Org2CompanyCode(p_OrgID number) RETURN number;
    FUNCTION OrgID2Name(p_OrgID number) RETURN varchar;
    FUNCTION EmpID2EDQual(p_EmpID number) RETURN varchar2;
    FUNCTION QualID2Name(p_QualID number) RETURN varchar;

    Function GetLastSalry(p_empid number,
                          p_stmon number,
                          p_emon number,
                          p_saltype char)   --  SR - Rate, SE - Earned
            return number;

    PROCEDURE Fill_Attendance(p_OrgCode number,
                              p_Date date);
    PROCEDURE Fill_ISO_Attn(p_OrgCode number,
                              p_FDate date,
                              p_TDate date,
                              p_EmpID number);

    PROCEDURE Check_Attendance(p_OrgCode number,
                              p_Date date);
    PROCEDURE Check_Pre_Salary(p_OrgCode number,
                               p_Month number,
                               p_cursor OUT SYS_REFCURSOR);

    PROCEDURE Fill_LTA_ANN(p_PInstance_ID NUMBER);
    PROCEDURE Fill_LTA_PRO(p_PInstance_ID NUMBER);

    PROCEDURE Fill_Incr_ANN(p_PInstance_ID NUMBER);
    PROCEDURE Fill_Incr_MinWg(p_PInstance_ID NUMBER);

    Procedure FillIncr_Hist(p_mon number,
                        p_divid number,
                        p_deptid number,
                        p_empid number,
                        p_empcode number,
                        p_emptype char);
    Function GetLastCat(p_empid number,
                    p_stdate number,
                    p_edate number,
                    p_saltype char)   --  SR - Rate, SE - Earned
            return number;
    FUNCTION GETLWWDAYS(p_stdate number,
                    p_edate NUMBER,
                    p_jdate date,
                    p_cdate date,
                    p_Empid NUMBER)
            return number;

    FUNCTION GetEarnEL( p_Year number,
                    p_stmon number,
                    p_emon number,
                    p_Empid NUMBER,
                    p_Jdate DATE,
                    p_cdate date,
                    p_Ldate DATE,
                    p_EmpType CHAR,
                    p_IgnELDays char)
            return number;
    FUNCTION GetEarnCL( p_Year number,
                    p_stmon number,
                    p_emon number,
                    p_Empid NUMBER,
                    p_Jdate DATE,
                    p_Ldate DATE,
                    p_EmpType CHAR)
            return number;

    FUNCTION GetEarnSL(p_Year number,
                    p_stmon number,
                    p_emon number,
                    p_Empid NUMBER,
                    p_Jdate DATE,
                    p_Ldate DATE,
                    p_EmpType CHAR)
            return number;
FUNCTION GetESIFlag(p_date date,
                    p_Empid number)
            return char;
FUNCTION GetEnjLeave(p_Year number,
                     p_stmon number,
                     p_emon number,
                     p_Empid number,
                     p_LeaveType char)
            return number;
Procedure FillLWW(p_PInstance_ID  NUMBER);
Procedure FillYR_FF(p_PInstance_ID  NUMBER);

    PROCEDURE Fill_Arrear(v_Org in  number,
                          v_FMon in number,
                          v_IncrType in char,
                          v_Dept in number,
                          v_EmpID in number,
                          v_retval out integer,
                          V_retmsg out nvarchar2);

Procedure FillBONUS(p_PInstance_ID  NUMBER);

FUNCTION GETBONAMT(p_Empid number,
                   p_Basic number,
                   p_erbasic number,
                   p_smon number,
                   p_MonthDays number,
                   p_SalaryDays number,
                   p_EmpType char,
                   p_jdate date,
                   p_catcode number)
            return number;


END; -- Package spec



[mod-edit: contents of attachment added to message body with code tags by bb]



[Updated on: Wed, 01 June 2016 23:44] by Moderator

Report message to a moderator

Re: package error [message #652086 is a reply to message #652085] Wed, 01 June 2016 05:49 Go to previous messageGo to next message
Littlefoot
Messages: 21683
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
"Too many application"?

As far as I can tell, PLS-00337 is something different than that:
Oracle

PLS-00337: "string" matches too many object table aliases

Cause: You have an ambiguous reference to an object-table alias; there are at least two object-table aliases in the same scope.

Action: Remove all but one of the references or change the alias names of the remaining.
Re: package error [message #652089 is a reply to message #652085] Wed, 01 June 2016 06:24 Go to previous messageGo to next message
Michel Cadot
Messages: 67920
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

You must post your Oracle version, with 4 decimals.
You also have to copy and paste a SQL*Plus session showing the error and post the COMPLETE code.
Before, Please read How to use [code] tags and make your code easier to read.

Re: package error [message #652109 is a reply to message #652085] Wed, 01 June 2016 23:47 Go to previous messageGo to next message
Barbara Boehmer
Messages: 8922
Registered: November 2002
Location: California, USA
Senior Member
It compiles for me, as shown below. Can you post a copy and paste of an attempted compilation by you, complete with the error message?

SCOTT@orcl_12.1.0.2.0> CREATE OR REPLACE PACKAGE HR_HERO
  2    IS
  3  --
  4  -- To modify this template, edit file PKGSPEC.TXT in TEMPLATE
  5  -- directory of SQL Navigator
  6  --
  7  -- Purpose: Briefly explain the functionality of the package
  8  --
  9  -- MODIFICATION HISTORY
 10  -- Person	    Date    Comments
 11  -- ---------   ------  ------------------------------------------
 12  	-- Enter package declarations as shown below
 13  
 14  --   variable_name   datatype;
 15  	 FUNCTION EmpID2Code(p_EmpID number) RETURN NUMBER;
 16  	 FUNCTION EmpID2Name(p_EmpID number) RETURN varchar;
 17  	 FUNCTION EmpID2JDate(p_EmpID number) RETURN Date;
 18  
 19  	 FUNCTION EmpCode2ID(p_Code number) RETURN NUMBER;
 20  	 FUNCTION EmpCode2Name(p_Code number) RETURN varchar;
 21  	 FUNCTION CadreID2Name(p_Cadre number) RETURN varchar;
 22  	 FUNCTION SubCadreID2Name(p_SubCadre number) RETURN varchar;
 23  	 FUNCTION DeptID2Name(p_DeptID number) RETURN varchar;
 24  	 FUNCTION DeptID2Code(p_DeptID number) RETURN varchar;
 25  	 FUNCTION CCNID2SName(p_CCNID number) RETURN varchar;
 26  	 FUNCTION SName2CCNID(p_SName varchar2) RETURN number;
 27  	 FUNCTION EmpID2BankAC(p_EmpID number) RETURN varchar;
 28  	 FUNCTION DesigID2Name(p_DesgID number) RETURN varchar;
 29  	 FUNCTION Org2CompanyCode(p_OrgID number) RETURN number;
 30  	 FUNCTION OrgID2Name(p_OrgID number) RETURN varchar;
 31  	 FUNCTION EmpID2EDQual(p_EmpID number) RETURN varchar2;
 32  	 FUNCTION QualID2Name(p_QualID number) RETURN varchar;
 33  
 34  	 Function GetLastSalry(p_empid number,
 35  			       p_stmon number,
 36  			       p_emon number,
 37  			       p_saltype char)	 --  SR - Rate, SE - Earned
 38  		 return number;
 39  
 40  	 PROCEDURE Fill_Attendance(p_OrgCode number,
 41  				   p_Date date);
 42  	 PROCEDURE Fill_ISO_Attn(p_OrgCode number,
 43  				   p_FDate date,
 44  				   p_TDate date,
 45  				   p_EmpID number);
 46  
 47  	 PROCEDURE Check_Attendance(p_OrgCode number,
 48  				   p_Date date);
 49  	 PROCEDURE Check_Pre_Salary(p_OrgCode number,
 50  				    p_Month number,
 51  				    p_cursor OUT SYS_REFCURSOR);
 52  
 53  	 PROCEDURE Fill_LTA_ANN(p_PInstance_ID NUMBER);
 54  	 PROCEDURE Fill_LTA_PRO(p_PInstance_ID NUMBER);
 55  
 56  	 PROCEDURE Fill_Incr_ANN(p_PInstance_ID NUMBER);
 57  	 PROCEDURE Fill_Incr_MinWg(p_PInstance_ID NUMBER);
 58  
 59  	 Procedure FillIncr_Hist(p_mon number,
 60  			     p_divid number,
 61  			     p_deptid number,
 62  			     p_empid number,
 63  			     p_empcode number,
 64  			     p_emptype char);
 65  	 Function GetLastCat(p_empid number,
 66  			 p_stdate number,
 67  			 p_edate number,
 68  			 p_saltype char)   --  SR - Rate, SE - Earned
 69  		 return number;
 70  	 FUNCTION GETLWWDAYS(p_stdate number,
 71  			 p_edate NUMBER,
 72  			 p_jdate date,
 73  			 p_cdate date,
 74  			 p_Empid NUMBER)
 75  		 return number;
 76  
 77  	 FUNCTION GetEarnEL( p_Year number,
 78  			 p_stmon number,
 79  			 p_emon number,
 80  			 p_Empid NUMBER,
 81  			 p_Jdate DATE,
 82  			 p_cdate date,
 83  			 p_Ldate DATE,
 84  			 p_EmpType CHAR,
 85  			 p_IgnELDays char)
 86  		 return number;
 87  	 FUNCTION GetEarnCL( p_Year number,
 88  			 p_stmon number,
 89  			 p_emon number,
 90  			 p_Empid NUMBER,
 91  			 p_Jdate DATE,
 92  			 p_Ldate DATE,
 93  			 p_EmpType CHAR)
 94  		 return number;
 95  
 96  	 FUNCTION GetEarnSL(p_Year number,
 97  			 p_stmon number,
 98  			 p_emon number,
 99  			 p_Empid NUMBER,
100  			 p_Jdate DATE,
101  			 p_Ldate DATE,
102  			 p_EmpType CHAR)
103  		 return number;
104  FUNCTION GetESIFlag(p_date date,
105  			 p_Empid number)
106  		 return char;
107  FUNCTION GetEnjLeave(p_Year number,
108  			  p_stmon number,
109  			  p_emon number,
110  			  p_Empid number,
111  			  p_LeaveType char)
112  		 return number;
113  Procedure FillLWW(p_PInstance_ID  NUMBER);
114  Procedure FillYR_FF(p_PInstance_ID  NUMBER);
115  
116  	 PROCEDURE Fill_Arrear(v_Org in  number,
117  			       v_FMon in number,
118  			       v_IncrType in char,
119  			       v_Dept in number,
120  			       v_EmpID in number,
121  			       v_retval out integer,
122  			       V_retmsg out nvarchar2);
123  
124  Procedure FillBONUS(p_PInstance_ID  NUMBER);
125  
126  FUNCTION GETBONAMT(p_Empid number,
127  			p_Basic number,
128  			p_erbasic number,
129  			p_smon number,
130  			p_MonthDays number,
131  			p_SalaryDays number,
132  			p_EmpType char,
133  			p_jdate date,
134  			p_catcode number)
135  		 return number;
136  
137  
138  END; -- Package spec
139  /

Package created.

SCOTT@orcl_12.1.0.2.0> SHOW ERRORS
No errors.

Re: package error [message #652110 is a reply to message #652109] Thu, 02 June 2016 00:13 Go to previous messageGo to next message
Littlefoot
Messages: 21683
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Well, the error looks more like a package body issue rather than its specification (at least, to me).
Re: package error [message #652111 is a reply to message #652110] Thu, 02 June 2016 00:16 Go to previous messageGo to next message
Michel Cadot
Messages: 67920
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Yes, this is why I asked for COMPLETE code.

Re: package error [message #652112 is a reply to message #652110] Thu, 02 June 2016 00:20 Go to previous messageGo to next message
Barbara Boehmer
Messages: 8922
Registered: November 2002
Location: California, USA
Senior Member
You're right. He only posted the package specification, not the body, and his post says,

"i have create a package but when i compile package body
then it show err pls-00337 too many application
pls help"

I missed that it was the package body, the part he didn't post.

Re: package error [message #652134 is a reply to message #652112] Thu, 02 June 2016 07:38 Go to previous message
Bill B
Messages: 1971
Registered: December 2004
Senior Member
Without seeing the body this can't be troubleshooted. If it isn't sensitive or secret, please post the source
Previous Topic: E-Mail sending issue from Oracle Database
Next Topic: encrypt and decrypt URL
Goto Forum:
  


Current Time: Tue Jul 27 20:28:38 CDT 2021