Home » SQL & PL/SQL » SQL & PL/SQL » PLS-00364 while creating a procedure
PLS-00364 while creating a procedure [message #242201] Fri, 01 June 2007 01:03 Go to next message
seeahead
Messages: 10
Registered: May 2007
Junior Member
Hi All,

I am creating a procedure and getting the compliation error

PLS-00364

can some tell me why??????????

I am pasting the procedure script.......

CREATE OR REPLACE PROCEDURE CONCOR_CHARGES(ERRBUF OUT VARCHAR2, RETCODE OUT VARCHAR2)
AS
CURSOR CCHARGE IS
SELECT BOH_CONCOR_BLNO, 'STANDARD',BOH_CONCOR_BLDT,BOH_CONCOR_PARTY_ID,
BOH_CONCOR_CHRG_INR,'INR','MIGRATION',BOH_CMP_CODE, BOH_INV_NO
FROM EMSPROD.PRESHIP_HDR
WHERE BOH_CMP_CODE = 81
AND BOH_CONCOR_CHRG_INR IS NOT NULL
AND BOH_CCHRG_CONFIRM LIKE'Y'
AND (BOH_CMP_CODE,BOH_INV_NO,BOH_CONCOR_BLNO||'-IHCC',BOH_CONCOR_PTY_ID)
NOT IN (SELECT ORG_ID, SUBSTR(DESCRIPTION ,1, INSTR(DESCRIPTION,' ')),INVOICE_NUM,VENDOR_ID
FROM AP_INVOICES_INTERFACE
UNION
SELECT ORG_ID,SUBSTR(DESCRIPTION ,1, INSTR(DESCRIPTION,' ')),INVOICE_NUM,VENDOR_ID FROM AP_INVOICES);

VINVOICE_ID NUMBER;
VINVOICE_LINE_ID NUMBER;
VLINE_NUMBER NUMBER;
X VARCHAR2(1000);
Y VARCHAR2(1000);
IHCCBLNO VARCHAR2(200);
A VARCHAR2(2000);
STATUS VARCHAR2(20);

BEGIN
dbms_application_info.set_client_info(81);
FOR CCHRG IN CCHARGE
LOOP

SELECT MAX(INVOICE_ID) + 1 INTO VINVOICE_ID FROM AP_INVOICES_INTERFACE;

BEGIN

SELECT TERMS_ID,pay_group_Lookup_code INTO X,Y from PO_VENDORS
WHERE VENDOR_ID=CCHRG.BOH_CONCOR_PARTY_ID;

IHCCBLNO := CCHRG.BOH_CONCOR_BLNO||'-IHCC';
A := CCHRG.BOH_INV_NO || ' '||IHCCBLNO;


BEGIN
SELECT CLOSING_STATUS INTO STATUS FROM GL_PERIOD_STATUSES
WHERE APPLICATION_ID = 200
AND START_DATE<= CCHRG.BOH_CONCOR_BLDT
AND END_DATE >= CCHRG.BOH_CONCOR_BLDT
AND CLOSING_STATUS NOT LIKE'N';
EXCEPTION
WHEN NO_DATA_FOUND THEN NULL;
END;

IF STATUS = 'O' THEN

INSERT INTO AP_INVOICES_INTERFACE
(INVOICE_ID,
INVOICE_NUM,
INVOICE_TYPE_LOOKUP_CODE,
INVOICE_DATE,
VENDOR_ID,
INVOICE_AMOUNT,
INVOICE_CURRENCY_CODE,
SOURCE,
ORG_ID,
TERMS_ID,
DESCRIPTION)
VALUES
(VINVOICE_ID,
IHCCBLNO,
'STANDARD',
CCHRG.BOH_CONCOR_BLDT,
CCHRG.BOH_CONCOR_PARTY_ID,
CCHRG.BOH_CONCOR_CHRG_INR,
'INR',
'MIGRATION-FCBEMS',
CCHRG.BOH_CMP_CODE,
X,
A);


SELECT MAX(INVOICE_LINE_ID) + 1 INTO VINVOICE_LINE_ID FROM
AP_INVOICE_LINES_INTERFACE;

SELECT MAX(NVL(LINE_NUMBER,0))+1 INTO VLINE_NUMBER FROM
AP_INVOICE_LINES_INTERFACE
WHERE INVOICE_ID=VINVOICE_ID
AND ORG_ID=81;



INSERT INTO AP_INVOICE_LINES_INTERFACE
(INVOICE_ID,
INVOICE_LINE_ID,
LINE_NUMBER,
LINE_TYPE_LOOKUP_CODE,
AMOUNT,
ACCOUNTING_DATE,
DIST_CODE_COMBINATION_ID)
VALUES
(VINVOICE_ID,
VINVOICE_LINE_ID,
VLINE_NUMBER,
'ITEM',
CCHRG.BOH_CONCOR_CHRG_INR,
CCHRG.BOH_CONCOR_BLDT,
'8084');

ELSE IF STATUS = 'C' THEN
INSERT INTO AP_INVOICES_INTERFACE
(INVOICE_ID,
INVOICE_NUM,
INVOICE_TYPE_LOOKUP_CODE,
INVOICE_DATE,
VENDOR_ID,
INVOICE_AMOUNT,
INVOICE_CURRENCY_CODE,
SOURCE,
ORG_ID,
TERMS_ID,
DESCRIPTION)
VALUES

(VINVOICE_ID,
IHCCBLNO,
'STANDARD',
CCHRG.BOH_CONCOR_BLDT,
CCHRG.BOH_CONCOR_PARTY_ID,
CCHRG.BOH_CONCOR_CHRG_INR,
'INR',
'MIGRATION-FCBEMS',
CCHRG.BOH_CMP_CODE,
X,
A);

SELECT MAX(INVOICE_LINE_ID) + 1 INTO VINVOICE_LINE_ID FROM
AP_INVOICE_LINES_INTERFACE;

SELECT MAX(NVL(LINE_NUMBER,0))+1 INTO VLINE_NUMBER FROM
AP_INVOICE_LINES_INTERFACE
WHERE INVOICE_ID=VINVOICE_ID
AND ORG_ID=81;

INSERT INTO AP_INVOICE_LINES_INTERFACE
(INVOICE_ID,
INVOICE_LINE_ID,
LINE_NUMBER,
LINE_TYPE_LOOKUP_CODE,
AMOUNT,
ACCOUNTING_DATE,
DIST_CODE_COMBINATION_ID)
VALUES
(VINVOICE_ID,
VINVOICE_LINE_ID,
VLINE_NUMBER,
'ITEM',
CCHRG.BOH_CONCOR_CHRG_INR,
TRUNC (TO_DATE (add_months(CCHRG.BOH_CONCOR_BLDT,1)), 'MONTH'),'8084');
END IF;
END IF;

COMMIT;
EXCEPTION
WHEN NO_DATA_FOUND THEN NULL;
END;
END LOOP;
END;


Thanks in advance..

Re: PLS-00364 while creating a procedure [message #242206 is a reply to message #242201] Fri, 01 June 2007 01:17 Go to previous messageGo to next message
Michel Cadot
Messages: 68722
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Please read and apply How to format your posts.
Also post your Oracle version.
And just copy and paste the execution with line numbers and error.
How could we know where you got PLS-00364? Btw, what is PLS-00364?

Regards
Michel
Re: PLS-00364 while creating a procedure [message #242220 is a reply to message #242206] Fri, 01 June 2007 02:24 Go to previous message
seeahead
Messages: 10
Registered: May 2007
Junior Member
Thanks

I will take care in the future about the format

Problem is solved now..it was because of some spelling mistake
Previous Topic: syntax doubt
Next Topic: LIKE condition
Goto Forum:
  


Current Time: Thu Dec 12 03:51:01 CST 2024