Change Labels on screen at Run Time (Dialog programming)

By Shweta Chavan, Hitachi Consulting


In dialog programming we cannot change the labels on screen dynamically. Labels act as constants and its value cannot be changed at run time. This article will show you trick to change such label text at runtime.


Change label text on screen based on input selection. In this demo, we have Test as checkbox on selection screen. We will be displaying two ALVs on screen. So we have two container added on screen. We want to display text line which will show whether it is ‘TEST’ mode or not.  Text of this label will be chosen based on value of checkbox on selection screen.

Steps to Do

On required Screen add input/output field .

Set the properties of DYN_TEXT as below. Set Field as ‘Output only’.  

Now go to PBO section of Screen. Write down code on Module Status_1001.



Run program without test mode.







Run the program with Test mode.




Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image