Syntax documentationOutput Options for Field Contents

You can use the Formatting Options to adapt the value of a field before printing it. You can enter the relevant parameters directly behind the field name. Many of these options are abbreviated to a single letter, which has to be given as a capital letter. Some of the options can be combined.

General Notes

The formatting options are not suitable for all data types of a field (for example, you do not need exponential representation for character fields). You must distinguish between numeric fields and character fields. Note also that the value of a field cannot take up more than 255 characters.

Numerical Fields
  • The system first evaluates the length (<length>), if specified.

  • If no length is specified, the system displays the value in its overall length.

  • The trailing blank indicates a positive sign. To suppress it, use the formatting option S.

  • Any offset (<offset>) specified is ignored.

Sequence of evaluation: (<length>), sign to the left(<), Japanese date (L), suppress blanks (C), right-justified display (R), insert fillers (F).

Character Fields

By default, the system displays the value of a field in its overall length, but truncates trailing blanks.

Sequence of evaluation: suppress blanks (C), <offset> and (<length>), right-justified display (R), insert fillers (F).

Overview

Formatting Options for Fields

Syntax

Meaning

&feld+<offset>&

Skips offsets (<offset>) in the field value (character fields only). If the offset is greater than the length of the value, nothing is displayed.

&field((<length>)&

Sets the output length to <length>.

&field(*)&

If the field is defined by a Data Dictionary type, Smart Forms sets the output length to the value specified there.

&field(S)&

Suppresses the sign

&field(<)&

Displays the sign to the left of the number

&field(.<nat.number>)&

Limits output of decimal places to <nat.number>

&field(E<nat.number>)&

Displays the field value with the fixed exponent <nat.number>. The mantissa is adapted to this exponent by shifting the decimal point and inserting zeros.

&field(T)&

Suppresses thousand indicators when displaying fields of types DEC, CURR, INT, and QUAN.

&field(Z)&

Suppresses leading zeros in numbers

&field(I)&

Suppresses display of initial values

&field(K)&

Deactivates a conversion routine specified in the Data Dictionary.

&field(R)&

Right-justified display. Use this option only when specifying an output length as well.

&field(F<filler>)&

Replaces left-justified blanks in the value by the fill character <filler>.

&field(L)&

Use the L option to convert a date field to a local date and to print it in the appropriate format. The date is then formatted using the edit mask JPDAT.

Since this representation uses Japanese characters, use it in the Japanese version of the SAP system only.

&field(C)&

The system takes the field value as a sequence of words separated by blanks. Option C shifts these words to the left and leaves only one blank inbetween as separator. Any leading blanks are suppressed. This effect corresponds to that of the ABAP statement CONDENSE.