Home » Developer & Programmer » Reports & Discoverer » REP-1241 Circular column dependency originating with column (Reports 6i, 10g Database)
REP-1241 Circular column dependency originating with column [message #465255] Tue, 13 July 2010 05:47 Go to next message
stalin4d
Messages: 226
Registered: May 2010
Location: Chennai, Tamil Nadu, Indi...
Senior Member
Dear,

I receive the error,

REP-1241 Circular column dependency originating with column 'cenvat_opening'

I have the following return statement for a column total_credit;

function total_creditFormula return Number is
begin
Return (return nvl(:cf_cenvat_closing ,0) - nvl(:cf_duty_on_goods_ed,0);
end;

Now i am using this total_creditFormula for the error formula column 'cenvat_opening'

function cenvat_openingFormula return Number is
f_num_opn number(14,2);
begin
SELECT NVL(Amount,0) INTO F_NUM_OPN
FROM Fin_Ex_Pla_Debit_Others
WHERE FISCAL_YR_CD = :P_FISCAL_YR
AND PERIOD_NO = :P_PERIOD
AND ADD_TYPE = 'I';
RETURN(F_NUM_OPN);
EXCEPTION
WHEN NO_DATA_FOUND THEN
RETURN (:total_credit); <------------
end;

here the formula column 'total_credit' has the following return statements;

RETURN Nvl(:cenvat_opening,0) + Nvl(:cenvat_credit_manu,0)

so how can i use this formula column? is there any other option to return the value in the same column.

I hope you understand,
Pls help,

Stalin Ephraim
Re: REP-1241 Circular column dependency originating with column [message #465262 is a reply to message #465255] Tue, 13 July 2010 05:54 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
Why don't you just write the exception as:
EXCEPTION
WHEN NO_DATA_FOUND THEN
RETURN Nvl(:cenvat_credit_manu,0));


As that is what total_credit would return in this case anyway.
Re: REP-1241 Circular column dependency originating with column [message #465269 is a reply to message #465262] Tue, 13 July 2010 06:06 Go to previous messageGo to next message
stalin4d
Messages: 226
Registered: May 2010
Location: Chennai, Tamil Nadu, Indi...
Senior Member
Dear,

total_Credit is the formula column used;

total_credit will return some value
eg: adding opening balance amount + the credit manual amounts.

Quote:
function total_creditFormula return Number is
begin
return nvl(:cf_cenvat_closing ,0) - nvl(:cf_duty_on_goods_ed,0);
end;


here 'cf_cenvat_closing' is also a formula column; which uses the summation of below;

function cf_cenvat_closingFormula return Number is
BEGIN
	RETURN NVL(:cenvat_opening,0) + NVL(:cenvat_credit_manu,0);
END;


[Updated on: Tue, 13 July 2010 06:17]

Report message to a moderator

Re: REP-1241 Circular column dependency originating with column [message #465275 is a reply to message #465269] Tue, 13 July 2010 06:27 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
You had the closing formula listed as the total credit formula in your first post.

Regardless - you are calling a formula that calls another formula that calls another formula that calls the first formula.
Which can never work.

So you need to rewrite the return on the exception handler so that it returns the correct value without referencing :total_credit.
You really should be able to change what I already posted to do that.
Re: REP-1241 Circular column dependency originating with column [message #465276 is a reply to message #465262] Tue, 13 July 2010 06:40 Go to previous messageGo to next message
stalin4d
Messages: 226
Registered: May 2010
Location: Chennai, Tamil Nadu, Indi...
Senior Member
Why don't you just write the exception as:

EXCEPTION
WHEN NO_DATA_FOUND THEN
RETURN Nvl(:cenvat_credit_manu,0));


here :cenvat_credit_manu will not give the correct value, the summation with this formula column only gives the correct value.
ok i'll try it if there is any possible way to check it with the query from table.

if you have any ideas tell me,
thanks...
Re: REP-1241 Circular column dependency originating with column [message #465284 is a reply to message #465276] Tue, 13 July 2010 07:06 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
EXCEPTION
WHEN NO_DATA_FOUND THEN
RETURN NVL(:cenvat_credit_manu,0) - nvl(:cf_duty_on_goods_ed,0);


Should give the right result.
I did say you would need to change my example.
Re: REP-1241 Circular column dependency originating with column [message #465385 is a reply to message #465284] Wed, 14 July 2010 00:09 Go to previous message
stalin4d
Messages: 226
Registered: May 2010
Location: Chennai, Tamil Nadu, Indi...
Senior Member
yes i think it would give the right result but,
should check with the data and will inform you.

thanks a lot.
Previous Topic: Three Report Servers
Next Topic: Query and Report layout issue
Goto Forum:
  


Current Time: Thu Mar 28 21:18:26 CDT 2024