on 2007 Jul 18 12:15 PM
Hi *,
i am trying to create a Net Present Value function.
Therefor, I need the smallest year in my selection.
Does anybody know, how to get the smallest year in a selection.
e.g.: 2005, 2006, 2007 ....
So i need 2005 as basic year ... how can I select that ??
Here is a little code example from my function:
FOREACH S_FISCYEAR.
IF T_YEAR_FIRST >= T_YEAR_ACT.
IF T_YEAR_ACT < T_YEAR_FIRST AND T_YEAR_ACT > T_YEAR_LAST.
T_YEAR_FIRST = T_YEAR_ACT .
S_AMOUNT = { 0AMOUNT, MY_FISCYEAR }.
ENDIF.
ENDIF.
T_YEAR_CALC = T_YEAR.
IF T_YEAR_CALC >= 0.
T_YEAR_CALC = T_YEAR_CALC + (FLOATYEAR - T_YEAR_SMALL).
ENDIF.
ENDFOR.
Hi,
I mean the lowest year. But the selection is not always a specific number of years.
It could be 2001 until 2003 or it could be 2004 - 2010 ..!
What I need is a function in my code to keep the lowest year all the time.
I am using IP.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Mike,
Do you mean the lowest year or the earliest year of the selection? Is your selection always a range and is there a specific number of years in the selection?
BTW, are you using BPS or IP?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I dont know what do you mean by smallest year.
IN a block of 4 years, the leap year is the longest and rest all ordinary year.
Also, if you know the know the no of years the inevstment is to go and the cashflow years, then you can hardcode that "smallest" year in the NPV fox .
Or you may have to write a custom ABAP and check for conditions and possibilities and apply the results.
Ravi Thothadri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
68 | |
8 | |
8 | |
6 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.