SAP SET TITLEBAR DYNPRO ABAP Statements



Get Example source ABAP code based on a different SAP table
  


ID DYNPRO%
• SET TITLEBAR - dynpro ABAP Statement

SET TITLEBAR, Dynpro
Short Reference

ABAP_SYNTAX
SET TITLEBAR title $[OF PROGRAM prog$]
$[WITH text1 ... text9$].

ABAP Addition
1 ... OF PROGRAM prog
2 ... WITH text1 ... text9

What does it do?
When dynpros are processed, this statement specifies the GUI title specified in title for the subsequent screens. The title is displayed in the title bar from the next sending of a screen layout until the end of the program or until the next SET TITLEBAR statement. The name of the current GUI title is displayed in the system field sy-title.
title expects a character-like data object that contains the name of a GUI title of the main program of the current program group or of the program specified in prog in uppercase letters. If the title does not exist, sy-subrc is set to 4 and the word SAP is displayed in the title bar.
System Fields sy-subrcMeaning 0GUI title has been set. 4 GUI title was not found.



Latest notes:

The GUI title of the dynpro must be set at the latest at the PBO event. If no GUI title is set for a dynpro, the word SAP is displayed in the title bar.
The title bar can contain a maximum of 70 characters. A title that exceeds this limit after the replacement of placeholders is truncated to the right.
In standard selection screens, the statement SET PF-STATUS can be used at PBO time. In selection screens defined using SELECTION-SCREEN BEGIN OF SCREEN, the addition TITLE of this statement should be used instead.
The statement SET TITLEBAR contains a variant for the GUI status of lists.
ABAP_HINT_END
• OF PROGRAM SET TITLEBAR - dynpro

ABAP Addition

What does it do?
By default, a GUI title defined in the current main program is used. When using the addition OF PROGRAM, a GUI title of the program specified in prog can be set. prog expects a character-like data object that contains the name of an ABAP program in uppercase letters.
• WITH SET TITLEBAR - dynpro

ABAP Addition

What does it do?
When using the addition WITH, the placeholders of the GUI title can be replaced by the formatted content of data objects text1 to text9. Data objects text1 to text9 can have the same data type as a source field of the statement WRITE TO and are formatted according to the predefined formats. The placeholders of the GUI title can be defined in the form or i, where i can be a number between 1 and 9. The replacement process works as follows:
The numbered placeholders i are replaced with the formatted content of the data objects text1 to text9, whose names contain the same digit i in the second place.
The non-numbered placeholders are replaced with the content of the remaining data objects text1 to text9 according to their order.
If no data object is specified for a placeholder, it is represented by a blank character. Two consecutive characters in the title bar are not replaced with the content of text1 to text9 , but with the character .



Latest notes:

If a GUI title is to be translated into other languages, the numbered placeholder i should be used, since the structure of the sentence can change.
ABAP_HINT_END



Example ABAP Coding

In the following example, the GUI title TITLE_0100 of the program specified in prog is set in a PBO module, where the placeholders 1 and 2 of the title are replaced with the formatted content p1 and p2.
ABEXA 00662
ABAP_EXAMPLE_END

Return to menu