FM to check SAP Internal Format Date is valid or invalid

lightHow 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.

1


Output:

2


Run2- Month provided as 16 which is grater than 12.

3


Output:

4


Run3- Here day is provided as 30 for a February month 

5


Output:

6


Run4- Its a valid date.

7


Output:

8


Run5- Date contains some thing other than 0 to 9  

9


 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s