2009 May 07 7:21 AM
Hi All,
I am looping an internal table which has a date field and if date(comes from input file) is not in YYYYMMDD format, it should throw an error message.
Can anybody please tell me how to validate date for YYYYMMDD format
Is there any specific function module for that?
Regards,
Azra.
2009 May 07 7:26 AM
2009 May 07 7:26 AM
2009 May 07 7:27 AM
2009 May 07 7:27 AM
Hi,
If for the internal table you have declared the field as sy-datum, then it will take the date in sy-datum format only.
But later to validate u cna loop in that internal table and pass the date value to the FM '/OSP/VALIDATE_DATE_TIME' to check whether its the required format.
Regards,
Mansi.
2009 May 07 7:30 AM
Hope this function module will help you
FM : " /OSP/VALIDATE_DATE_TIME "
2009 May 07 7:33 AM
2009 May 07 7:43 AM
Hi,
First declare the field as type d.
In the loop you check the data wiht offset values: v_datae+0(4) = 'YYYY',
v_date_4(2) = 'MM', v_date+6(2) = 'DD'.
If not then throw an error message.
Naveen M.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |