Link to home
Start Free TrialLog in
Avatar of Sujith S
Sujith SFlag for United Arab Emirates

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;
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

I'm not a Reports person but just based on that error message, you have a formula column used in the formula posted that in turn calls the formula posted.

So some formula column in the code you posted references CF_AMOUNTFormula so it circles back to here.
ASKER CERTIFIED SOLUTION
Avatar of Geert G
Geert G
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.