Home » SQL & PL/SQL » SQL & PL/SQL » Error in PLSQL Package Body.
Error in PLSQL Package Body. [message #528262] Sun, 23 October 2011 23:48 Go to next message
aneeta08annie
Messages: 4
Registered: October 2011
Location: Bangalore
Junior Member

Hi,

I am attaching one file here... Just m getting the error like
Package body created with compilation error.
I'm not getting the actual error
Please let me know the correct answer.

Thanks
Aneeta
Re: Error in PLSQL Package Body. [message #528267 is a reply to message #528262] Mon, 24 October 2011 00:12 Go to previous messageGo to next message
Littlefoot
Messages: 21826
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Run
> show errors
in SQL*Plus; it will show what happened. It accepts additional parameters (see here), so you can even include a package, function ... name along with it.
Re: Error in PLSQL Package Body. [message #528269 is a reply to message #528262] Mon, 24 October 2011 00:53 Go to previous messageGo to next message
vnpraneeth
Messages: 2
Registered: October 2011
Location: Bangalore
Junior Member
Hi,
While writing IF-THEN-ELSIF the syntax is

IF condition THEN
{...statements...}
ELSIF condition THEN
{...statements...}
ELSE
{...statements...}
END IF;

So change your code

from

ELSEIF trans.kind = 'C' THEN

to

ELSIF trans.kind = 'C' THEN

and re compile the Package Body.
Re: Error in PLSQL Package Body. [message #528270 is a reply to message #528269] Mon, 24 October 2011 01:14 Go to previous messageGo to next message
anniemail
Messages: 7
Registered: October 2011
Location: Bangalore
Junior Member
Hi,

I did the changes but still getting error.

Here is the error:-
SQL> select * from user_errors where name= upper('bank_transactions');

NAME TYPE SEQUENCE LINE POSITION
------------------------------ ------------ ---------- ---------- ----------
TEXT
--------------------------------------------------------------------------------
ATTRIBUTE MESSAGE_NUMBER
--------- --------------
BANK_TRANSACTIONS PACKAGE BODY 1 15 7
PLS-00313: 'DO_JOURNAL_ENTRY' not declared in this scope
ERROR 313

BANK_TRANSACTIONS PACKAGE BODY 2 15 7
PL/SQL: Statement ignored
ERROR 0

NAME TYPE SEQUENCE LINE POSITION
------------------------------ ------------ ---------- ---------- ----------
TEXT
--------------------------------------------------------------------------------
ATTRIBUTE MESSAGE_NUMBER
--------- --------------

BANK_TRANSACTIONS PACKAGE BODY 3 37 10
PLS-00313: 'DO_JOURNAL_ENTRY' not declared in this scope
ERROR 313

BANK_TRANSACTIONS PACKAGE BODY 4 37 10
PL/SQL: Statement ignored

NAME TYPE SEQUENCE LINE POSITION
------------------------------ ------------ ---------- ---------- ----------
TEXT
--------------------------------------------------------------------------------
ATTRIBUTE MESSAGE_NUMBER
--------- --------------
ERROR 0


As i have place the Do_Journal_entry procedure in the packlage body ...but i m getting error so could not rectifying the error.

please help.

thanks


Re: Error in PLSQL Package Body. [message #528275 is a reply to message #528270] Mon, 24 October 2011 01:19 Go to previous messageGo to next message
Michel Cadot
Messages: 68767
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
You don't need to create a new account each time you post a message.

Please read OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code, use code tags and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version, with 4 decimals.

Use SQL*Plus and copy and paste your session, the WHOLE session, including the procedure creation and "show error" result.
Do NOT post it as attached file, post it inside the text.

Regards
Michel
Re: Error in PLSQL Package Body. [message #528281 is a reply to message #528275] Mon, 24 October 2011 01:41 Go to previous messageGo to next message
anniemail
Messages: 7
Registered: October 2011
Location: Bangalore
Junior Member
Thanks Michel for kind informations.
I'll follow this guide lines before posting any issue.

Re: Error in PLSQL Package Body. [message #528282 is a reply to message #528281] Mon, 24 October 2011 01:51 Go to previous messageGo to next message
Michel Cadot
Messages: 68767
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
And don't you have one now?

Regards
Michel
Re: Error in PLSQL Package Body. [message #528284 is a reply to message #528270] Mon, 24 October 2011 01:58 Go to previous messageGo to next message
vnpraneeth
Messages: 2
Registered: October 2011
Location: Bangalore
Junior Member
Hi,
Declare the procedure DO_JOURNAL_ENTRY in the package specification and re compile the package body.
Re: Error in PLSQL Package Body. [message #528296 is a reply to message #528284] Mon, 24 October 2011 03:09 Go to previous message
anniemail
Messages: 7
Registered: October 2011
Location: Bangalore
Junior Member
Hi,

I declared the DO_JOURNAL_ENTRY procedure in the Package Specification and recompliled the Package Body...
Now it works Fine.

Thank you so much.
Previous Topic: sqlplus output format
Next Topic: data count
Goto Forum:
  


Current Time: Sun Aug 24 11:17:31 CDT 2025