<?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: How to generate dynamic selection-screen? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-generate-dynamic-selection-screen/m-p/5536736#M1264722</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;dear you can use this code for refrence &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PARAMETERS : but1 RADIOBUTTON GROUP rad1 USER-COMMAND clmd1,
             but2 RADIOBUTTON GROUP rad1 ,  "USER-COMMAND clmd1,
             filename LIKE rlgrap-filename.

INITIALIZATION.

AT SELECTION-SCREEN OUTPUT.

  LOOP AT SCREEN.

    IF screen-name = '%_FILENAME_%_APP_%-TEXT' AND but2 = 'X'.

      screen-active = '0'.
      screen-required = '0'.
      MODIFY SCREEN.
    ENDIF.


    IF screen-name = 'FILENAME' AND but2 = 'X'.
      screen-active = '0'.
      screen-required = '0'.
      screen-name = ''.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR filename.
  CALL FUNCTION 'F4_FILENAME'
    EXPORTING
      program_name  = syst-cprog
      dynpro_number = syst-dynnr
    IMPORTING
      file_name     = filename.

START-OF-SELECTION.

  IF but1 = 'X'.
    fname = filename.
    PERFORM update_zappr_tmpt .
  ELSEIF but2 = 'X'.
    PERFORM modify_zappr_hrq .
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Apr 2009 12:10:37 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-04-16T12:10:37Z</dc:date>
    <item>
      <title>How to generate dynamic selection-screen?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-generate-dynamic-selection-screen/m-p/5536733#M1264719</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; &lt;/P&gt;&lt;P&gt;I have two radio buttons on selection-screen. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If user-selects the one, Then under the radio button another parameter should be displayed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if he selects another radio button, the previous parameter should not  be displayed and another parameter should appear in the selection screen under the second radio button. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help by giving the code to solve this problem? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, &lt;/P&gt;&lt;P&gt;Vamshi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2009 12:01:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-generate-dynamic-selection-screen/m-p/5536733#M1264719</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-16T12:01:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate dynamic selection-screen?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-generate-dynamic-selection-screen/m-p/5536734#M1264720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have to add modiff id with those parameter and code in at selection-screen event to modify the screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;


AT SELECTION-SCREEN OUTPUT.

loop at screen.
  if screen-name eq 'PNPS$MSL'.
    screen-active = 0.
  endif.
  modify screen.
endloop.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2009 12:07:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-generate-dynamic-selection-screen/m-p/5536734#M1264720</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-16T12:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate dynamic selection-screen?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-generate-dynamic-selection-screen/m-p/5536735#M1264721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vamsi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By using AT SELECTION-SCREEN OUTPUT and creating the MOdif id for the selection screen parameter you can achieve the dynamic selection scree..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
AT SELECTION-SCREEN OUTPUT.
* Modify selection screen as per the radio buttons selected.
  PERFORM modify_sel-screen.
 
FORM modify_sel-screen .

* If radio button - process in range of STR's selected, display STR
* range and Date range as input
  IF p_rb1 EQ c_x.
    LOOP AT SCREEN.
      IF screen-group1 = c_ir2.
        screen-active  = c_0.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
* If radio button - process from excel is selected, give option for
* user to upload file
  ELSEIF p_rb2 EQ c_x.
    LOOP AT SCREEN.
      IF screen-group1 = c_ir1.
        screen-active  = c_0.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ENDIF.
ENDFORM.                    " MODIFY_SEL-SCREEN

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;see the below example....&lt;/P&gt;&lt;P&gt;copy the below code you can come to know how the dynamic selection screen happens..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

*----------------------------------------------------------------------*
*                   S E L E C T I O N  S C R E E N                     *
*----------------------------------------------------------------------*
* Selection criteria
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: p_rb1  RADIOBUTTON GROUP gr1 USER-COMMAND com1 DEFAULT 'X',
                                         "Process STR's in date range
           p_rb2  RADIOBUTTON GROUP gr1. "Process STR's from Excel
SELECTION-SCREEN BEGIN OF BLOCK c1 WITH FRAME .
PARAMETERS : p_apover TYPE zcpeg_fg_related-pl_version OBLIGATORY.
                                                            "PJ1031008
SELECTION-SCREEN END OF BLOCK c1.
SELECTION-SCREEN END OF BLOCK b1.

* Display date range to process STR's
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
SELECT-OPTIONS: s_banfn FOR w_preq MODIF ID ir1,
                                    "Purchase requisition number
                s_lfdat FOR w_lfdat MODIF ID ir1.
"Date range
SELECTION-SCREEN END OF BLOCK b2.

* Option for uploading file to process STR's
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
PARAMETERS: p_file TYPE rlgrap-filename MODIF ID ir2. "File name
SELECTION-SCREEN END OF BLOCK b3.



AT SELECTION-SCREEN OUTPUT.
* Modify selection screen as per the radio buttons selected.
  PERFORM modify_sel-screen.
 
FORM modify_sel-screen .

* If radio button - process in range of STR's selected, display STR
* range and Date range as input
  IF p_rb1 EQ c_x.
    LOOP AT SCREEN.
      IF screen-group1 = c_ir2.
        screen-active  = c_0.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
* If radio button - process from excel is selected, give option for
* user to upload file
  ELSEIF p_rb2 EQ c_x.
    LOOP AT SCREEN.
      IF screen-group1 = c_ir1.
        screen-active  = c_0.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ENDIF.
ENDFORM.                    " MODIFY_SEL-SCREEN

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prabhudas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2009 12:07:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-generate-dynamic-selection-screen/m-p/5536735#M1264721</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-16T12:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate dynamic selection-screen?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-generate-dynamic-selection-screen/m-p/5536736#M1264722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;dear you can use this code for refrence &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PARAMETERS : but1 RADIOBUTTON GROUP rad1 USER-COMMAND clmd1,
             but2 RADIOBUTTON GROUP rad1 ,  "USER-COMMAND clmd1,
             filename LIKE rlgrap-filename.

INITIALIZATION.

AT SELECTION-SCREEN OUTPUT.

  LOOP AT SCREEN.

    IF screen-name = '%_FILENAME_%_APP_%-TEXT' AND but2 = 'X'.

      screen-active = '0'.
      screen-required = '0'.
      MODIFY SCREEN.
    ENDIF.


    IF screen-name = 'FILENAME' AND but2 = 'X'.
      screen-active = '0'.
      screen-required = '0'.
      screen-name = ''.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR filename.
  CALL FUNCTION 'F4_FILENAME'
    EXPORTING
      program_name  = syst-cprog
      dynpro_number = syst-dynnr
    IMPORTING
      file_name     = filename.

START-OF-SELECTION.

  IF but1 = 'X'.
    fname = filename.
    PERFORM update_zappr_tmpt .
  ELSEIF but2 = 'X'.
    PERFORM modify_zappr_hrq .
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2009 12:10:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-generate-dynamic-selection-screen/m-p/5536736#M1264722</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-16T12:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate dynamic selection-screen?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-generate-dynamic-selection-screen/m-p/5536737#M1264723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ankith, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your reply is help ful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But can u please explain me  IF screen-name = '%_FILENAME_%_APP_%-TEXT'  what is this screen-name value?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, &lt;/P&gt;&lt;P&gt;Vamshi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2009 12:24:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-generate-dynamic-selection-screen/m-p/5536737#M1264723</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-16T12:24:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate dynamic selection-screen?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-generate-dynamic-selection-screen/m-p/5536738#M1264724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Solved . Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2009 13:50:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-generate-dynamic-selection-screen/m-p/5536738#M1264724</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-16T13:50:02Z</dc:date>
    </item>
  </channel>
</rss>

