SAP Function HR_99S_INTERVAL_BETWEEN_DATES - Get days,weeks, months and years between dates

Parameter Reference Type Length Default Optional Text
BEGDA D D 8 X begin date
ENDDA D D 8 end date
TAB_MODE C C 0 ' ' X Mode for tab of months

Parameter Reference Type Length Text
C_MONTHS I I 4 complete months
C_WEEKS I I 4 complete weeks
C_YEARS I I 4 complete years
DAYS I I 4 number of days
D_MONTHS I I 4 delta months
MONTHS 0 absolute months
MONTH_TAB P99SG_MONTH_TAB 0 table of months between
WEEKS 0 absolute weeks
YEARS 0 absolute years

Description
Returns complete months between dates.
E.G. 02/15/02 - 06/15/02 = 4 months
02/15/02 - 02/11/03 = 11 months

Value range
like type i

Description
Returns complete weeks in interval (days divided by 7)

Value range
like type i

Description
Returns complete years between dates.
Subtracts years of dates. If begin-date is further in year thanend-date, one is subtracted from number of years.

Value range
like type i

Description
returns number of days between begda and endda (Determined by simplysubtracting begda from endda)

Value range
like type i

Description
Returns months between two dates in "Delta" mode.
06/15/2002 - 07/14/2002 = 1 month.

Value range
like type i

Description
Absolute number of months between begda and endda.
Computes number of complete months in interval and adds a respectivefraction for incomplete months.
E.G. : 16.06.2002 - 01.07.2002 = 0.5 + 0.0323 = 0.5323

Value range
4 DECIMALS

Description
Returns a table of months between begda and endda.
Months of begda and endda are only included if TAB_MODE is 'I'
If TAB_MODE is ' ' , table contains only months between dates.
For each month contains:
month year endda begda
E.g. month: 02 year:2003 begda: 02/01/2003 endda: 02/28/2003

Description
Number of weeks between begda and endda (days / 7)

Value range
like type f

Description
Returns complete years + fraction for incomplete years.
E.G. : 01.01.2002 - 01.07.2005 = 3,49 ...... years.

Value range
like type f

Description
begin of interval to be computed
E.G. : '20020728' (7/28/2002)

Value range
01/01/0001 - 12/31/9999

Description
End of Interval to be computed.

Value range
01/01/0001 - 12/31/9999

Description
Determines if month of begda and month of endda are part of the tableof months (month_tab).
E.G. : Interval between 12. J anuary and 18. December 2002
January and December are only part of table if TAB_MODE is 'I', elseonly February - November will be added to table.

Value range
'I' : first and last month included
' ' : only months between

Default
' '

594032Review Balance Method