cancel
Showing results for 
Search instead for 
Did you mean: 

Smartforms - Date format

Former Member
0 Kudos

Hallo Gurus,

is it possible, in smartforms, to use a command like the old "set date mask" of sapscript?

for example: Invoice Smartformsa convert date into the format of the nation of the partner, while I need to use european format without changing customizing for US.

Thanks!

Mick

Accepted Solutions (1)

Accepted Solutions (1)

Sandra_Rossi
Active Contributor
0 Kudos

The following processes 2 lines, the first line remains unchanged, the second line is changed to "Today is June 05, 2008":


DATA ls_header TYPE thead.
DATA ls_line TYPE tline.
DATA lt_line TYPE TABLE OF tline.
ls_header-tdspras = sy-langu.
ls_header-tdlinesize = 72.
ls_line-tdformat = '/:'.
ls_line-tdline = 'SET DATE MASK = ''MMMM DD, YYYY'''.
append ls_line to lt_line.
ls_line-tdformat = '*'.
ls_line-tdline = 'Today is &SY-DATUM&'.
append ls_line to lt_line.
CALL FUNCTION 'TEXT_SYMBOL_REPLACE'
  EXPORTING 
    HEADER = ls_header
  TABLES 
    LINES = lt_line.
READ TABLE lt_line INTO ls_line INDEX 2.
WRITE : / ls_line-tdline.

Former Member
0 Kudos

Hallo Sandra,

thanks for your kind answer.

I solved the problem by writing a command line -set country "IT"- into smartforms inizialization,

Mick

Sandra_Rossi
Active Contributor
0 Kudos

Great, thx for the feedback. Note that it SET COUNTRY already existed in SAPscript technology. This is used to choose the day/month/year sequence and the separator between them (this is stored in T005X). While SET DATE MASK is to write the month as a word (and more), it works in SAPscript, but is ignored in Smart Form. It's why I thought your question was about a workaround to use SET DATE MASK in smart form.

Answers (0)