<?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: Function Keys on Selection-Screen in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-keys-on-selection-screen/m-p/5040646#M1172103</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;U would have given the name of the push botton whilw declaring right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just use that name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please revert if u have any doubts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Kk.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Jan 2009 10:25:02 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-01-06T10:25:02Z</dc:date>
    <item>
      <title>Function Keys on Selection-Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-keys-on-selection-screen/m-p/5040643#M1172100</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 used function keys in one of my report program.&lt;/P&gt;&lt;P&gt;Now, if some check box is checked in the customization that function should be displayed, otherwise shouldnot be displayed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I made use of "loop at screen" to make that application button invisible but i don't know the name of the button. I have given the name as same given while creating the button using "SSCRFIELDS".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there anyy other way to disable the button??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Yadesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 10:02:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-keys-on-selection-screen/m-p/5040643#M1172100</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T10:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: Function Keys on Selection-Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-keys-on-selection-screen/m-p/5040644#M1172101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;refer to demo program;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;demo_sel_screen_pushbutton&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 10:05:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-keys-on-selection-screen/m-p/5040644#M1172101</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T10:05:09Z</dc:date>
    </item>
    <item>
      <title>Re: Function Keys on Selection-Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-keys-on-selection-screen/m-p/5040645#M1172102</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;Please refer this below program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
report demo_sel_screen_pushbutton.

tables sscrfields.

data flag(1) type c.

selection-screen:
  begin of screen 500 as window title tit,
    begin of line,
      pushbutton 2(10) but1 user-command cli1,
      pushbutton 12(10) text-020 user-command cli2,
    end of line,
    begin of line,
      pushbutton 2(10) but3 user-command cli3,
      pushbutton 12(10) text-040 user-command cli4,
    end of line,
  end of screen 500.

at selection-screen.

  message i888(sabapdocu) with text-001 sscrfields-ucomm.
  case sscrfields-ucomm.
    when 'CLI1'.
      flag = '1'.
    when 'CLI2'.
      flag = '2'.
    when 'CLI3'.
      flag = '3'.
    when 'CLI4'.
      flag = '4'.
  endcase.

start-of-selection.

  tit  = 'Four Buttons'.
  but1 = 'Button 1'.
  but3 = 'Button 3'.

  call selection-screen 500 starting at 10 10.

  case flag.
    when '1'.
      write / 'Button 1 was clicked'.
    when '2'.
      write / 'Button 2 was clicked'.
    when '3'.
      write / 'Button 3 was clicked'.
    when '4'.
      write / 'Button 4 was clicked'.
    when others.
      write / 'No Button was clicked'.
  endcase.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jyothi CH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code Formatted by: Alvaro Tejada Galindo on Jan 7, 2009 4:00 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 10:20:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-keys-on-selection-screen/m-p/5040645#M1172102</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T10:20:38Z</dc:date>
    </item>
    <item>
      <title>Re: Function Keys on Selection-Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-keys-on-selection-screen/m-p/5040646#M1172103</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;U would have given the name of the push botton whilw declaring right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just use that name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please revert if u have any doubts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Kk.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 10:25:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-keys-on-selection-screen/m-p/5040646#M1172103</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T10:25:02Z</dc:date>
    </item>
    <item>
      <title>Re: Function Keys on Selection-Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-keys-on-selection-screen/m-p/5040647#M1172104</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;Just click F1 on that button and go to its technical settings, I hope you may get the function codes there or you can check GUI status for that selection screen by the menu button-&amp;gt;system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ameet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 10:28:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-keys-on-selection-screen/m-p/5040647#M1172104</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T10:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: Function Keys on Selection-Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-keys-on-selection-screen/m-p/5040648#M1172105</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;Refer this link.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://diocio.wordpress.com/2007/02/12/sap-add-buttons-to-selection-screen/" target="test_blank"&gt;http://diocio.wordpress.com/2007/02/12/sap-add-buttons-to-selection-screen/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Jay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 10:29:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-keys-on-selection-screen/m-p/5040648#M1172105</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T10:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: Function Keys on Selection-Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-keys-on-selection-screen/m-p/5040649#M1172106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;i am not using a button on the selection screen...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am using the button on the application toolbar of a selection screen without using any PF-status on the selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN: FUNCTION KEY 1,&lt;/P&gt;&lt;P&gt;                                  FUNCTION KEY 2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 10:31:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-keys-on-selection-screen/m-p/5040649#M1172106</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T10:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: Function Keys on Selection-Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-keys-on-selection-screen/m-p/5040650#M1172107</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 want to disable or inactive the application toolbar button not the button the selection screen depending on the customization....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am not using any pf-status for that selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Yadesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 10:37:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-keys-on-selection-screen/m-p/5040650#M1172107</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T10:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: Function Keys on Selection-Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-keys-on-selection-screen/m-p/5040651#M1172108</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;Your requirement can be solved with two approaches:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) simpler one is to use different GUI statuses depending on checkbox state&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
AT SELECTION-SCREEN OUTPUT.
refresh it_exclude.

if checkbox = 'X'.
  append 'BUTTON_FCODE'.
endif.

"you in turn swith on/off your desired button
CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
    EXPORTING
      p_status  = 'GUI_STATUS' 
      p_program = sy-repid
    TABLES
      p_exclude = it_exclude.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) as &lt;STRONG&gt;SELECTION-SCREEN FUNCTION KEY n&lt;/STRONG&gt; statement cannot be processed within PAI/PBO block you cannot set it dynamically like &lt;/P&gt;&lt;P&gt;&lt;DEL&gt;AT SELECTION-SCREEN.&lt;/DEL&gt;&lt;/P&gt;&lt;P&gt;&lt;DEL&gt;IF check = 'X' .&lt;/DEL&gt;&lt;/P&gt;&lt;P&gt;&lt;DEL&gt;SELECTION-SCREEN FUNCTION KEY n.&lt;/DEL&gt;&lt;/P&gt;&lt;P&gt;&lt;DEL&gt;ELSE.&lt;/DEL&gt;&lt;/P&gt;&lt;P&gt;"no selection button here&lt;/P&gt;&lt;P&gt;&lt;DEL&gt;ENDIF.&lt;/DEL&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Moreover you cannot change standard application toolbar of selection screen within &lt;STRONG&gt;Loop at screen&lt;/STRONG&gt; statement (this will only affect selection screen parameters not toolbar).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only way here is dynamically generate report's code. When checkbox is check what you do is &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: it_code type table of char72 with header line.

READ REPORT sy-repid INTO it_code.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then looping through the code table you either remove entry having &lt;STRONG&gt;SELECTION-SCREEN FUNCTION KEY n.&lt;/STRONG&gt; or add it to the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally you switch reports code with&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
INSERT REPORT sy-repid FROM it_code.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And execute new one with&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SUBMIT (sy-repid).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will ensure that new SELECTION-SCREEN parameters (or function keys in your case can be switched and report will be executed with new screen look). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nevetherless be carefull! You need to ensure that submit will not create and endless loop. ABAP Memory will help you here (exchange flags within program indicating whether program is executed for the first time or another one).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will give you some idea how to solve it.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 11:34:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-keys-on-selection-screen/m-p/5040651#M1172108</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2009-01-06T11:34:21Z</dc:date>
    </item>
    <item>
      <title>Re: Function Keys on Selection-Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-keys-on-selection-screen/m-p/5040652#M1172109</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;Thanks Marcin..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it was very helpful...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;yadesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2009 07:48:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-keys-on-selection-screen/m-p/5040652#M1172109</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-07T07:48:54Z</dc:date>
    </item>
  </channel>
</rss>

