<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Change Button text ? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/change-button-text/m-p/3308931#M792518</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got a button in my custom transaction in ABAP. I want to change the text/Label of the button dynamically based on some conditions. How to achieve the same. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Navneeth K.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Feb 2008 14:05:11 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-06T14:05:11Z</dc:date>
    <item>
      <title>Change Button text ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/change-button-text/m-p/3308931#M792518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got a button in my custom transaction in ABAP. I want to change the text/Label of the button dynamically based on some conditions. How to achieve the same. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Navneeth K.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2008 14:05:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/change-button-text/m-p/3308931#M792518</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-06T14:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: Change Button text ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/change-button-text/m-p/3308932#M792519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Declare a global variable in TOP include as gv_pb_text(20). And then have one push button in the screen with name gv_pb_text and then mark it as Output only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your PBO, fill gv_pb_text based on your conditions,&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
IF gv_button_clicked EQ 'X'. 
gv_pb_text = 'Start'(001).
ELSE.
gv_pb_text = 'Stop'(002).
ENDIF.

In your USER_COMMAND Module in PAI (or whatever your Fcode handling module is), 

WHEN 'STARTSTOP'. "Assuming this pb's function code
IF gv_button_clicked EQ 'X'.
CLEAR gv_button_clicked.
ELSE.
gv_button_clicked = 'X'.
ENDIF.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Vasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2008 14:09:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/change-button-text/m-p/3308932#M792519</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-06T14:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: Change Button text ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/change-button-text/m-p/3308933#M792520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Data:   gs_toolbar           TYPE stb_button,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      handle_toolbar&lt;/P&gt;&lt;P&gt;          FOR EVENT toolbar OF cl_gui_alv_grid&lt;/P&gt;&lt;P&gt;              IMPORTING e_object e_interactive,&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;METHOD to handle_toolbar&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;  METHOD handle_toolbar.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;append a separator to normal toolbar&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    CLEAR gs_toolbar.&lt;/P&gt;&lt;P&gt;MOVE your text TO gs_toolbar-TEXT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    APPEND gs_toolbar TO e_object-&amp;gt;mt_toolbar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Harsha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2008 14:17:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/change-button-text/m-p/3308933#M792520</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-06T14:17:08Z</dc:date>
    </item>
  </channel>
</rss>

