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

Problem in displaying Date

Former Member
0 Likes
679

Dear Friends,

In one of my dialogs (screens) I have incorporated a text-field for Date. When I make an entry in this field it gets displayed correctly in the desired format e.g. 20.01.2007, but when I call the value of date from the table it gets displayed as 20.07.20. (displaying in yyyymmdd, with periods).

Pls provide me a clue for solving this.

Regards,

Alok.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
635

Hi Alok,

You can use following code to get the date in proper format.

DATA: VA_FINAL(10), VA_DATE(8).

VA_DATE = 20072001.

concatenate va_date6(2) va_date4(2) va_date(4) into VA_FINAL separated by '.'.

Hope this will work.

Darshan

5 REPLIES 5
Read only

Former Member
0 Likes
635

use this conversion routine.

CONVERSION_EXIT_PDATE_INPUT.

test this function module in se37 & see whether it solves ur problem.

Read only

Former Member
0 Likes
635

Hi,

You should use the table reference for the dialog screen field, that should solve your problem.

Thanks,

Ketan

Read only

Former Member
0 Likes
635

make type of field as sy-datum.

u will also get calender on pressing f4 and it will take and display date in proper format

see if this information is userful

*reward pouints if info is useful

Read only

Former Member
0 Likes
635

hi alok,

the internal format of the date is some what different than wt ever u enter and refer the field to db date field or ref with sy-datum.and here the system intenal format will be 20071031

thanks

mahe

Read only

Former Member
0 Likes
636

Hi Alok,

You can use following code to get the date in proper format.

DATA: VA_FINAL(10), VA_DATE(8).

VA_DATE = 20072001.

concatenate va_date6(2) va_date4(2) va_date(4) into VA_FINAL separated by '.'.

Hope this will work.

Darshan