2008 Jul 21 9:57 AM
hi,
Is there any FM or something that validates the date.
The date format is mmddyyyy.
Thanks,
Anil.
2008 Jul 21 10:01 AM
Hi Anil,
Check the below Functional Module which related to dates,,that will help u,,,,
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 it is helps,,,
Regards,
T.D.M.
hi,
Is there any FM or something that validates the date.
The date format is mmddyyyy.
Thanks,
Anil.
2008 Jul 21 9:59 AM
hi,
what do you mean by "validates the date."? What do you want to achieve?
ec
2008 Jul 21 10:01 AM
I just want to know whether the date is a valid date or not...
thanks,
Anil
2008 Jul 21 10:01 AM
Hi Anil,
Check the below Functional Module which related to dates,,that will help u,,,,
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 it is helps,,,
Regards,
T.D.M.
2008 Jul 21 10:02 AM
2008 Jul 21 10:05 AM
Hi Anil,
Try 'DATE_CHECK_PLAUSIBILITY'. this checks whether the date is plausible or not..
Hope this solves your purpose.
Reward points if helpful.
Thanks,
Hitesh K
2008 Jul 21 10:06 AM
Hi,
Check this:
Parameters:
p_date like sy-datum.
CALL FUNCTION 'DATE_CHECK_PLAUSIBILITY'
EXPORTING
DATE = p_date
EXCEPTIONS
PLAUSIBILITY_CHECK_FAILED = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
* <message....>
ENDIF.
Write:/ sy-subrc.Regards
Adil
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |