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: 

reg: Gui Status

Former Member
0 Kudos

Hi,

In Gui Status

During creation of a button in application tool bar

when I type the button function and pressed enter

its asking for type of text static and dynamic.

how to use dynamic text in my programming

regards

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

for using the dynamic text, define a varaibel say lv_text in your program.

Then in the GUI status, when it asks for the dynamic text, provide the same variable name like <lv_scr>.

Now in the code, whenever you want to change the text, assign the correponding text to the variable and set the PF-Status.

Hope it helps,

Regards,

Himanshu

3 REPLIES 3

Former Member
0 Kudos

Hi,

for using the dynamic text, define a varaibel say lv_text in your program.

Then in the GUI status, when it asks for the dynamic text, provide the same variable name like <lv_scr>.

Now in the code, whenever you want to change the text, assign the correponding text to the variable and set the PF-Status.

Hope it helps,

Regards,

Himanshu

Former Member
0 Kudos

Hi,

Declare variabe in your program

data : lv_scr type GUI_DYNTXT.

Step 1:Go to the PF-STATUS button and edit. In the Function attributes, select the push Button 'Change Text Type'. In the 'Dynamic Function text' screen area, do an F4 to get the variable from the program/table where you will set the variable text for the button(In your case lv_scr). Save the PF-STATUS and come out.

Step 2: Before setting the PF-STATUS in the PBO, set the text in the variable you have chosen in step 1 above.

e.g.

if 1 eq 1

lv_scr = 'My New Text'.

else

lv_scr = 'My old text'.

endif.

SET PF-STATUS 'ZPF'.

Regards,

Raj.

0 Kudos

hi, thanks for your answer

can anyone provide an example code how to change the dynamically the text

regards

shreya