2008 Jun 24 11:16 PM
Hi Experts,
Is there any way by which i can change the push button text dynamically in module pool progrramming.
Thanks
Yogesh Gupta
2013 Jun 27 11:25 AM
In PBO,
IN PBO you can give text and in PAI you can clear it ,its simple
IF gd_print EQ 'X'.
gd_text = text-001.
ELSE.
gd_text = text-002.
else.
ENDIF.
In USER_COMMAND Module in PA I,
WHEN 'PRINT'. "
IF gd_print EQ 'X'.
CLEAR gd_print.
ELSE.
gd_print = 'X'.
ENDIF.
2008 Jun 25 2:39 AM
Hi Yogesh,
You can change the text on a pushbutton dynamically. To do this, you must have set the Output field attribute in the Screen Painter to active, and created a global field with the same name in your ABAP program. Because the Screen Painter field and the program field have the same name, any changes to the field contents will be immediately visible on the screen (similarly to input/output fields).
You can write similar code in ur PBO.
g_button1 = 'TEST'.
if v_click eq 'X'.
loop at screen.
if screen-name eq 'G_BUTTON1'.
g_button1 = 'NAVEEN'.
clear v_click.
endif.
endloop.
endif.
Initially TEST will be displayed on pushbutton. based on ur action it will be changed to NAVEEN.
Hope it clarifies your doubt.
Let me know if you need any other inputs.
Regards,
Naveen Veshala
2008 Jun 25 3:56 AM
Hi,
Have u check thease theards?
https://forums.sdn.sap.com/click.jspa?searchID=13290629&messageID=3484969
https://forums.sdn.sap.com/click.jspa?searchID=13290629&messageID=2236614
Regards
Kiran Sure
2009 Jan 22 9:44 PM
2013 Jun 25 8:13 AM
Please check this post, you will definitely get it..
http://theabap.blogspot.in/2013/06/changing-label-of-push-button.html
2013 Jun 27 11:25 AM
In PBO,
IN PBO you can give text and in PAI you can clear it ,its simple
IF gd_print EQ 'X'.
gd_text = text-001.
ELSE.
gd_text = text-002.
else.
ENDIF.
In USER_COMMAND Module in PA I,
WHEN 'PRINT'. "
IF gd_print EQ 'X'.
CLEAR gd_print.
ELSE.
gd_print = 'X'.
ENDIF.