cancel
Showing results for 
Search instead for 
Did you mean: 

Date Format in SMARTFORMS

Former Member
0 Kudos

Hi,

My requirement is to print different format for date based on the plant in SMARTFORMS.

I am trying to use

SET DATE MASK command that we use in script.

IT says no syntax error , still there is no effect in the output.

Does any one has any clues like how to change the date format in SMARTFORM.

Thanks,

Sudha

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

In OY01 transaction country specific format are set. Based up client requirement you can set these parameters.

If you want to use this settings, you can write following code in Smart-forms text editor.

/: SET COUNTRY 'GB'.  " GB is country code

*  &SY-DATUM&      

  

Regards,

Anil

Former Member
0 Kudos

for changing user master record display..

go to transaction su01 give the server user id> display> default--> change the date setting there...

regards

ranjith

Former Member
0 Kudos

Hi,

Please go Through this

Hope this is Enough

SmartForms System Fields

Within a form you can use the field string SFSY with its system fields. During form processing the system replaces these fields with the corresponding values. The field values come from the SAP System or are results of the processing.

System fields of Smart Forms

&SFSY-DATE&

Displays the date. You determine the display format in the user master record.

Reward Points, Dont Forget

Fareeda

Former Member
0 Kudos

hi,

you can write this code in the graphic part of the Smartform means by creating a text.

Here yon get the date format how u want.( by cocatenating)

Finaly display the date where u want.

data :lv_day(2) type n,

lv_month(2) type n,

lv_year(4) type n.

lv_year = is_ord_header-audat(4).

lv_month = is_ord_header-audat+4(2).

lv_day = is_ord_header-audat+6(2).

concatenate lv_month '/' lv_day '/' lv_year into w_date3.

hope this is useful 4 u.

pradeep

Former Member
0 Kudos

Sudha,

The SET DATE MASK command works in layout sets but not smartforms. You have to write your own code to format dates in smartforms.

Have not been able to find the equivalent of "Set Date mask" in Smartforms. As a work around created a program lines node and used the following code to convert the date. Its clugey but it does the trick.

This code will yield a 06-Feb-03 date format.

DATA: ZTEMP(9).

CLEAR: ZTEMP, ZDD, ZMMM, ZYYYY.

CALL FUNCTION 'CONVERSION_EXIT_IDATE_OUTPUT'

EXPORTING

INPUT = IS_DLV_DELNOTE-HD_GEN-CREA_DATE

IMPORTING

OUTPUT = ZTEMP.

ZDD = ZTEMP+3(2).

ZMMM = ZTEMP+0(3).

ZYYYY = ZTEMP+5(4).

Hope this Helps

Vinodh Balakrishnan

Former Member
0 Kudos

Hi,

I need the same solution.

How can I put this code in SmartForms?

Thanks.