05-20-2008 5:32 AM
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
05-20-2008 5:36 AM
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
05-20-2008 5:36 AM
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
05-20-2008 5:40 AM
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.
05-20-2008 6:17 AM
hi, thanks for your answer
can anyone provide an example code how to change the dynamically the text
regards
shreya