cancel
Showing results for 
Search instead for 
Did you mean: 

function module to predict the date for a given date

Former Member
0 Kudos

hi friends,

is there any function module to predict the date

means for example if i enter one date , what will be the date

after 4 months(say) to the given date.

my requirement is when a person is hired today (10.06.2008)

and if he is under probationary for 6 months, then on what date he comes into the permenant employee's list(predicted date after date 6 months)

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

hi

its simple man update the Infotype 16 for every employee and system itself calculate and trigger the end of probation after specified period

with regards

partha

keep sharing and learning

Former Member
0 Kudos

Date calculations

DATE_COMPUTE_DAY Returns a number indicating what day of the week the date falls on. Monday is returned as a 1, Tuesday as 2, etc.

DATE_IN_FUTURE Calculate a date N days in the future.

RP_CALC_DATE_IN_INTERVAL Add days/months to a date

RP_CALC_DATE_IN_INTERVAL Add/subtract years/months/days from a date

SD_DATETIME_DIFFERENCE Give the difference in Days and Time for 2 dates

MONTH_PLUS_DETERMINE Add or subtract months from a date. To subtract a month, enter a negative value for the 'months' parameter.

DATE_CREATE Calculates a date from the input parameters:

Example: DATE_CREATE

CALL FUNCTION 'DATE_CREATE'

EXPORTING

anzahl_jahre = 1

anzahl_monate = 2

anzahl_tage = 3

datum_ein = '20010101'

IMPORTING

datum_aus = l_new_date.

Result:

l_new_date = 20020304

Example: MONTH_PLUS_DETERMINE

data: new_date type d.

CALL FUNCTION 'MONTH_PLUS_DETERMINE'

EXPORTING

months = -5 " Negative to subtract from old date, positive to add

olddate = sy-datum

IMPORTING

NEWDATE = new_date.

write: / new_date.

Former Member
0 Kudos

Hi, try this FM ISP_ADDING_MONTHS_TO_DATE

Usually the probationary end date, date of reminder etc will be set as a monitoring task in IT0019.

Edited by: Phani Kanth Borra on Jun 12, 2008 11:22 AM

Former Member
0 Kudos

hi phani,

thanks for ur response.

it saved my time

Former Member
0 Kudos

Hi,

you can use the infotype monitoring of tasks infotype than complicating things.

Former Member
0 Kudos

hi ,

thanks for ur response.

i need to calculate that date and they vll store in 19.

any have one of our expert send that FM :

ISP_ADDING_MONTHS_TO_DATE