‎2006 Dec 06 6:33 AM
Hi ALL,
I would like to know the various function modules that can be used for calculating dates.Like first day of month,last day.....etc etc.
Please give me a list of the FM's and not the F4 help option info.
Cheers
‎2006 Dec 06 6:45 AM
1st day of any month is always 01
for last day of month use - RP_LAST_DAY_OF_MONTHS Pass any date of that month to that FM it will return u the last date.
‎2006 Dec 06 6:36 AM
Hi,
CONCATENATE sy-datum+0(4) '0101' INTO p_begda.
l_month = sy-datum+4(2) - 1.
UNPACK l_month TO l_month.
CONCATENATE sy-datum0(4) l_month sy-datum6(2) INTO l_date.
Getting last day of previous month
CALL FUNCTION 'BKK_GET_MONTH_LASTDAY'
EXPORTING
i_date = l_date
IMPORTING
e_date = p_endda.
‎2006 Dec 06 6:45 AM
1st day of any month is always 01
for last day of month use - RP_LAST_DAY_OF_MONTHS Pass any date of that month to that FM it will return u the last date.
‎2006 Dec 06 6:48 AM
Check these,they may help u
FIMA_DAYS_AND_MONTHS_AND_YEARS:Difference in dates
CONVERSION_EXIT_IDATE_OUTPUT:Date formatting
HR_IN_GET_DATE_COMPONENTS
DATE_CONVERT_TO_WORKINGDAY
DAYS_BETWEEN_TWO_DATES
LAST_DAY_OF_MONTHS
RP_CALC_DATE_IN_INTERVAL :Calculate the previous date
Regards
‎2006 Dec 06 6:58 AM
hi,
some more...
SG_PS_GET_LAST_DAY_OF_MONTH
RE_LAST_DAY_OF_MONTH
HR_HCP_GET_LAST_DAY_OF_MONTH
HRVE_LAST_DAY_OF_MONTH
RP_LAST_DAY_OF_MONTHS
SLS_MISC_GET_LAST_DAY_OF_MONTH
LAST_DAY_OF_MONTHS
WSAF_GET_LAST_DAY_OF_MONTH
use this FM - >
***********
CALL FUNCTION 'LAST_DAY_OF_MONTHS'
EXPORTING
DAY_IN = sy-datum
IMPORTING
LAST_DAY_OF_MONTH = v_lastdate. <--Gives you the last day of a Month
data:f_date type sy-datum,
l_date type sydatum.
CALL FUNCTION 'HR_JP_MONTH_BEGIN_END_DATE'
EXPORTING
iv_date = sy-datum
IMPORTING
EV_MONTH_BEGIN_DATE = f_date
EV_MONTH_END_DATE = l_date.
rgds
Anver
‎2006 Dec 06 7:03 AM
‎2006 Dec 06 8:27 AM
Hi ,
Here are a few FM used for date manipulation
<b>DATE_IN_FUTURE </b> Add / Substract days from a given date
<b>HR_SGPBS_ADD_TIME_TO_DATE</b> Find the next date based on input date , addition / sub and month , year ,date
<b>CONVERT_DATE_TO_EXTERNAL</b> Convert date to External format
<b>SG_PS_ADD_MONTH_TO_DATE</b> Find the next date based on input date , addition / sub and month , year ,date
<b>DATE_COMPUTE_DATE</b> For a input date gives the day of the week
<b>DATE_GET_WEEK</b>For an input date ,gives the week as output
<b>WEEK_GET_FIRST_DAY</b> Input year and week output is the first day of the week
<b>WEEKDAY_GET</b> Gives the day range , Monday , Tuesday , ..
<b>RP_CALC_DATE_IN_INTERVAL</b> Calculate Future Date
<b>CALCULATE_DATE</b> Calculate Future Date
<b>FIMA_DAYS_AND_MONTHS_AND_YEARS</b> Difference between two dates
<b>CONVERSION_EXIT_PDATE_INPUT</b> It checks if the date is in future , if yes an error is displayed
Reagrds
Arun