Output Length

If you need only a part of the symbol value, or the output has to fit into a box or a field on the screen without overlapping the edges of this area, then you can use an output length specification to define how many bytes of the value should be copied.

Syntax

&symbol(length)&

If < symbol> has the value 123456789.

&symbol(3)& -> 123
&symbol(7)& -> 1234567

You can combine an output length specification with an offset specification. The specified length is then counted from the specified offset position.

&symbol+4(3)& -> 567

If a length specified is greater than the current length of the value, then spaces are appended to the symbol value.

You can use the character * to specify the length of a program symbol. The value of the symbol is then printed using the output length defined in the ABAP Dictionary.

Syntax

&symbol(*)&

The SYST-UNAME field contains the logon name of a user called Einstein . The Dictionary entry for this field contains an output length of 12.

&SYST-UNAME&... -> Einstein...
&SYST-UNAME(9)&... -> Einstein...
&SYST-UNAME(*)&... -> Einstein ...