Sujith S
asked on
REP 1241 ERROR Circular column dependency originating with column CF_TAX
function CF_AMOUNTFormula return Number is
CURSOR C1 IS
SELECT TERM_SHORT_NAME
FROM OM_TERM
WHERE TERM_CODE=:JEH_TERM_CODE;
begin
IF C1%ISOPEN THEN
CLOSE C1;
END IF;
OPEN C1;
FETCH C1 INTO :CP_TERM_NAME;
CLOSE C1;
IF :JEH_RETENTION_PERC >0 THEN
:CP_RETENTION_AMT :=NVL((:JEH_RETENTION_PERC /100) * :CS_GROSS_FC_VAL,0);
END IF;
:CP_GROSS_AMT := :CS_GROSS_FC_VAL + NVL(:CS_EXP_SUM,0);
-- :CP_NET_AMOUNT := :CS_GROSS_FC_VAL + NVL(:CP_RETENTION_AMT,0) + NVL(:CS_EXP_SUM,0);
:CP_NET_AMOUNT := :CS_TOTAL - (NVL(:JEH_DISC_VAL,0)+(:CF _TAX));
RETURN(1);
EXCEPTION
WHEN OTHERS THEN
RETURN(0);
end;
CURSOR C1 IS
SELECT TERM_SHORT_NAME
FROM OM_TERM
WHERE TERM_CODE=:JEH_TERM_CODE;
begin
IF C1%ISOPEN THEN
CLOSE C1;
END IF;
OPEN C1;
FETCH C1 INTO :CP_TERM_NAME;
CLOSE C1;
IF :JEH_RETENTION_PERC >0 THEN
:CP_RETENTION_AMT :=NVL((:JEH_RETENTION_PERC
END IF;
:CP_GROSS_AMT := :CS_GROSS_FC_VAL + NVL(:CS_EXP_SUM,0);
-- :CP_NET_AMOUNT := :CS_GROSS_FC_VAL + NVL(:CP_RETENTION_AMT,0) + NVL(:CS_EXP_SUM,0);
:CP_NET_AMOUNT := :CS_TOTAL - (NVL(:JEH_DISC_VAL,0)+(:CF
RETURN(1);
EXCEPTION
WHEN OTHERS THEN
RETURN(0);
end;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Sujith,
It appears you closed this so you could ask a new question.
Please confirm the accepted solution was the actual answer and you just didn't accept the last post.
It appears you closed this so you could ask a new question.
Please confirm the accepted solution was the actual answer and you just didn't accept the last post.
So some formula column in the code you posted references CF_AMOUNTFormula so it circles back to here.