Show TOC

System FieldsLocate this document in the navigation structure

Within a form you can use the field string SFSY with its system fields. The field content is either taken from the SAP system or is created while the form is being processed. For example, you can use the system field SFSY-DATE to display today's date on your form.

The following general rules apply to system fields:

  • You can display the value of any system field 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

Meaning

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

You can use this symbol to insert into the text the page number that the current page will have when printed. 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.

Caution

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 output jobs, this can mean a very large amount of memory.