<?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 Re: push button in application tool bar in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/push-button-in-application-tool-bar/m-p/5241847#M1211218</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Write the below code in pbo.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;" Define a variable wa_fcode in top include 
  " Data : wa_fcode(10).
Case ok_code.
when 'FCODE'
wa_fcode = ok_code.
" This is for input Disable
loop at screen.
if screen-name = 'SCREENNAMES'.
screen-input = 0.
modify screen.
endloop.
endcase.

" This is for input enble
if wa_fcode = 'FCODE' "------function code of button in Application tool baar.
clear wa_fcode.
loop at screen.
if screen-name = 'SCREENNAMES'.
screen-input = 1.
modify screen.
endloop.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Always Learner&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Feb 2009 10:54:11 GMT</pubDate>
    <dc:creator>Mohamed_Mukhtar</dc:creator>
    <dc:date>2009-02-17T10:54:11Z</dc:date>
    <item>
      <title>push button in application tool bar</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/push-button-in-application-tool-bar/m-p/5241844#M1211215</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;i have a requirment on module pool.&lt;/P&gt;&lt;P&gt;i.e. keep one push button in application tollbar, if once select the push buttonn fields should be in change mode again select the same push button the fields should be in display mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how can it posible  please tell me................&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanku,&lt;/P&gt;&lt;P&gt;Rohini&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Feb 2009 10:46:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/push-button-in-application-tool-bar/m-p/5241844#M1211215</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-17T10:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: push button in application tool bar</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/push-button-in-application-tool-bar/m-p/5241845#M1211216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use set pf-status 'XYZ'.&lt;/P&gt;&lt;P&gt;In this u can create buttons for processing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Feb 2009 10:47:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/push-button-in-application-tool-bar/m-p/5241845#M1211216</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-17T10:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: push button in application tool bar</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/push-button-in-application-tool-bar/m-p/5241846#M1211217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use SET PF-STATUS command to create your own status and you can add push buttons in that status. After adding you can place the code using AT USER-COMMAND and SY-UCOMM .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Harris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Feb 2009 10:50:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/push-button-in-application-tool-bar/m-p/5241846#M1211217</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-17T10:50:30Z</dc:date>
    </item>
    <item>
      <title>Re: push button in application tool bar</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/push-button-in-application-tool-bar/m-p/5241847#M1211218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Write the below code in pbo.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;" Define a variable wa_fcode in top include 
  " Data : wa_fcode(10).
Case ok_code.
when 'FCODE'
wa_fcode = ok_code.
" This is for input Disable
loop at screen.
if screen-name = 'SCREENNAMES'.
screen-input = 0.
modify screen.
endloop.
endcase.

" This is for input enble
if wa_fcode = 'FCODE' "------function code of button in Application tool baar.
clear wa_fcode.
loop at screen.
if screen-name = 'SCREENNAMES'.
screen-input = 1.
modify screen.
endloop.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Always Learner&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Feb 2009 10:54:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/push-button-in-application-tool-bar/m-p/5241847#M1211218</guid>
      <dc:creator>Mohamed_Mukhtar</dc:creator>
      <dc:date>2009-02-17T10:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: push button in application tool bar</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/push-button-in-application-tool-bar/m-p/5241848#M1211219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;do like this..&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt; w_flag type i value 1.&lt;/P&gt;&lt;P&gt;set pf-status 'GUI'.&lt;/P&gt;&lt;P&gt;*Just double click on GUI and crete u r own button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at user-command.&lt;/P&gt;&lt;P&gt; case sy-ucomm.&lt;/P&gt;&lt;P&gt;   when 'PushButton'.&lt;/P&gt;&lt;P&gt;       if w_flag eq 1.&lt;/P&gt;&lt;P&gt;         perform change.&lt;/P&gt;&lt;P&gt;          w_flag = w_f;ag + 1.&lt;/P&gt;&lt;P&gt;       else.&lt;/P&gt;&lt;P&gt;         perform change.&lt;/P&gt;&lt;P&gt;       &lt;/P&gt;&lt;P&gt;  endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Feb 2009 10:55:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/push-button-in-application-tool-bar/m-p/5241848#M1211219</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-17T10:55:10Z</dc:date>
    </item>
    <item>
      <title>Re: push button in application tool bar</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/push-button-in-application-tool-bar/m-p/5241849#M1211220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i created set pf-status and cteated push butoton in application tool bar. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;but i can use that one push button to two different actions, i.e. change and display.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that is my problem &lt;/P&gt;&lt;P&gt;please help on that one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Rohini&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Feb 2009 10:55:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/push-button-in-application-tool-bar/m-p/5241849#M1211220</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-17T10:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: push button in application tool bar</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/push-button-in-application-tool-bar/m-p/5241850#M1211221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&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;Suppose the textboxes that you want to enable or diable are txt1 and txt2. Assue that when the program runs for the first time both are enabled. In the PBO of the screen under module&lt;/P&gt;&lt;P&gt;if sy-ucomm = 'CHANGE'.&lt;/P&gt;&lt;P&gt;if flag = 1.&lt;/P&gt;&lt;P&gt;loop at screen.&lt;/P&gt;&lt;P&gt;if screen-group1 = '111'.&lt;/P&gt;&lt;P&gt;screen-input = 0.&lt;/P&gt;&lt;P&gt;modify screen.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;flag = 0.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;loop at screen.&lt;/P&gt;&lt;P&gt;if screen-group1 = '111'.&lt;/P&gt;&lt;P&gt;screen-input = 0.&lt;/P&gt;&lt;P&gt;modify screen.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;flag = 1.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;both the textboxes must be assigned group1 as 111 in design mode (just double click on the element and on the element attribute enter 111 in the first group box.).&lt;/P&gt;&lt;P&gt;When you press CHANGE it will check the value of flag and accordingly change (enable/disable) and everytime it will toggle as the value of flag is changed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sachin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Feb 2009 11:03:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/push-button-in-application-tool-bar/m-p/5241850#M1211221</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-17T11:03:05Z</dc:date>
    </item>
    <item>
      <title>Re: push button in application tool bar</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/push-button-in-application-tool-bar/m-p/5241851#M1211222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create two buttons CHANGE and DISPLAY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if condition &lt;/P&gt;&lt;P&gt;set pf-status 'XYZ' excluding 'CHANGE' immediately.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;set pf-status 'XYZ' excluding 'DISPLAY' immediately.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Feb 2009 11:03:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/push-button-in-application-tool-bar/m-p/5241851#M1211222</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-17T11:03:55Z</dc:date>
    </item>
    <item>
      <title>Re: push button in application tool bar</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/push-button-in-application-tool-bar/m-p/5241852#M1211223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Use the below logic,&lt;/P&gt;&lt;P&gt;Say for example your field name is field and fcode of pbutton is PUSHBUTTON.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CASE ok_code
when 'PUSHBUTTON'.
    LOOP AT SCREEN.
      IF screen-name = 'FIELD'.
        IF screen-input = 1. " If it is 1
          screen-input = 0. " change it to 0
        ELSE. "Else if it is 0
          screen-input =  1. "Change it to 1
        ENDIF.
        MODIFY SCREEN.
      ENDIF.
      ...
  ENDCASE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Manoj Kumar P&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Feb 2009 11:11:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/push-button-in-application-tool-bar/m-p/5241852#M1211223</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-17T11:11:42Z</dc:date>
    </item>
  </channel>
</rss>

