REP-1241 Circular column dependency originating with column [message #465255] |
Tue, 13 July 2010 05:47 |
|
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 #465269 is a reply to message #465262] |
Tue, 13 July 2010 06:06 |
|
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 |
cookiemonster
Messages: 13962 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.
|
|
|
|
|
|