I'm trying to automate a formula in Oracle Financial Analyzer. Following is the code. My issue is next year I'd have to add another line at the bottom : else if GL_TIME1 eq 'YR2011' or nafill(inlist(FAGL4.ANCESTORS,'YR2011'),NO) then GLACTRES.
I would like to automate this, perhaps by using loops and system dates. Any suggestions?
if GL_TIME1 eq 'YR2005' or nafill(inlist(FAGL4.ANCESTORS,'YR2005'),NO) then GLACTRES
else if GL_TIME1 eq 'YR2006' or nafill(inlist(FAGL4.ANCESTORS,'YR2006'),NO) then GLACTRES
else if GL_TIME1 eq 'YR2007' or nafill(inlist(FAGL4.ANCESTORS,'YR2007'),NO) then GLACTRES
else if GL_TIME1 eq 'YR2008' or nafill(inlist(FAGL4.ANCESTORS,'YR2008'),NO) then GLACTRES
else if GL_TIME1 eq 'YR2009' or nafill(inlist(FAGL4.ANCESTORS,'YR2009'),NO) then GLACTRES
else if GL_TIME1 eq 'YR2010' or nafill(inlist(FAGL4.ANCESTORS,'YR2010'),NO) then GLACTRES
else GLACTUAL
[EDITED by LF: fixed [code] tags]
[Updated on: Thu, 06 May 2010 00:16]
Report message to a moderator