Skip to Content
0
Former Member
Feb 24, 2009 at 10:14 AM

problem with data format in the screen

52 Views

Hi friends,

Iam facing aproblem with date formats in for the fields on the screen.

i have FRMDATE field on the screen in which i want default date as ist date of the current year ie : 01/01/2009

and i have on more field TODATE in which i need last date of the current year ie : 31/12/2009

bot iam facing the data formats.

ie : iam getting differnr date formats.

code :

data :

l_date type sy-datum,

l_str_dat(10) type c.

l_date = sy-datum.

( Here in l_date iam getting as 20090224 )

l_date+4(4) = '0101'.

( now here after chaning i getting it as 20090101 )

write l_date to l_str_date.

( in l_str_dat iam getting it as 01/01/2009 )

FRMDATE = l_str_date .

( here in FRMDATE iamgetting it as 01/01/20 )

on screen in the field iam getting it as FRMDATE = 1//20/01/0

Can any one correct it.

Regards

Priyanka