on 05-22-2006 5:54 PM
Hi all,,
Is their any function module which should calculate the number of days of a year including the leap year, (i.e. for a leap year it should return a value 366 and for rest it should return 365).. If their aren't a function module,, can anyone please tell me the code to implement the above said case,,
Thanx in advance
Ill assign points
regards
Dinesh.
Hi together,
there is another possible way.
Calculate the difference by a simple abap coding.
data: begin like sy-datum.
data: end like sy-datum.
data: days(6) type n.
concatenate sy-datum(4) '0101' into begin.
end = sy-datum.
days = end - begin.
The system will calculate the corresponding fields, due to referencing DATS data elements (DDIC).
Robert
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I took another look, it turnes out FIMA_DAYS_BETWEEN_TWO_DATES_2 considers leap days if you pass the parameter I_STGMETH with the value '2'.
Hope this helps.
Regards,
Petter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I didnt find any spesfic module that would take care of that but I think there is a work around:
Get your days between 2 dates with this function module:
FIMA_DAYS_BETWEEN_TWO_DATES_2
Pass the 2 days as parameters
Lets say this gives you the value 365.
Then, fill a new variable from this FM
FIMA_LEAP_DAYS_BETWEEN_2_DATES
Pass the same 2 days as parameters
Lets say this gives you the value 1.
Add the variables togegether and you should get your correct result 366.
Hope this helps,
Regards,
Petter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.