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. For example, you can use the system field SFSY-DATE to display the current date in the form.

The following rules apply for system fields:

  • You can display the values of any system fields in the form
  • You are not allowed to assign values to system fields (in program lines nodes)
  • You can query all system fields (for example, in conditions) except SFSY-FORMPAGES and SFSY-JOBPAGES . You can query SFSY-FORMPAGES only within final windows, SFSY-JOBPAGES not at all.

System Fields of Smart Forms

Field Name

Description

&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. See also: Creating Pages.

&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. See also: Creating Pages.

&SFSY-JOBPAGES&

Contains the total page number of all forms in the currently processed print request. See also: Creating Pages.

&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-XSF&

Smart Forms sets this flag ( SFSY-XSF = 'X' ), if you want to print the form in XSF format or HTML format. On the Conditions tab of a node, you can use this field to suppress output that is intended only for these output formats (for example, pushbuttons).

&SFSY-COPYCOUNT&

Queries whether the original is printed or which number the copy has. COPYCOUNT = 1 : orginal, COPYCOUNT = 2 : first copy; COPYCOUNT = 3: second copy, and so on.

&SFSY-COPYCOUNT0&

Queries whether the original is printed or which number the copy has. COPYCOUNT = 0 : orginal, COPYCOUNT = 1 : first copy; COPYCOUNT = 2 : second copy, and so on.

SFSY-SUBRC

Return value that you can query in program lines nodes. This enables you to react dynamically to error situations during output. Up to now, this field can be used only for include texts and text modules:

  • SFSY-SUBRC = 0 :Text module or include text found and printed
  • SFSY-SUBRC = 4 :Text module or include text not found

SFSY-USERNAME

Logon name of the user who prints the form.

When using the fields &SFSY-FORMPAGES& or &SFSY-JOBPAGES& , you must keep all output pages in the main memory til the end of the form or the print job to allow these fields to be replaced with their respective values. For large forms or print jobs, this may require a huge amount of memory space.