Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Date format validation

Former Member
0 Likes
1,064

Hi All,

I hav one typical requirement DD/MM/YY is my format do i have any function module to convert date into this format and i hav validate date for / / both slahes after dd and mm apart from that yy alos i hav to validate can you please help me

4 REPLIES 4
Read only

Former Member
0 Likes
628

use the write statement

data v_datum(8).

write sy-datum to v_datum DD/MM/YY.

Regards,

ravi

Read only

Former Member
0 Likes
628

hi monahar,

DATE_CHECK_PLAUSIBILITY :

Check to see if a date is in a valid format for SAP. Works well when validating dates being passed in from other systems

you may use a FM for this :

refer to the link for FM's:

http://www.erpgenie.com/abap/functions.htm

With luck,

pritam.

Read only

Former Member
0 Likes
628

hi,

do this way ....


data : v_date(10),
         v_output(8).

v_date = sy-datum.

concatenate v_date+6(2) v_date+4(2) v_date+2(2) into v_output separated by '/'.

write : v_output. 

Read only

Former Member
0 Likes
628

I am not sure if you are working SAP scripts or Reports or anything else..

Try using SET DATE MASK = 'DD/MM/YY'.

Let me know if this helps or you need further help.

Thanks-