<?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 SELECTION-SCREEN. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-screen/m-p/1456829#M215900</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have one problem with selection-screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two t-code for one program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if I use one t-code, it need to declare &lt;/P&gt;&lt;P&gt;selection-screen function key 1 &lt;/P&gt;&lt;P&gt;and if I use other t-code it doesn't need &lt;/P&gt;&lt;P&gt;selection-screen function key 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way to declare selection-screen dynamically?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I have one thing I can't understand.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used initialization for this problem like this source.&lt;/P&gt;&lt;P&gt;&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; IF SY-TCODE NE 'ZPP00041'.&lt;/P&gt;&lt;P&gt;    SELECTION-SCREEN FUNCTION KEY 1.&lt;/P&gt;&lt;P&gt;    MOVE TEXT-001 TO SSCRFIELDS-FUNCTXT_01.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But selection-screen was declared even though sy-tcode was 'ZPP00041', &lt;/P&gt;&lt;P&gt;but MOVE TEXT-001 TO SSCRFIELDS-FUNCTXT_01 didn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why does it work? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pleas give me some answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Jun 2006 01:48:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-06-16T01:48:54Z</dc:date>
    <item>
      <title>Dynamic SELECTION-SCREEN.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-screen/m-p/1456829#M215900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have one problem with selection-screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two t-code for one program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if I use one t-code, it need to declare &lt;/P&gt;&lt;P&gt;selection-screen function key 1 &lt;/P&gt;&lt;P&gt;and if I use other t-code it doesn't need &lt;/P&gt;&lt;P&gt;selection-screen function key 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way to declare selection-screen dynamically?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I have one thing I can't understand.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used initialization for this problem like this source.&lt;/P&gt;&lt;P&gt;&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; IF SY-TCODE NE 'ZPP00041'.&lt;/P&gt;&lt;P&gt;    SELECTION-SCREEN FUNCTION KEY 1.&lt;/P&gt;&lt;P&gt;    MOVE TEXT-001 TO SSCRFIELDS-FUNCTXT_01.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But selection-screen was declared even though sy-tcode was 'ZPP00041', &lt;/P&gt;&lt;P&gt;but MOVE TEXT-001 TO SSCRFIELDS-FUNCTXT_01 didn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why does it work? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pleas give me some answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jun 2006 01:48:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-screen/m-p/1456829#M215900</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-16T01:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic SELECTION-SCREEN.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-screen/m-p/1456830#M215901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jus a quick reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps you could do it this was.&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;  move sy-tcode to var1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at selection screen output&lt;/P&gt;&lt;P&gt;  IF var1 NE 'ZPP00041'.&lt;/P&gt;&lt;P&gt;   SELECTION-SCREEN FUNCTION KEY 1.&lt;/P&gt;&lt;P&gt;     MOVE TEXT-001 TO SSCRFIELDS-FUNCTXT_01.&lt;/P&gt;&lt;P&gt;  ENDIF&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jun 2006 01:53:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-screen/m-p/1456830#M215901</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-16T01:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic SELECTION-SCREEN.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-screen/m-p/1456831#M215902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about instead of using the SELECTION-SCREEN FUNCTION KEY statement, use a gui status.  Just create a gui status with your button in  it.  Set the gui status depending on the tcode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0006.

tables: sscrfields.

parameters: p_check.


at selection-screen output.
  if sy-tcode ne 'ZPP00041'.
    set pf-status 'SEL'.
  else.
    set pf-status 'SEL' excluding 'BUTTION'.
  endif.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here SEL is the gui status and BUTTON is the fcode tied to the button that you created on the gui-status.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jun 2006 01:55:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-screen/m-p/1456831#M215902</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-06-16T01:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic SELECTION-SCREEN.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-screen/m-p/1456832#M215903</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;The Selection screen is defined prior to INITIALIZATION wherein you are only passing text to the button based on tcode. If you want to deactivate the button you have to loop at the table sscrfields during the at selection-screen event. similar to how you loop at screen &amp;amp; make fields display only etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Suresh Datti&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jun 2006 02:03:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-screen/m-p/1456832#M215903</guid>
      <dc:creator>suresh_datti</dc:creator>
      <dc:date>2006-06-16T02:03:59Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic SELECTION-SCREEN.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-screen/m-p/1456833#M215904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for reply!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;KLL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried what you adviced but it doesn't work&lt;/P&gt;&lt;P&gt;It makes some error message like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Within FORM routines and function modules, the SELECTION-SCREEN	statement is not allowed.		&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rich Heilman &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used pf-status but it always shows 'EXCEL' button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN OUTPUT.&lt;/P&gt;&lt;P&gt;  IF SY-TCODE NE 'ZPP00041'.&lt;/P&gt;&lt;P&gt;    SET PF-STATUS 'STATUS02'.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    SET PF-STATUS 'STATUS02' EXCLUDING 'EXCEL'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suresh Datti .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you tell me some more?&lt;/P&gt;&lt;P&gt;I can't understand exactly.&lt;/P&gt;&lt;P&gt;If you show some source, it would be very helpful!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Sang Sin Bae&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jun 2006 02:46:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-screen/m-p/1456833#M215904</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-16T02:46:29Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic SELECTION-SCREEN.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-screen/m-p/1456834#M215905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sang,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its possible to define selection screen dynamically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You define the selection screen field in no-display mode while declaring the selection screen field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now in at selection-screen output event,&lt;/P&gt;&lt;P&gt;use following code snippet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at screen.&lt;/P&gt;&lt;P&gt;IF SY-TCODE = 'ZPP00041'.&lt;/P&gt;&lt;P&gt; if screen-name = 'whatever in your case'&lt;/P&gt;&lt;P&gt;screen-active = '0'.&lt;/P&gt;&lt;P&gt;screen-invisible = '1'.&lt;/P&gt;&lt;P&gt;modify screen.&lt;/P&gt;&lt;P&gt;endif&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it will give you some idea!!&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Vikram&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls reward for helpful replies!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jun 2006 04:29:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-screen/m-p/1456834#M215905</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-16T04:29:21Z</dc:date>
    </item>
  </channel>
</rss>

