Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Help wit Title GUI???

Former Member
0 Likes
574

Some body know how to do a Title GUI in a MP Dynamic??

Regards

Message was edited by:

Jose Roberto Milan

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
525

SET TITLEBAR - Dynpro

Syntax

SET TITLEBAR title [OF PROGRAM prog]

[WITH text1 ... text9].

Extras:

1. ... OF PROGRAM prog

2. ... WITH text1 ... text9

Effect

During screen processing, 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 one screen 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.

A character-type 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 upper case is expected for title. 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-subrc Meaning

0 GUI title is set.

4 GUI title cannot be found.

Notes

The GUI title of the screen must be set before the PBO event. If no GUI title is set for a screen, 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.

The statement SET TITLEBAR contains a variant for the GUI status of lists.

Addition 1

... OF PROGRAM prog

Effect

By default, a GUI title defined in the current main program is used. When using the addition OF PROGRAM, a GUI title of the progam specified in prog can be set. A character-type data object is expected for prog that contains the name of a ABAP program in upper case.

Addition 2

... WITH text1 ... text9

Effect

When using the addition WITH, you can replace the placeholders of the GUI title with the contents of data objects text1 to text9. Data objects text1 to text9 must be of a character-type flat data type. 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 characters are replaced as follows:

The numbered placeholders "&i" are replaced with the contents of the data objects text1 to text9, whose names contain the same number i for the second digit.

The non-numbered placeholders "&" are replaced with the contents 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 successive "&" characters "&&" in the title bar are not replaced with the contents of text1 to text9, but with the character "&".

Example

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 contents p1 and p2.

DATA: title TYPE string,

prog TYPE string,

p1(10) TYPE c,

p2(10) TYPE c.

...

MODULE status_0100 OUTPUT.

...

title = 'TITLE_0100'.

prog = '...'.

p1 = '...'.

p2 = '...'.

SET TITLEBAR title OF PROGRAM prog WITH p1 p2.

...

ENDMODULE.

SET TITLEBAR

Syntax Forms

Set title of screen

1. SET TITLEBAR title [OF PROGRAM prog]

[WITH text1 ... text9].

Set title of list

2. SET TITLEBAR title [OF PROGRAM prog]

[WITH text1 ... text9].

SET TITLEBAR - Liste

Syntax

SET TITLEBAR title [OF PROGRAM prog]

[WITH text1 ... text9].

Extras:

1. ... OF PROGRAM prog

2. ... WITH text1 ... text9

Effect

During list processing, this statement sets the GUI title, specified in title, for the display window of the current list level and all following list levels up to the next statement SET TITLEBAR. The statement has - for the most part - the same syntax and semantics as for screens.

In contrast to the screens of dynpros, each list level automatically remains linked to the title set for it. When you return from the display of a higher list level to the display of a lower list level, the latter is displayed with the title that was set for it.

Addition 1

... OF PROGRAM prog

Addition 2

... WITH text1 ... text9

Effect

As for screens.

Message was edited by:

sunil kumar

Message was edited by:

sunil kumar

3 REPLIES 3
Read only

Former Member
0 Likes
526

SET TITLEBAR - Dynpro

Syntax

SET TITLEBAR title [OF PROGRAM prog]

[WITH text1 ... text9].

Extras:

1. ... OF PROGRAM prog

2. ... WITH text1 ... text9

Effect

During screen processing, 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 one screen 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.

A character-type 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 upper case is expected for title. 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-subrc Meaning

0 GUI title is set.

4 GUI title cannot be found.

Notes

The GUI title of the screen must be set before the PBO event. If no GUI title is set for a screen, 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.

The statement SET TITLEBAR contains a variant for the GUI status of lists.

Addition 1

... OF PROGRAM prog

Effect

By default, a GUI title defined in the current main program is used. When using the addition OF PROGRAM, a GUI title of the progam specified in prog can be set. A character-type data object is expected for prog that contains the name of a ABAP program in upper case.

Addition 2

... WITH text1 ... text9

Effect

When using the addition WITH, you can replace the placeholders of the GUI title with the contents of data objects text1 to text9. Data objects text1 to text9 must be of a character-type flat data type. 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 characters are replaced as follows:

The numbered placeholders "&i" are replaced with the contents of the data objects text1 to text9, whose names contain the same number i for the second digit.

The non-numbered placeholders "&" are replaced with the contents 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 successive "&" characters "&&" in the title bar are not replaced with the contents of text1 to text9, but with the character "&".

Example

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 contents p1 and p2.

DATA: title TYPE string,

prog TYPE string,

p1(10) TYPE c,

p2(10) TYPE c.

...

MODULE status_0100 OUTPUT.

...

title = 'TITLE_0100'.

prog = '...'.

p1 = '...'.

p2 = '...'.

SET TITLEBAR title OF PROGRAM prog WITH p1 p2.

...

ENDMODULE.

SET TITLEBAR

Syntax Forms

Set title of screen

1. SET TITLEBAR title [OF PROGRAM prog]

[WITH text1 ... text9].

Set title of list

2. SET TITLEBAR title [OF PROGRAM prog]

[WITH text1 ... text9].

SET TITLEBAR - Liste

Syntax

SET TITLEBAR title [OF PROGRAM prog]

[WITH text1 ... text9].

Extras:

1. ... OF PROGRAM prog

2. ... WITH text1 ... text9

Effect

During list processing, this statement sets the GUI title, specified in title, for the display window of the current list level and all following list levels up to the next statement SET TITLEBAR. The statement has - for the most part - the same syntax and semantics as for screens.

In contrast to the screens of dynpros, each list level automatically remains linked to the title set for it. When you return from the display of a higher list level to the display of a lower list level, the latter is displayed with the title that was set for it.

Addition 1

... OF PROGRAM prog

Addition 2

... WITH text1 ... text9

Effect

As for screens.

Message was edited by:

sunil kumar

Message was edited by:

sunil kumar

Read only

former_member15255
Active Participant
0 Likes
525

Hi,

Titles can be created thru SE41/SE51 its a menu painter tranaction normally this is used screen painter

regards

suresh krishnan

Read only

Former Member
0 Likes
525

Hi,

If you want add GUI Title Dynamic, try this:

1. Create all your title: Right click your mouse at your Program name, select Create, select GUI Titles.

2. On your MODULE STATUS, add code like this:


  CASE P_STATE .
    WHEN ''.   SET TITLEBAR 'Z_TB9100'.
    WHEN 'O'. SET TITLEBAR 'Z_TB9100_O'.
    WHEN 'S'. SET TITLEBAR 'Z_TB9100_D'.
    WHEN 'D'. SET TITLEBAR 'Z_TB9100_H'.
    WHEN 'C'. SET TITLEBAR 'Z_TB9100_C'.
  ENDCASE.

Notes:

1. P_STATE = Your condition for select the GUI Titles

2. Z_TB9100, Z_TB9100_O..etc = Your GUI Titles that you created at step 1.

Regards,