cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding smart forms urgent

Former Member
0 Kudos

Hi,

I want to change the date format in smartforms.Now it is like mm/dd/yyyy and I want to display it like dd march yyyy.

how can I do this.............

thanks and Regards,

shravan

Accepted Solutions (1)

Accepted Solutions (1)

former_member588853
Active Contributor
0 Kudos

hi,

take the date and write a subroutine in global definitions -- > form routines..

date = mm/dd/yyyy.

dd = date+0(2).

mm = date+3(2).

use function module MONTH_NAMES_GET, pass the month and get the name

into mmname

yy = date+6(4).

now dd mmname yy separated by space.

rewards if useful..

regards,

nazeer

concatenate

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Shravan,

Check this info.

<b>Date formatting</b>

The following ABAP code demonstrates a number of ways to format a SAP date value:

  • Using the WRITE statement

***************************

data: gd_date(10). "field to store output date

  • Converts SAP date from 20020901 to 01.09.2002

write sy-datum to gd_date dd/mm/yyyy.

  • Converts SAP date from 20020901 to 01.09.02

write sy-datum to gd_date dd/mm/yy.

  • Using data manipulation techniques

************************************

data: gd_date(8). "field to store output date

  • Converts SAP date from 20010901 to 01092001

gd_date(2) = sy-datum+6(2).

gd_date2(2) = sy-datum4(2).

gd_date+4(4) = sy-datum(4).

Hope this resolves your query.

<b>Reward all the helpful answers.</b>

Regards

Former Member
0 Kudos

HI,

This function module <b>CONVERSION_EXIT_IDATE_OUTPUT </b> will give the date format DDMMMYYYY.

see the documentation of this function module.

if not, you can use GET_MONTHS_NAME to get the month name then cancatiante the month name with the date

Regards

Sudheer