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 formatting in smartforms

Former Member
0 Likes
1,927

Hi All,

I tried to use the date mask in smartform text element

as

/: SET DATE MASK = 'DD MM YYYY'

  • &SFSY-DATE&

Actually my requirement is to write the date in the above format, but the date mask is not working.

pls advice to go ahead, instead of using programming line to format the date.

Thanks in advance,

chand basha

3 REPLIES 3
Read only

FredericGirod
Active Contributor
0 Likes
1,009

you could use the write command to set the good mask in a C variable. After you just have to write this variable ..

Regards

Frédéric

Read only

Former Member
0 Likes
1,009

Refer this link

http://www.sap-img.com/smartforms/sap-smart-forms.htm

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.

&SFSY-TIME&

Displays the time of day in the form HH:MM:SS.

&SFSY-PAGE&

Inserts the number of the current print page into the text. You determine the format of the page number (for example, Arabic, numeric) in the page node.

&SFSY-FORMPAGES&

Displays the total number of pages for the currently processed form. This allows you to include texts such as'Page x of y' into your output.

&SFSY-JOBPAGES&

Contains the total page number of all forms in the currently processed print request.

&SFSY-WINDOWNAME&

Contains the name of the current window (string in the Window field)

&SFSY-PAGENAME&

Contains the name of the current page (string in the Page field)

&SFSY-PAGEBREAK&

Is set to 'X' after a page break (either automatic [Page 7] or command-controlled [Page 46])

&SFSY-MAINEND&

Is set as soon as processing of the main window on the current page ends

&SFSY-EXCEPTION&

Contains the name of the raised exception. You must trigger your own exceptions, which you defined in the form interface, using the user_exception macro (syntax: user_exception <exception name >).

indly reward points for the answers which helped u.

Read only

Former Member
0 Likes
1,009

Hi Chand,

Instead of doing this in a text element, do this inside a "programming lines" just before you call the text element...

which means this programming lines will be the element before your text element.

Try and let me know.

Kindly reward points to replies that answered ur question.

Prabhu.