<?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: selection-screen function key  dynamically ? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-function-key-dynamically/m-p/1911842#M379537</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You mention about the 'Documentation' button. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, SE38 is a dialog program so this why it is easy to do. You are writing a report program. You could have the pushbutton on the screen itseld instead of the status bar. You should then be able to use LOOP AT SCREEN to hide. Here is some code to put a pushbutton on a screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INCLUDE &amp;lt;list&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF LINE.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN PUSHBUTTON 01(35) garment&lt;/P&gt;&lt;P&gt;  USER-COMMAND garment.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INITIALIZATION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  PERFORM f_setup_pushbutton_text USING icon_execute_object text-s01&lt;/P&gt;&lt;P&gt;                                  CHANGING garment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM f_setup_pushbutton_text USING    p_icon&lt;/P&gt;&lt;P&gt;                                      p_text&lt;/P&gt;&lt;P&gt;                             CHANGING p_result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: l_result(50).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'ICON_CREATE'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            name                  = p_icon&lt;/P&gt;&lt;P&gt;            text                  = p_text&lt;/P&gt;&lt;P&gt;            add_stdinf            = space&lt;/P&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;            RESULT                = l_result&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            EXCEPTIONS&lt;/P&gt;&lt;P&gt;            icon_not_found        = 1&lt;/P&gt;&lt;P&gt;            outputfield_too_short = 2&lt;/P&gt;&lt;P&gt;            OTHERS                = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc EQ 0. ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  p_result = l_result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                               " F_SETUP_PUSHBUTTON_TEXT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Feb 2007 10:28:51 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-02-16T10:28:51Z</dc:date>
    <item>
      <title>selection-screen function key  dynamically ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-function-key-dynamically/m-p/1911841#M379536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wonder if it is possible to have a function key dynamically appearing on the selection screen of an ABAP. For example the button for reading the documentation of an ABAP is shown dynamically only if there is a documenation available.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried several methods at SELECTION-SCREEN OUTPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- SET PF-STATUS EXCLUDING 'FC0x' : no reaction&lt;/P&gt;&lt;P&gt;- Blanking the icon via CLEAR: SSCRFIELDS-FUNCTXT: Result blank button&lt;/P&gt;&lt;P&gt;- In LOOP AT SCREEN nothing can be found concerning function keys.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume that the crucial point is the SELECTION-SCREEN FUNCTION KEY statement, which generates the button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx for your help&lt;/P&gt;&lt;P&gt;Rabanus Diehl&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Feb 2007 10:24:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-function-key-dynamically/m-p/1911841#M379536</guid>
      <dc:creator>former_member517</dc:creator>
      <dc:date>2007-02-16T10:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: selection-screen function key  dynamically ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-function-key-dynamically/m-p/1911842#M379537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You mention about the 'Documentation' button. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, SE38 is a dialog program so this why it is easy to do. You are writing a report program. You could have the pushbutton on the screen itseld instead of the status bar. You should then be able to use LOOP AT SCREEN to hide. Here is some code to put a pushbutton on a screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INCLUDE &amp;lt;list&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF LINE.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN PUSHBUTTON 01(35) garment&lt;/P&gt;&lt;P&gt;  USER-COMMAND garment.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INITIALIZATION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  PERFORM f_setup_pushbutton_text USING icon_execute_object text-s01&lt;/P&gt;&lt;P&gt;                                  CHANGING garment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM f_setup_pushbutton_text USING    p_icon&lt;/P&gt;&lt;P&gt;                                      p_text&lt;/P&gt;&lt;P&gt;                             CHANGING p_result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: l_result(50).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'ICON_CREATE'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            name                  = p_icon&lt;/P&gt;&lt;P&gt;            text                  = p_text&lt;/P&gt;&lt;P&gt;            add_stdinf            = space&lt;/P&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;            RESULT                = l_result&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            EXCEPTIONS&lt;/P&gt;&lt;P&gt;            icon_not_found        = 1&lt;/P&gt;&lt;P&gt;            outputfield_too_short = 2&lt;/P&gt;&lt;P&gt;            OTHERS                = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc EQ 0. ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  p_result = l_result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                               " F_SETUP_PUSHBUTTON_TEXT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Feb 2007 10:28:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-function-key-dynamically/m-p/1911842#M379537</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-16T10:28:51Z</dc:date>
    </item>
    <item>
      <title>Re: selection-screen function key  dynamically ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-function-key-dynamically/m-p/1911843#M379538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rabanus,&lt;/P&gt;&lt;P&gt;  check the sample program: demo_sel_screen_status.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Feb 2007 10:29:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-function-key-dynamically/m-p/1911843#M379538</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-16T10:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: selection-screen function key  dynamically ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-function-key-dynamically/m-p/1911844#M379539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;S u can do in selection screen Function key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TABLES SSCRFIELDS. 
... 
SELECTION-SCREEN FUNCTION KEY 1. 
... 

INITIALIZATION. 
  MOVE 'My text' TO SSCRFIELDS-FUNCTXT_01. 
  ... 

AT SELECTION-SCREEN. 
  IF SSCRFIELDS-UCOMM = 'FC01'. 
    ... 
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN FUNCTION KEY n. &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;Activates a pushbutton (one of a maximum of 5) in the application toolbar of the selection screen (where n is between 1 and 5). &lt;/P&gt;&lt;P&gt;At runtime, you must insert the text for the pushbutton into the appropriate ABAP Dictionary field SSCRFIELDS-FUNCTXT_01 ... SSCRFIELDS-FUNCTXT_05. If you want to assign an icon to the pushbutton, you must fill SSCRFIELDS-FUNCTXT_01 ... SSCRFIELDS-FUNCTXT_05 using the structure SMP_DYNTXT. &lt;/P&gt;&lt;P&gt;The function code placed in field SSCRFIELDS-UCOMM is 'FC01' ... 'FC05'. You can query this function code in the AT SELECTION-SCREEN event or the PAI routine in the database access program SAPDBldb. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Within the selection include : Additions FOR NODE node , FOR TABLE dbtab , and ID id.FOR TABLE dbtab und ID id. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes &lt;/P&gt;&lt;P&gt;If a pushbutton (ex. FUNCTION KEY 2,) is already defined in the selection include, the system returns a syntax error if you try to include an equivalent statement in your report. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can create your own pushbuttons directly on the screen using the PUSHBUTTON addition. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer the documentation available by pressign F1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Feb 2007 10:29:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-function-key-dynamically/m-p/1911844#M379539</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-16T10:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: selection-screen function key  dynamically ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-function-key-dynamically/m-p/1911845#M379540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Quoting Martin Shinks:&lt;/P&gt;&lt;P&gt;&amp;gt;You are writing a report program. You could have the pushbutton on the screen itseld &amp;gt;instead of the status bar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all, thanks for your answer. I don't want to use a push-button on the selection-screen itself because the feature behind the button is to be implemented in several ABAPs where it should look and work in the same way without disturbing the individual selection-screens.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rabanus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Feb 2007 12:09:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-function-key-dynamically/m-p/1911845#M379540</guid>
      <dc:creator>former_member517</dc:creator>
      <dc:date>2007-02-16T12:09:38Z</dc:date>
    </item>
  </channel>
</rss>

