Home » SQL & PL/SQL » SQL & PL/SQL » help with the error PLS-00306:
help with the error PLS-00306: [message #270537] Thu, 27 September 2007 07:27 Go to next message
sruthykmenon
Messages: 1
Registered: September 2007
Junior Member
when I execute this function it gives me the error,---->

ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to
'TEMT_GETCARDLEVELDATA'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

########################

CREATE OR REPLACE PACKAGE Temtabc AS

TYPE typ_rec_card_details IS RECORD(
DSLAM_ID FC_CARD_PORT_DET.NE_ID%TYPE ,
MANUFACTURE_ID FC_CARD_PORT_DET.CONTRACTOR%TYPE,
GENERATION FC_CARD_PORT_DET.GEN_TYPE%TYPE,
EM_ID FC_CARD_PORT_DET.EM_ID%TYPE,
CARD_ID VARCHAR2(160),
CARD_TYPE FC_CARD_PORT_DET.CARD_TYPE%TYPE,
NO_OF_PORTS NUMBER,
CAPACITY_STATUS FC_CARD_PORT_DET.CAPACITY_STATUS%TYPE
);

TYPE rec_card_details IS TABLE OF typ_rec_card_details INDEX BY BINARY_INTEGER;




PROCEDURE Temt_Getcardleveldata(in_dslam_id IN FC_CARD_PORT_DET.NE_ID%TYPE,
out_card_details OUT rec_card_details,
out_code OUT NUMBER);



END Temtabc;

#####################CREATE OR REPLACE PACKAGE BODY Temtabc AS


PROCEDURE Temt_Getcardleveldata (
in_dslam_id IN FC_CARD_PORT_DET.NE_ID%TYPE,
out_card_details OUT rec_card_details,
out_code OUT NUMBER)
AS
lv_error_code NUMBER := 0;
lv_error_message VARCHAR2(200) := NULL;
FC_CARDLEVEL_EXCEPTION EXCEPTION;
lvtemp VARCHAR2(4000);
LV_card_details rec_card_details;
CNT NUMBER :=0 ;
lnCount NUMBER;
CURSOR CUR_CARDLEVEL_FETCH(in_dslam_id FC_CARD_PORT_DET.NE_ID%TYPE) IS

SELECT CONTRACTOR, GEN_TYPE, EM_ID, RACK_NUM, SHELF_NUM, SLOT_NUM, CARD_TYPE, CAPACITY_STATUS FROM FC_CARD_PORT_DET WHERE NE_ID = in_dslam_id;

BEGIN
/*
The out parameter out_code can only take the following values:
Value Significance
0 Success
1 Data for input Dslam id not found in database
2 Processing Failure due to some other reason.

*/


IF in_dslam_id IS NULL THEN
LV_ERROR_CODE := 20000;
LV_ERROR_MESSAGE := 'DSLAM ID is null. Please provide a DSLAM Id.';
out_code := 2;
RAISE FC_CARDLEVEL_EXCEPTION;
END IF;



SELECT COUNT(*) INTO cnt
FROM FC_CARD_PORT_DET
WHERE NE_ID = in_dslam_id;

IF CNT = 0 THEN
LV_ERROR_CODE := 20000;
LV_ERROR_MESSAGE := 'DSLAM ID NOT FOUND IN DATABASE. Please provide CORRECT DSLAM Id.';
out_code := 2;
RAISE FC_CARDLEVEL_EXCEPTION;
END IF;

CNT := 1;

FOR I IN CUR_CARDLEVEL_FETCH(IN_DSLAM_ID) LOOP
LV_CARD_DETAILS(CNT).MANUFACTURE_ID := NVL(I.CONTRACTOR,'NA');
LV_CARD_DETAILS(CNT).GENERATION := NVL(I.GEN_TYPE,'NA') ;
LV_CARD_DETAILS(CNT).EM_ID := NVL(I.EM_ID,'NA') ;
LV_CARD_DETAILS(CNT).CARD_ID := NVL(I.RACK_NUM,'NA') || '::' || NVL(I.SHELF_NUM,'NA') || '::' || NVL(I.SLOT_NUM,'NA') ;
LV_CARD_DETAILS(CNT).CARD_TYPE := NVL(I.CARD_TYPE,'NA') ;
LV_CARD_DETAILS(CNT).CAPACITY_STATUS := NVL(I.CAPACITY_STATUS,'NA') ;

CNT := CNT + 1;
END LOOP;

out_card_details := lv_card_details;
OUT_CODE := 0;

FOR lnCount IN LV_CARD_DETAILS.FIRST..LV_CARD_DETAILS.LAST LOOP
lvTemp := 'CARD: dslam_id='||LV_CARD_DETAILS(lnCount).dslam_id||' manufacture_id='||LV_CARD_DETAILS(lnCount).manufacture_id;
lvTemp := lvTemp||' generation='||LV_CARD_DETAILS(lnCount).generation||' em_id='||LV_CARD_DETAILS(lnCount).em_id;
lvTemp := lvTemp||' card_id='||LV_CARD_DETAILS(lnCount).card_id||' capacity_status='||LV_CARD_DETAILS(lnCount).CAPACITY_status;
lvTemp := lvTemp||' card_type='||LV_CARD_DETAILS(lnCount).card_type;

INSERT INTO fcap_debug VALUES (lncount, lvTemp);

END LOOP;

OUT_CODE := 0;

INSERT INTO FC_TEMT_APILOG VALUES ('Call for Temt_Getcardleveldata procedure - Success', SYSDATE(),lv_error_code, lv_error_message);

EXCEPTION
WHEN fc_cardlevel_exception THEN
INSERT INTO FC_TEMT_APILOG VALUES ('Failure', SYSDATE(),lv_error_code, lv_error_message);


WHEN OTHERS THEN
LV_ERROR_CODE := SUBSTR(SQLCODE,1,50);
LV_ERROR_MESSAGE := SUBSTR(SQLERRM,1,200);
out_code := 2;

INSERT INTO FC_TEMT_APILOG VALUES ('Failure', SYSDATE(),lv_error_code, lv_error_message);

END Temt_Getcardleveldata;

END Temtabc;



[Updated on: Thu, 27 September 2007 08:28] by Moderator

Report message to a moderator

Re: pls help with the error PLS-00306: [message #270538 is a reply to message #270537] Thu, 27 September 2007 07:28 Go to previous messageGo to next message
Michel Cadot
Messages: 64111
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Please read and follow OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format. Use the "Preview Message" button.
Please always post your Oracle version (4 decimals).

Regards
Michel
Re: pls help with the error PLS-00306: [message #270540 is a reply to message #270537] Thu, 27 September 2007 07:31 Go to previous messageGo to next message
smartin
Messages: 1803
Registered: March 2005
Location: Jacksonville, Florida
Senior Member
How exactly are you calling it?

Show us your session where you run the code that a) creates it and b) runs it. And format it nicely please (refer to the forum guidelines).
Re: help with the error PLS-00306: [message #271154 is a reply to message #270537] Sun, 30 September 2007 03:33 Go to previous message
Arju
Messages: 1554
Registered: June 2007
Location: Dhaka,Bangladesh. Mobile:...
Senior Member

Quote:
PLS-00306: wrong number or types of arguments in call to
'TEMT_GETCARDLEVELDATA'

Isn't This error indicates the reason of your failure!
Previous Topic: Need help in table
Next Topic: intial extent creation problem in jdeveloper
Goto Forum:
  


Current Time: Mon Dec 05 19:19:21 CST 2016

Total time taken to generate the page: 0.08752 seconds