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 cOnversion

Former Member
0 Likes
947

Hi All,

Iam working on ALV report .

which function module should be used to convert <b>20070530 to 30.05.2007</b> .

Thanks in Advance

Regards,

Anant

1 ACCEPTED SOLUTION
Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
924

Hi

<b>g_date = sy-datum.

CONCATENATE g_date6(2) '.' g_date4(2) '.' g_date+0(4) INTO g_date.

write:\ g_date.</b>

Regards,

Sree

6 REPLIES 6
Read only

dev_parbutteea
Active Contributor
0 Likes
924

HI,

you can use : concatenate date6(2) date4(2) date(4) into temp seperated by '.'

Read only

Former Member
0 Likes
924

Hi ,

DATA : date(10) VALUE '00/00/0000'.

PERFORM date_conv USING itdate CHANGING date.

FORM date_conv USING date CHANGING date1.

MOVE date0(4) TO date16(4).

MOVE date4(2) TO date13(2).

MOVE date6(2) TO date10(2).

ENDFORM.

You can remove the speartors / if you dont want.

Regards,

Ram

Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
925

Hi

<b>g_date = sy-datum.

CONCATENATE g_date6(2) '.' g_date4(2) '.' g_date+0(4) INTO g_date.

write:\ g_date.</b>

Regards,

Sree

Read only

Former Member
0 Likes
924

Hi ,

DATA : date(10) VALUE '00/00/0000'.

PERFORM date_conv USING itdate CHANGING date.

FORM date_conv USING date CHANGING date1.

MOVE date0(4) TO date16(4).

MOVE date4(2) TO date13(2).

MOVE date6(2) TO date10(2).

ENDFORM.

You can remove the speartors / if you dont want.

And aslo see CONVERSION_EXIT_PDATE_OUTPUT

Regards,

Ram

Read only

Former Member
0 Likes
924

Hi,

in alv field catalog for date field set no_zero = 'X'. after this again clear this.

it will display the date as normal

no need to use any FM

Regards

Shiva

Read only

Former Member
0 Likes
924

Hi ananth,

use the below snippet in ur code

CONDENSE temp_date NO-GAPS.

STRLEN( temp_date ) EQ 10.

date0(4) = temp_date6(4).

date4(2) = temp_date3(2).

date6(2) = temp_date0(2).

Regards