How to check sap internal format date is a valid one or not?
Often we need to check if the date ( in SAP internal format YYYYMMDD ) is a valid date or not. One of the case is you are uploading data from excel or flat file where date is provided in sap internal date format. In such a case it is required to validate the entered date to process further.
The FM – DATE_CHECK_PLAUSIBILITY provides all such checks to validate a sap internal format date.
Run1- Day number is 35 which is grater than 31.
Output:
Run2- Month provided as 16 which is grater than 12.
Output:
Run3- Here day is provided as 30 for a February month
Output:
Run4- Its a valid date.
Output:
Run5- Date contains some thing other than 0 to 9