Application Development 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: 

How to make the title of screen dynamic in ABAP.

Former Member
0 Kudos

Hi experts,

I want to make the title of screen dynamic like:-

--> i have an initial screen in which program takes some input files..and having a screen title as "INPUT FILE" with a read button.

--> after clicking on read button it reads that file and shows on screen that exel file...here this screen title remains the same as "INPUT FILE" but i want it as "READ FILE". now this screen again having a button as write file.

-- > Now after clicking on this write button this file gets write in to SAP system here i want my screen title as"WRITTEN FILE".

Please help me and tell me the way to do it.

Regards,

Depque.

5 REPLIES 5

Former Member
0 Kudos

Hi,

You nee dto change the PF status title based on your conditions.

Assign teh desired titles.

PedroGuarita
Active Contributor
0 Kudos

Use instruction :

SET TITLEBAR 'xxx'.

former_member204025
Participant
0 Kudos

Hi.

Ypu should use a flag as soon as someone clic on the button, in order to keep a value.

Then in PBO Module you should ask for the value of this flag

if w_flag = abap_true ('X')

set tittlebar number01.

else.

set titlebar number02.

endif.

Please let us to know if this could help you.

Regards,

Gabriela

awin_prabhu
Active Contributor
0 Kudos

I guess you are using 3 separate screens.

If so, then just put & in the title bar while creating it instead of hardcoding it as INPUT FILE.

& is a placeholder for dynamic title texts.

Then set it in program like below,


DATA: text(50) TYPE c.  " Declare it as global in TOP include
"PBO of first screen
text = 'INPUT FILE'.
SET TITLEBAR 'ZTEST' WITH text.
"PBO of second screen
text = 'READ FILE'.
SET TITLEBAR 'ZTEST' WITH text.
"PBO of third screen
text = 'WRITTEN FILE'.
SET TITLEBAR 'ZTEST' WITH text.

former_member628395
Active Participant
0 Kudos

Hi,

If i have understood your requirement properly. You want to change the screen title after you perform the particular action(s).

When you define the title, you can define it like Current Process & .

In the PBO when you write the statement, SET TITLEBAR 'ABC' , add the WITH addition and pass the text to it.

e.g SET TITLEBAR 'ABC' with 'My Process'.

This should work.

Regards,

Sagar