<?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 Dynamic Text on Pushbutton in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-text-on-pushbutton/m-p/2080924#M431665</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a push button in PF-STATUS being used in a module pool screen..&lt;/P&gt;&lt;P&gt;Now, I want that depending on various conditions, the text on the pushbutton gets changed.e.g. If say condition1 is true, then button text = 'TEST' else button text = 'TEST1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me out on how to achieve this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Points are guaranteed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Himanshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Apr 2007 06:15:29 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-09T06:15:29Z</dc:date>
    <item>
      <title>Dynamic Text on Pushbutton</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-text-on-pushbutton/m-p/2080924#M431665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a push button in PF-STATUS being used in a module pool screen..&lt;/P&gt;&lt;P&gt;Now, I want that depending on various conditions, the text on the pushbutton gets changed.e.g. If say condition1 is true, then button text = 'TEST' else button text = 'TEST1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me out on how to achieve this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Points are guaranteed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Himanshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Apr 2007 06:15:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-text-on-pushbutton/m-p/2080924#M431665</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-09T06:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Text on Pushbutton</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-text-on-pushbutton/m-p/2080925#M431666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check the answer by kesi rahul in this thread&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="2941933"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Raja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Apr 2007 06:31:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-text-on-pushbutton/m-p/2080925#M431666</guid>
      <dc:creator>athavanraja</dc:creator>
      <dc:date>2007-04-09T06:31:19Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Text on Pushbutton</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-text-on-pushbutton/m-p/2080926#M431667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aggarwal,&lt;/P&gt;&lt;P&gt;                    Read this ...... i.e., putting text on the pushbuttons dynamically....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pushbuttons have a label - the text that you specify statically in the attributes - and can also have icons.&amp;lt;b&amp;gt; If you set the Output field attribute for a pushbutton, you can also set its text dynamically in the ABAP program.&amp;lt;/b&amp;gt; To do this, you must create a field in the ABAP program with the same name as the pushbutton. You must then assign the required text to the field before the screen is displayed. You can also assign icons to dynamic texts on pushbuttons by including the icon code in the text. The icon codes are all contained in the include program &amp;lt;ICON&amp;gt;. For example, the ICON_CANCEL () icon has the code @0W@.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In each PAI event, the function code, as long as it is not empty, is placed in the system field SYST-UCOMM (SY-UCOMM) and assigned to the OK_CODE field. Empty function codes are placed in neither the SY-UCOMM field nor the OK_CODE field. The function code of a pushbutton is empty if you have not entered it in the corresponding attribute in the Screen Painter. Before you can work with the OK_CODE field, you must assign a name to it in the Screen Painter. For further information, refer to Reading Function Codes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The main way of allowing users to choose functions that trigger the PAI event and send function codes to the program is through the GUI status. The main reason is one of space - the GUI status can contain many more functions than you would be able to place on the screen as pushbuttons.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, you should use pushbuttons in the following cases:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Very important and frequently-used function codes that should appear on the screen as well as in the GUI status, for example, the Execute, Display, and Change functions on the initial screen of the ABAP Editor. &lt;/P&gt;&lt;P&gt;Applications that only use pushbuttons, where function codes in the GUI status make no sense - for example, in a calculator application. The function codes of the corresponding pushbuttons have no corresponding function in the GUI status elements, and only exist as attributes of screen elements. &lt;/P&gt;&lt;P&gt;When you have a GUI status that is used for a large number of screens, but use it on screens that have a particular function that is not required anywhere else. In this case, you should place it on the screen as a pushbutton.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Hope your problem is solved.&lt;/P&gt;&lt;P&gt;Reward if helpful,&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;V.Raghavender.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Apr 2007 06:44:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-text-on-pushbutton/m-p/2080926#M431667</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-09T06:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Text on Pushbutton</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-text-on-pushbutton/m-p/2080927#M431668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;u can achive u r requirement with &amp;lt;b&amp;gt;EXCLUDING&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CHECK OUT THIS SAP HELP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET PF-STATUS - Screen &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax &lt;/P&gt;&lt;P&gt;SET PF-STATUS status [OF PROGRAM prog] [EXCLUDING fcode]. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Extras: &lt;/P&gt;&lt;P&gt;1. ... OF PROGRAM prog &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. ... EXCLUDING fcode &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect: &lt;/P&gt;&lt;P&gt;During screen processing, this statement defines the GUI status defined in status for the subsequent screen layouts. The components of the set status are active in the user interface from the next time a screen layout is sent, and remain active until the end of the program or until the next SET PF-STATUS statement. The name of the current GUI status can be read from the system field sy-pfkey . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For status, a character-type data object must be specified that contains either the name of the GUI status of the main program of the current program group, or the program specified in upper case in prog, or it only contains blank characters. If the status is not available, an empty status is displayed, in which no control elements are active except for the predefined system functions. Of these functions, only the Enter key, to which an empty function code is assigned in this case, triggers the event PAI. If the data object status contains only blank characters, the standard list status is set and the additions have no effect. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;If a switch is assigned to an element of the GUI status in the Menu Painter, this controls the activation of this element. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 1 &lt;/P&gt;&lt;P&gt;...  OF PROGRAM prog &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect: &lt;/P&gt;&lt;P&gt;By default, a GUI status defined in the current main program is used. The addition OF PROGRAM can be used to set the GUI status of the program specified in prog. A character-type data object that contains the name of the ABAP program in upper case is expected for prog. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 2 &lt;/P&gt;&lt;P&gt;... EXCLUDING fcode &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect: &lt;/P&gt;&lt;P&gt;The addition EXCLUDING can be used to deactivate functions of the set GUI status. An inactive function cannot be selected in the user interface. For fcode, either a character-type data object or an internal table with a flat character-type data type can be specified. The functions, whose function codes are contained in the field or in the rows of the internal table, are deactivated. Only one function code can be specified for each row of the table. The codes are not case-sensitive. Function codes specified in fcode, for which there is no function in the GUI status, are ignored. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes: &lt;/P&gt;&lt;P&gt;The GUI status of a screen must be set at the latest during the event PBO. If no GUI status is set for a screen, the empty status described above is used. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the set GUI status contains dynamic function texts, the function texts are read from the assigned global data objects of the program in which the GUI status is defined. If these do not exist, question marks (?) are displayed. For dynamic function texts, an explicitly specified program prog is loaded into the current program group if it does not already exist in the internal session. This enables access its global data objects. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The statement SET PF-STATUS has a variant for the GUI status of lists. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example: &lt;/P&gt;&lt;P&gt;Setting the GUI status STATUS_0100 of the main program in a PBO module, whereby the functions with the function codes "CHANGE" and "SAVE" are deactivated. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA fcode TYPE TABLE OF sy-ucomm. &lt;/P&gt;&lt;P&gt;... &lt;/P&gt;&lt;P&gt;MODULE status_0100 OUTPUT. &lt;/P&gt;&lt;P&gt;  APPEND 'CHANGE'  TO fcode. &lt;/P&gt;&lt;P&gt;  APPEND 'SAVE' TO fcode. &lt;/P&gt;&lt;P&gt;  SET PF-STATUS 'STATUS_0100' EXCLUDING fcode. &lt;/P&gt;&lt;P&gt;ENDMODULE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REWARD IF USEFUL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REGARDS.&lt;/P&gt;&lt;P&gt;SANTHOSH REDDY&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Apr 2007 06:54:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-text-on-pushbutton/m-p/2080927#M431668</guid>
      <dc:creator>SantoshKallem</dc:creator>
      <dc:date>2007-04-09T06:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Text on Pushbutton</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-text-on-pushbutton/m-p/2080928#M431669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess it is not possible to change the text dynamically, correct me if I am wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, I can see a work-around. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe you can have different buttons and based on your logic, may render them visible or invisible.&lt;/P&gt;&lt;P&gt;This can be done by looping at the sceen and setting the &amp;lt;b&amp;gt;invisible&amp;lt;/b&amp;gt; attribute corresponding to the field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more info:&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbab6f35c111d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbab6f35c111d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Divya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Apr 2007 06:55:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-text-on-pushbutton/m-p/2080928#M431669</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-09T06:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Text on Pushbutton</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-text-on-pushbutton/m-p/2080929#M431670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can all possible Buttons , and you can display them which ever you want according to the condition that has attained using Exclude f code addition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Senthil N S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Apr 2007 06:57:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-text-on-pushbutton/m-p/2080929#M431670</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-09T06:57:16Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Text on Pushbutton</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-text-on-pushbutton/m-p/2080930#M431671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Himnashu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Declare variabe in your program &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : lv_scr type GUI_DYNTXT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 2: Before setting the PF-STATUS in the PBO, set the text in the variable you have chosen in step 1 above.&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;if 1 eq 1&lt;/P&gt;&lt;P&gt; lv_scr = 'My New Text'.&lt;/P&gt;&lt;P&gt;else &lt;/P&gt;&lt;P&gt; lv_scr = 'My old text'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET PF-STATUS 'ZPF'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Apr 2007 07:00:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-text-on-pushbutton/m-p/2080930#M431671</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-09T07:00:54Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Text on Pushbutton</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-text-on-pushbutton/m-p/2080931#M431672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Harish K Srivastava&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Apr 2007 07:02:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-text-on-pushbutton/m-p/2080931#M431672</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-09T07:02:32Z</dc:date>
    </item>
  </channel>
</rss>

