2008 Jul 18 6:01 AM
Hi,
can anyone tell me FM name to get the date of 6 month back from today...????
Thanks in advance...
2008 Jul 18 6:10 AM
hi Sandeep,
CALCULATE_DATE : Calculates the future date based on the input .
v DATE_TO_DAY : Returns the Day for the entered date.
v DATE_COMPUTE_DAY : Returns weekday for a date
v DATE_GET_WEEK : Returns week for a date
v RP_CALC_DATE_IN_INTERVAL : Add days / months to a date
v DAY_ATTRIBUTES_GET : Returns attributes for a range of dates specified
v MONTHS_BETWEEN_TWO_DATES : To get the number of months between the two dates.
v END_OF_MONTH_DETERMINE_2 : Determines the End of a Month.
v HR_HK_DIFF_BT_2_DATES : Find the difference between two dates in years, months and days.
v FIMA_DAYS_AND_MONTHS_AND_YEARS : Find the difference between two dates in years, months and days.
v MONTH_NAMES_GET : Get the names of the month
v WEEK_GET_FIRST_DAY : Get the first day of the week
this moght help u
Amit
hi Sandeep,
CALCULATE_DATE : Calculates the future date based on the input .
v DATE_TO_DAY : Returns the Day for the entered date.
v DATE_COMPUTE_DAY : Returns weekday for a date
v DATE_GET_WEEK : Returns week for a date
v RP_CALC_DATE_IN_INTERVAL : Add days / months to a date
v DAY_ATTRIBUTES_GET : Returns attributes for a range of dates specified
v MONTHS_BETWEEN_TWO_DATES : To get the number of months between the two dates.
v END_OF_MONTH_DETERMINE_2 : Determines the End of a Month.
v HR_HK_DIFF_BT_2_DATES : Find the difference between two dates in years, months and days.
v FIMA_DAYS_AND_MONTHS_AND_YEARS : Find the difference between two dates in years, months and days.
v MONTH_NAMES_GET : Get the names of the month
v WEEK_GET_FIRST_DAY : Get the first day of the week
this moght help u
Amit
2008 Jul 18 6:05 AM
2008 Jul 18 6:06 AM
Hi
there is no need of any function modules you can subtract the number of days from the given date then you will get the desired result.
Regards
Pavan
2008 Jul 18 6:09 AM
hi sandeep,
Try to use the function module CALCULATE_DATE.
Best of luck,
Bhumika
2008 Jul 18 6:10 AM
hi Sandeep,
CALCULATE_DATE : Calculates the future date based on the input .
v DATE_TO_DAY : Returns the Day for the entered date.
v DATE_COMPUTE_DAY : Returns weekday for a date
v DATE_GET_WEEK : Returns week for a date
v RP_CALC_DATE_IN_INTERVAL : Add days / months to a date
v DAY_ATTRIBUTES_GET : Returns attributes for a range of dates specified
v MONTHS_BETWEEN_TWO_DATES : To get the number of months between the two dates.
v END_OF_MONTH_DETERMINE_2 : Determines the End of a Month.
v HR_HK_DIFF_BT_2_DATES : Find the difference between two dates in years, months and days.
v FIMA_DAYS_AND_MONTHS_AND_YEARS : Find the difference between two dates in years, months and days.
v MONTH_NAMES_GET : Get the names of the month
v WEEK_GET_FIRST_DAY : Get the first day of the week
this moght help u
Amit
2008 Jul 18 6:11 AM
Hi Sandeep,
Check these function modules for date calculations:
CALCULATE_DATE : Calculates the future date based on the input .
DATE_TO_DAY : Returns the Day for the entered date.
DATE_COMPUTE_DAY : Returns weekday for a date
DATE_GET_WEEK : Returns week for a date
RP_CALC_DATE_IN_INTERVAL : Add days / months to a date
MONTHS_BETWEEN_TWO_DATES : To get the number of months between the two dates.
END_OF_MONTH_DETERMINE_2 : Determines the End of a Month.
HR_HK_DIFF_BT_2_DATES : Find the difference between two dates in years, months and days.
FIMA_DAYS_AND_MONTHS_AND_YEARS : Find the difference between two dates in years, months and days.
MONTH_NAMES_GET : Get the names of the month
WEEK_GET_FIRST_DAY : Get the first day of the week
HRGPBS_HESA_DATE_FORMAT : Format the date in dd/mm/yyyy format
SD_CALC_DURATION_FROM_DATETIME : Find the difference between two date/time and report the difference in hours
L_MC_TIME_DIFFERENCE : Find the time difference between two date/time
HR_99S_INTERVAL_BETWEEN_DATES : Difference between two dates in days, weeks, months
LAST_DAY_OF_MONTHS : Returns the last day of the month
DATE_CHECK_PLAUSIBILITY :Check for the invalid date.
Hope this helps you.
Regards,
Chandra Sekhar
2008 Jul 18 6:13 AM
Hi
Try the FM: RP_CALC_DATE_IN_INTERVAL
In the parameters set the parameter SIGNUM = '-' . ( Minus Sign )
Hope this would help you.
Murthy
2008 Jul 18 6:18 AM
Hi Sandeep,
Try this FM;
MONTH_PLUS_DETERMINE
Add or subtract months from a date. To subtract a month, enter a negative value for the 'months' parameter.
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.With luck,
Pritam.
2008 Jul 18 6:26 AM
Use FM MONTH_PLUS_DETERMINE. Call this FM with a -ve value for month as shown below:
CALL FUNCTION 'MONTH_PLUS_DETERMINE'
EXPORTING
MONTHS = '-6'
OLDDATE = SY-DATUM
IMPORTING
NEWDATE = V_NEXTMONTH.
Regards,
Joy.
2008 Jul 18 6:50 AM
Hi,
DATA: P_MONTHS LIKE T5A4A-DLYMO,
P_SIGNUM LIKE T5A4A-SPLIT VALUE '+',
DAYS LIKE T5A4A-DLYDY,
YEARS LIKE T5A4A-DLYYR,
NEW_DATE LIKE P0001-BEGDA.
PARAMETERS: P_DATE LIKE P0001-BEGDA.
CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
EXPORTING
DATE = P_DATE
DAYS = '0'
MONTHS = '06'
SIGNUM = '-'
YEARS = '00'
IMPORTING
CALC_DATE = NEW_DATE.
WRITE: NEW_DATE.Even we have another function module 'months_plus_determine'.
Hope this helps you.
plz reward if useful.
thanks,
dhanashri.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |