<?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: Disable a button in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/disable-a-button/m-p/5531356#M1263677</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can disable a particular button in the GUI status by excluding that function code while setting the PF status.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a perform with name pf_stat_set and write this following code and pass this perform name to the parameter i_callback_pf_status_set of the ALV function module&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM pf_stat_set USING extab TYPE slis_t_extab.&lt;/P&gt;&lt;P&gt; DATA: w_extab TYPE slis_extab.&lt;/P&gt;&lt;P&gt;w_extab-fcode = 'XXX'. "The function code of the button you want to exclude&lt;/P&gt;&lt;P&gt;APPEND w_extab TO extab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SET PF-STATUS 'YYYY' EXCLUDING extab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sowmya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Apr 2009 05:04:36 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-04-29T05:04:36Z</dc:date>
    <item>
      <title>Disable a button</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/disable-a-button/m-p/5531354#M1263675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a button in the application toolbar of the GUI status.I want to disable it and it should be enabled when a certain field in the database table is updated.Please suggest how can I do it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Apr 2009 04:00:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/disable-a-button/m-p/5531354#M1263675</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-29T04:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: Disable a button</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/disable-a-button/m-p/5531355#M1263676</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;TO disable a button use the logic below&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: it_ucomm TYPE TABLE OF sy-ucomm.

AT SELECTION-SCREEN OUTPUT.
  APPEND :
    'PRIN' TO it_ucomm,  "for print
    'SPOS' TO it_ucomm,	 "for SAVE
    'ONLI' TO it_ucomm,  "for execute
    'E' TO it_ucomm,    "for back
    'ENDE' TO it_ucomm,  "for exit
    'ECAN' TO it_ucomm.  "for cancel
 
  CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
    EXPORTING
      p_status  = sy-pfkey
    TABLES
      p_exclude = it_ucomm.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once the button is clicked, again the above logic can be altered to enable it again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mansi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Apr 2009 04:05:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/disable-a-button/m-p/5531355#M1263676</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-29T04:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: Disable a button</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/disable-a-button/m-p/5531356#M1263677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can disable a particular button in the GUI status by excluding that function code while setting the PF status.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a perform with name pf_stat_set and write this following code and pass this perform name to the parameter i_callback_pf_status_set of the ALV function module&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM pf_stat_set USING extab TYPE slis_t_extab.&lt;/P&gt;&lt;P&gt; DATA: w_extab TYPE slis_extab.&lt;/P&gt;&lt;P&gt;w_extab-fcode = 'XXX'. "The function code of the button you want to exclude&lt;/P&gt;&lt;P&gt;APPEND w_extab TO extab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SET PF-STATUS 'YYYY' EXCLUDING extab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sowmya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Apr 2009 05:04:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/disable-a-button/m-p/5531356#M1263677</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-29T05:04:36Z</dc:date>
    </item>
  </channel>
</rss>

