SET


Basic form 2

SET TITLEBAR f.

Addition



... WITH g1 g2 ... gn

Effect

Sets a screen title

You use the Menu Painter to edit these program-driven screen headers. If there is a text for the three-character title, it is displayed in the title bar of the next screen.
If the program is in an external subroutine, the name of the main program is used as the program name. In contrast, a function module sets a title belonging to the function group.
A set title remains valid within a transaction until you call SET TITLEBAR again.
After SET TITLEBAR , the system field SY-TITLE contains the current screen header.
SY-TITLE can be up to 70 characters long.

Note

Here, the contents of the field f are converted to a value of type C (according to the standard conversion rules) and the desired title is found using this value. It is therefore advisable to use a field similar to type C (e.g. type C or N) to avoid unwanted conversions. For example, a field of type I with a value of 9 would give the key ' 9 '.

Addition

... WITH g1 g2 ... gn

Effect

Allows you to build up to 9 parameters into the header, using the variables &1 to &9. Starting on the left, all & characters are replaced by the corresponding parameter (i.e. the first & is replaced by the first parameter specified under WITH and so on). If you do not want a & character to be replaced, you must specify it twice ( && ).
If a parameter is missing for one of the title variables, it is replaced by a blank.
On account of the upper limit of 70 characters (the length of SY-TITLE , &1 characters can be lost when replacing with WITH .

Example

DATA: PAR1(4) VALUE 'par1', PAR2(4) VALUE 'par2'. SET TITLEBAR 'ABC' WITH PAR1 PAR2 'par3'.

If the title "ABC" contains

"Title & &1 &3 intermediate text & &2 && & &4"

the above example would produce a title bar with the text

"Title par1 par1par3 intermediate text par2 par2 & par3 " .

Index
© SAP AG 1996