このプロシージャを実行しようとすると、エラー、無効なオブジェクトora-06550エラーが発生します。このプロシージャを実行しようとすると、エラー、無効なオブジェクトが返されます
どうすればよいですか?
この手順では、一部のテーブルに値を挿入して計算を行います。ここで
は手順です:
CREATE OR REPLACE PROCEDURE SPR_FIS_SCHOLARSHIP_INSERT(P_ENTRY_DATE DATE) AS
L_COUNT NUMBER(10) := 0;
l_party_count number(10) := 0;
L_NET_AMOUNT NUMBER(10);
L_COUNT1 NUMBER(10) := 0;
L_GEN_VOUCHER_NO VARCHAR(20);
L_PAYMENT_ID NUMBER(10);
L_PARTY_ID NUMBER(10) := 0;
L_CO6_NO VARCHAR2(10) := 0;
l_max_party_code NUMBER(10);
L_NAME VARCHAR2(100);
CURSOR C1 IS
SELECT NAME, AMOUNT
FROM TMP_SCHOLARSHIP_DATA
WHERE ENTRY_DATE LIKE P_ENTRY_DATE;
CURSOR C_NAME IS
SELECT NAME
FROM TMP_SCHOLARSHIP_DATA
WHERE NAME NOT IN (SELECT PARTY_NAME
FROM M_FIS_PARTY
WHERE SCHOLARSHIP_FLAG = 'S'
AND DELETE_FLAG = 'N')
AND ENTRY_DATE = P_ENTRY_DATE;
BEGIN
SELECT COUNT(*)
INTO L_COUNT
FROM TMP_SCHOLARSHIP_DATA
WHERE ENTRY_DATE LIKE P_ENTRY_DATE;
-- L_CO6_NO := P_CO6_NO;
DBMS_OUTPUT.PUT_LINE('STARTING CO6 NO=======' || L_CO6_NO);
select max(TO_NUMBER(party_code)) + 1
into l_max_party_code
from m_fis_party;
FOR I IN C_NAME LOOP
L_PARTY_ID := SFN_ADM_GENERATE_SEQNO('M_FIS_PARTY', 'FIS');
INSERT INTO M_FIS_PARTY
(PARTY_ID,
PARTY_CODE,
PARTY_NAME,
DELETE_FLAG,
CREATED_BY,
CREATION_DATE,
SCHOLARSHIP_FLAG,
PARTY_TYPE_OTH_CODE,
PARTY_ACCOUNT_NUMBER,
BANK_NAME,
IFSC_CODE)
VALUES
(L_PARTY_ID,
TO_CHAR(l_max_party_code),
I.NAME,
'N',
'FISDEV',
TO_DATE(SYSDATE),
'S',
'SCHOLARSHIP',
I.BANK_ACCOUNT_NUMBER,
I.BANK_NAME,
I.IFSC_CODE);
L_MAX_PARTY_CODE := L_MAX_PARTY_CODE + 1;
l_party_count := l_party_count + 1;
END LOOP;
FOR REC_C1 IN C1 LOOP
L_PAYMENT_ID := SFN_ADM_GENERATE_SEQNO('T_FIS_PAYMENT_HDR', 'FIS');
l_gen_voucher_no := SFN_FIS_Generate_VoucherNumber('PAYORDER',
'A',
'D',
SYSDATE);
SELECT PARTY_ID
INTO L_PARTY_ID
FROM M_FIS_PARTY
WHERE PARTY_NAME = REC_C1.NAME
AND SCHOLARSHIP_FLAG = 'S';
SELECT MAX(TO_NUMBER(CLASSIF_ORD_NO))+1 INTO L_CO6_NO
FROM T_FIS_PAYMENT_HDR;
-- AND ROWNUM < 2;
L_NET_AMOUNT := 0;
IF (REC_C1.AMOUNT IS NOT NULL) THEN
L_NET_AMOUNT := REC_C1.AMOUNT;
END IF;
INSERT INTO T_FIS_PAYMENT_HDR
(PAYMENT_ID,
PAYMENT_NO,
PAY_ORD_DATE,
PAYMENT_TYPE_ID,
PAYEE_TYPE_ID,
PAYEE_ID,
PAID_TO_NAME,
NET_AMOUNT,
PAYMENT_STATUS,
APPROVAL_FLAG,
POST_FLAG,
DELETE_FLAG,
CREATED_BY,
CREATION_DATE,
PAY_ORD_NO,
SCHOLARSHIP_FLAG,
REMARKS,
PRINT_FLAG,
DOCUMENT_NO,
FIS_SECTION,
CLASSIF_ORD_NO,
DEPT_PAYORDER_NO,
CLASSIF_ORD_DATE,
SUB_SECTION_CODE,
DEPT_PAYORDER_DATE)
VALUES
(L_PAYMENT_ID,
L_GEN_VOUCHER_NO,
TO_DATE(SYSDATE),
3,
3,
L_PARTY_ID,
REC_C1.NAME,
L_NET_AMOUNT,
'U',
'N',
'N',
'N',
'FISDEV',
TO_DATE(SYSDATE),
L_GEN_VOUCHER_NO,
'S',
'SCHOLARSHIP 2016-2017',
'N',
'878-',
'A',
L_CO6_NO,
'CC0080842',
TO_DATE(SYSDATE),
'HQXP',
'05-MAR-15');
INSERT INTO T_FIS_PAYMENT_DTL
(PAYMENT_ID,
LINE_NO,
COMBINATION_ID,
AMOUNT,
DEBIT_CREDIT_FLAG,
DELETE_FLAG,
CREATED_BY,
CREATION_DATE,
REMARKS)
VALUES
(L_PAYMENT_ID,
1,
'16287',
L_NET_AMOUNT,
'D',
'N',
'FISDEV',
TO_DATE(SYSDATE),
'SCHOLARSHIP 2016-2017');
L_COUNT1 := L_COUNT1 + 1;
L_PARTY_ID := L_PARTY_ID + 1;
L_CO6_NO := L_CO6_NO + 1;
END LOOP;
DBMS_OUTPUT.PUT_LINE('TOTAL PARTY INSERTED======' || l_party_count);
DBMS_OUTPUT.PUT_LINE('TOTAL SELECTED======' || L_COUNT);
DBMS_OUTPUT.PUT_LINE('TOTAL INSERTED======' || L_COUNT1);
DBMS_OUTPUT.PUT_LINE('LAST PAYMENT_NO===' || L_GEN_VOUCHER_NO);
DBMS_OUTPUT.PUT_LINE('LAST PAYMENT_ID===' || L_PAYMENT_ID);
DBMS_OUTPUT.PUT_LINE('LAST PARTY_ID===' || L_PARTY_ID);
DBMS_OUTPUT.PUT_LINE('LAST CO6 NO===' || L_CO6_NO);
END;
**Here the error what shows when i tried to execute this procedure.**
SQL> exec SPR_FIS_SCHOLARSHIP_INSERT('14-feb-2017');
begin SPR_FIS_SCHOLARSHIP_INSERT('14-feb-2017'); end;
ORA-06550: line 1, column 7:
PLS-00905: object FIS.SPR_FIS_SCHOLARSHIP_INSERT is invalid
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
SPをコンパイルすると、このSPが無効であるというエラーはありますか? – lordkain
コンパイルされた罰金はありません。 –
あなたのコードが適切にコンパイルされている可能性はありません。エラーはオブジェクトが無効であることを明確に示しています – XING