<?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: Generate Selection Screen as Popup dynamically in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/generate-selection-screen-as-popup-dynamically/m-p/4657438#M1095839</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;I looking for a way to create my own dynamic search help selection popup.(like fm F4IF_FIELD_VALUE_REQUEST).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I have to generate the selection screen at runtime an display this as a poup.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas to solve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Oct 2008 05:54:33 GMT</pubDate>
    <dc:creator>former_member301120</dc:creator>
    <dc:date>2008-10-24T05:54:33Z</dc:date>
    <item>
      <title>Generate Selection Screen as Popup dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generate-selection-screen-as-popup-dynamically/m-p/4657432#M1095833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello to all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there a way to generate a selection screen popup at runtime dynamically?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any guide, that explains how "generate dynpro" has to be used?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Oct 2008 07:35:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generate-selection-screen-as-popup-dynamically/m-p/4657432#M1095833</guid>
      <dc:creator>former_member301120</dc:creator>
      <dc:date>2008-10-17T07:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Selection Screen as Popup dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generate-selection-screen-as-popup-dynamically/m-p/4657433#M1095834</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;This there is an option with key word 'Window staring and window ending'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or Creat the screen and call the screen when ever you want the selection screen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Oct 2008 07:38:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generate-selection-screen-as-popup-dynamically/m-p/4657433#M1095834</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-17T07:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Selection Screen as Popup dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generate-selection-screen-as-popup-dynamically/m-p/4657434#M1095835</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;I know how to call a dynpro as popup.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But my problem is, that I have to generate this selection on runtime, as then all fields are known like Tx SE16.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Oct 2008 07:42:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generate-selection-screen-as-popup-dynamically/m-p/4657434#M1095835</guid>
      <dc:creator>former_member301120</dc:creator>
      <dc:date>2008-10-17T07:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Selection Screen as Popup dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generate-selection-screen-as-popup-dynamically/m-p/4657435#M1095836</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;you can create a selection screen as a pop up using this code. Here 200 is just a arbitary screen number which i have given.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZSDSDSD.&lt;/P&gt;&lt;P&gt;tables : vbak.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF SCREEN 200 AS WINDOW.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS : s_vbeln FOR vbak-vbeln,&lt;/P&gt;&lt;P&gt;                 s_ernam  FOR vbak-ernam,&lt;/P&gt;&lt;P&gt;                 s_erdat  FOR vbak-erdat.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF SCREEN 200.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL SELECTION-SCREEN '0200' STARTING AT 10 10.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Oct 2008 07:57:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generate-selection-screen-as-popup-dynamically/m-p/4657435#M1095836</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-17T07:57:27Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Selection Screen as Popup dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generate-selection-screen-as-popup-dynamically/m-p/4657436#M1095837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Rajneesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm looking for a way where the selection-fields could be defined at runtime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Oct 2008 08:01:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generate-selection-screen-as-popup-dynamically/m-p/4657436#M1095837</guid>
      <dc:creator>former_member301120</dc:creator>
      <dc:date>2008-10-17T08:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Selection Screen as Popup dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generate-selection-screen-as-popup-dynamically/m-p/4657437#M1095838</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;you can define(not create)  multiple selection screens and then call them according to your data or conditions . for example,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables : vbak.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data flg type c value 'T'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF SCREEN 200 AS WINDOW.&lt;/P&gt;&lt;P&gt; SELECT-OPTIONS : s_vbeln FOR vbak-vbeln,&lt;/P&gt;&lt;P&gt;                 s_ernam  FOR vbak-ernam.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF SCREEN 200.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF SCREEN 201 AS WINDOW.&lt;/P&gt;&lt;P&gt; SELECT-OPTIONS : s_vbeln1 FOR vbak-vbeln.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF SCREEN 201.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if flg = 'Y'.&lt;/P&gt;&lt;P&gt;CALL SELECTION-SCREEN '0200' STARTING AT 10 10.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;  CALL SELECTION-SCREEN '0201' STARTING AT 10 10.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Oct 2008 08:24:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generate-selection-screen-as-popup-dynamically/m-p/4657437#M1095838</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-17T08:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Selection Screen as Popup dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generate-selection-screen-as-popup-dynamically/m-p/4657438#M1095839</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;I looking for a way to create my own dynamic search help selection popup.(like fm F4IF_FIELD_VALUE_REQUEST).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I have to generate the selection screen at runtime an display this as a poup.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas to solve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Oct 2008 05:54:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generate-selection-screen-as-popup-dynamically/m-p/4657438#M1095839</guid>
      <dc:creator>former_member301120</dc:creator>
      <dc:date>2008-10-24T05:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Selection Screen as Popup dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generate-selection-screen-as-popup-dynamically/m-p/4657439#M1095840</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;So you mean to say that u need of POP up window with the field and the search help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Oct 2008 06:03:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generate-selection-screen-as-popup-dynamically/m-p/4657439#M1095840</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-24T06:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Selection Screen as Popup dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generate-selection-screen-as-popup-dynamically/m-p/4657440#M1095841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but the number of fields is only known at runtime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Oct 2008 09:11:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generate-selection-screen-as-popup-dynamically/m-p/4657440#M1095841</guid>
      <dc:creator>former_member301120</dc:creator>
      <dc:date>2008-10-24T09:11:55Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Selection Screen as Popup dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generate-selection-screen-as-popup-dynamically/m-p/4657441#M1095842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Christian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at the moment I don´t have a solution for you but since 1 hour, I have nearly the same problem...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps I can give you an idea to solve it, but I am not sure if it works. I must test it for my own...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My plan is to build 1 Reports and a functionality to build a dynamic report, for example a persistent abap class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt; Report A: executes the class (FM or something else) which generates the sourcecode of the dynamic Report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt; The Class reads the metadata which fields are required on the dynamic selection screen (in my case from a database table)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt; Then I build a source code with correct syntax into an internal table, which contains the code of the selection-screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt; With this source code i generate a persistent report ( statement: insert report )...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt; Then Report A calls the generated Report via SUBMIT statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt; for the transport of the data from the selection screen of the "dynamic" Report to Report A &lt;/P&gt;&lt;P&gt;    I would try to do use the ABAP-Memory...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt; perhaps it is necessary to generate an "empty" dynamic report with contains an selection screen &lt;/P&gt;&lt;P&gt;    so that the compiler can check the submit statement. Then the "dynamic" report becomes overwritten&lt;/P&gt;&lt;P&gt;    on execution of Report A.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope, this works &lt;span class="lia-unicode-emoji" title=":monkey_face:"&gt;🐵&lt;/span&gt;  &lt;/P&gt;&lt;P&gt;I would try it this way and post it later (next days) if it works...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Oliver&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Oliver Seifer on Oct 30, 2008 10:02 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cause: posted wrong statement "generate report"  instead of   "insert report"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Oliver Seifer on Oct 30, 2008 10:02 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2008 08:56:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generate-selection-screen-as-popup-dynamically/m-p/4657441#M1095842</guid>
      <dc:creator>o_seifer</dc:creator>
      <dc:date>2008-10-30T08:56:21Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Selection Screen as Popup dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generate-selection-screen-as-popup-dynamically/m-p/4657442#M1095843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Oliver,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sorry that i didn't update this thread. I tried the way you described above and it works. Sometimes I get short dumps in the shared memory block. I didn't solve this yet. &lt;/P&gt;&lt;P&gt;I post you my code below:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  DATA la_dssfield TYPE /XXX/zssys_dssfield.

  CLEAR: wa_code, it_code.
  CLEAR: Ranges.

  wa_code = '*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'.
  APPEND wa_code TO it_code.
  wa_code = '*!!!!!! Generated program. Do not change anything!!!!'.
  APPEND wa_code TO it_code.
  wa_code = '*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'.
  APPEND wa_code TO it_code.
  wa_code = 'REPORT /XXX/ZSYS_GENSELSCREEN.'.
  APPEND wa_code TO it_code.

**** Generate Tables Section
  DATA lt_tmp_dssfield TYPE /XXX/ztsys_dssfield.
  lt_tmp_dssfield[] = it_dssfield[].

**** Delete Parameters
  DELETE lt_tmp_dssfield WHERE basictype EQ 'P'.

**** Delete Duplicates
  SORT lt_tmp_dssfield BY reftable.
  DELETE ADJACENT DUPLICATES FROM lt_tmp_dssfield COMPARING reftable.

**** Generate Tables Code
  LOOP AT lt_tmp_dssfield INTO la_dssfield.
    CONCATENATE 'TABLES' la_dssfield-reftable '.' INTO wa_code SEPARATED BY space.
    APPEND wa_code TO it_code.
  ENDLOOP.

**** Build Selection Screen
  DATA: l_tabix(10) TYPE c,
        l_type(128) TYPE c,
        l_desc(10) TYPE c.
  LOOP AT it_dssfield INTO la_dssfield.

    l_tabix = sy-tabix.
    CONDENSE l_tabix.

    wa_code = 'SELECTION-SCREEN BEGIN OF LINE.'.
    APPEND wa_code TO it_code.

    CONCATENATE 'SELECTION-SCREEN COMMENT 1(32) cmt' l_tabix '.' INTO wa_code.
    APPEND wa_code TO it_code.

    CONCATENATE la_dssfield-reftable la_dssfield-reffield INTO l_type SEPARATED BY '-'.

    CASE la_dssfield-basictype.
      WHEN 'P'.
        CONCATENATE 'PARAMETERS' la_dssfield-fieldname 'LIKE' l_type '.' INTO wa_code SEPARATED BY space.
      WHEN 'S'.
        CONCATENATE 'SELECT-OPTIONS' la_dssfield-fieldname 'FOR' l_type '.' INTO wa_code SEPARATED BY space.
      WHEN 'V'.
        CONCATENATE 'SELECT-OPTIONS' la_dssfield-fieldname 'FOR' l_type ' NO INTERVALS.' INTO wa_code SEPARATED BY space.
    ENDCASE.

    APPEND wa_code TO it_code.
    wa_code = 'SELECTION-SCREEN END OF LINE.'.
    APPEND wa_code TO it_code.

  ENDLOOP.

**** Initialize Comment Fields

  wa_code = 'INITIALIZATION.'.
  APPEND wa_code TO it_code.

**** Set GUI-Status
  MOVE 'SET PF-STATUS ''STATUS_1000'' OF PROGRAM ''/XXX/ZSYS_GENSELSCREEN''.' to wa_code.
  APPEND wa_code to it_code.

**** Set title

  DATA: l_stitle type string,
        l_sprog type string,
        l_stitletxt type string.

  MOVE '''TITLE_1000''' To l_stitle.
  MOVE '''/XXX/ZSYS_GENSELSCREEN''' to l_sprog.

  CONCATENATE 'SET TITLEBAR' l_stitle 'OF PROGRAM' l_sprog 'WITH'
               INTO wa_code SEPARATED BY space.
  APPEND wa_code TO it_code.
  CONCATENATE '''' i_title '''' into wa_code.
  append wa_code to it_code.
  MOVE '.' to wa_code.
  APPEND wa_code TO it_code.

  LOOP AT it_dssfield INTO la_dssfield.

    l_tabix = sy-tabix.
    CONDENSE l_tabix.
    CONCATENATE 'cmt' l_tabix INTO l_tabix.
    CONCATENATE l_tabix ' = ''' la_dssfield-descr '''.' INTO wa_code.
    APPEND wa_code TO it_code.
  ENDLOOP.

*** Start of Selection

*  wa_code = 'START-OF-SELECTION.'.
*  APPEND wa_code TO it_code.

**** AT SELECTION-SCREEN

  wa_code = 'AT SELECTION-SCREEN.'.
  APPEND wa_code TO it_code.

  wa_code = 'DATA: okcode type SYUCOMM.'.
  APPEND wa_code TO it_code.
  wa_code = 'MOVE sy-ucomm to okcode.'.
  APPEND wa_code TO it_code.

* Data types for shared objects
  wa_code = 'DATA t_ranges TYPE ACE_FIELD_RANGES_T.'.
  APPEND wa_code TO it_code.
  wa_code = 'DATA wa_ranges LIKE LINE OF t_ranges.'.
  APPEND wa_code TO it_code.
  wa_code = 'DATA t_fldrange TYPE ACE_GENERIC_RANGE_T.'.
  APPEND wa_code TO it_code.
  wa_code = 'DATA wa_fldrange TYPE ACE_GENERIC_RANGE.'.
  APPEND wa_code TO it_code.

* Read the input from the selection screen and
*  store it in Shared Objects
  LOOP AT it_dssfield INTO la_dssfield.

*   Assign the fieldname in the variable
    CONCATENATE 'wa_ranges-fieldname = '''
                 la_dssfield-fieldname '''.'
      INTO wa_code SEPARATED BY space.
    APPEND wa_code TO it_code.

    wa_code = 'REFRESH t_fldrange.'.
    APPEND wa_code TO it_code.

*   Processing for SELECT-OPTIONS
*   Loop and move data to the shared memory
    IF la_dssfield-basictype EQ 'S'
       OR la_dssfield-basictype EQ 'V'.
      CONCATENATE 'LOOP AT ' la_dssfield-fieldname '.'
        INTO wa_code SEPARATED BY space.
      APPEND wa_code TO it_code.

      wa_code = 'CLEAR wa_fldrange.'.
      APPEND wa_code TO it_code.

      CONCATENATE 'MOVE-CORRESPONDING ' la_dssfield-fieldname 'TO' 'wa_fldrange.'
         INTO wa_code SEPARATED BY space.
      APPEND wa_code TO it_code.

      wa_code = 'APPEND wa_fldrange TO t_fldrange.'.
      APPEND wa_code TO it_code.

      wa_code = 'ENDLOOP.'.
      APPEND wa_code TO it_code.

      wa_code = 'wa_ranges-fieldrange[] = t_fldrange[].'.
      APPEND wa_code TO it_code.

      wa_code = 'APPEND wa_ranges TO t_ranges.'.
      APPEND wa_code TO it_code.
    ELSEIF la_dssfield-basictype EQ 'P'.
*   Processing for PARAMETERS
      wa_code = 'CLEAR wa_fldrange.'.
      APPEND wa_code TO it_code.

*     Process if the parameter is not initial
      CONCATENATE 'IF ' la_dssfield-fieldname 'IS NOT INITIAL.'
        INTO wa_code SEPARATED BY space.
      APPEND wa_code TO it_code.

      wa_code = 'wa_fldrange-sign = ''I''.'.
      APPEND wa_code TO it_code.

      wa_code = 'wa_fldrange-option = ''EQ''.'.
      APPEND wa_code TO it_code.

      CONCATENATE 'wa_fldrange-low = ' la_dssfield-fieldname '.'
        INTO wa_code SEPARATED BY space.
      APPEND wa_code TO it_code.

      wa_code = 'APPEND wa_fldrange TO t_fldrange.'.
      APPEND wa_code TO it_code.

      wa_code = 'ENDIF.'.
      APPEND wa_code TO it_code.

      wa_code = 'wa_ranges-fieldrange[] = t_fldrange[].'.
      APPEND wa_code TO it_code.

      wa_code = 'APPEND wa_ranges TO t_ranges.'.
      APPEND wa_code TO it_code.

    ENDIF.

  ENDLOOP.

  wa_code = 'DATA: area type ref to /XXX/zsmasys_genselscreen.'.
  APPEND wa_code TO it_code.

  wa_code = 'DATA root type REF to /XXX/zclsys_genselscreen.'.
  APPEND wa_code TO it_code.

* Get ref to the shared memory
  wa_code = 'area = /XXX/zsmasys_genselscreen=&amp;gt;attach_for_write( ).'.
  APPEND wa_code TO it_code.

  wa_code = 'create object root area handle area.'.
  APPEND wa_code TO it_code.

* Store the value in memory
  wa_code = 'root-&amp;gt;set_fields( t_ranges ).'.
  APPEND wa_code TO it_code.

* Store ok_code in memory
  wa_code = ' root-&amp;gt;set_okcode( okcode ).'.
  APPEND wa_code TO it_code.

  wa_code = 'area-&amp;gt;set_root(  root ).'.
  APPEND wa_code TO it_code.

* Commit and detatch
  wa_code = 'area-&amp;gt;detach_commit( ).'.
  APPEND wa_code TO it_code.

* Quit the program: Return to the main code
  wa_code = 'LEAVE PROGRAM.'.
  APPEND wa_code TO it_code.

* Generate the report program
  INSERT REPORT '/XXX/ZSYS_GENSELSCREEN' FROM it_code.
  COMMIT WORK.

* Execute the report
  SUBMIT /XXX/zsys_genselscreen VIA SELECTION-SCREEN AND RETURN.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Importing parameters are:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
it_dssfield type /XXX/zTsys_dssfield
i_title type title_txt
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;/XXX/ztsys_dssfield has the following line structure:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FIELDNAME	CHAR08
REFTABLE	TABNAME
REFFIELD	FIELDNAME
BASICTYPE	CHAR01
DESCR	CHAR30_BRO
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope It helps you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm looking for a way to do the same in a selection-screen Pop-Up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For further questens contact me!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2008 09:09:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generate-selection-screen-as-popup-dynamically/m-p/4657442#M1095843</guid>
      <dc:creator>former_member301120</dc:creator>
      <dc:date>2008-10-30T09:09:13Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Selection Screen as Popup dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generate-selection-screen-as-popup-dynamically/m-p/4657443#M1095844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Christian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what a nice surprise. &lt;/P&gt;&lt;P&gt;Thank you very much for your source code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I can use some parts of it - unfortunately our basis release does not support shared objects &lt;SPAN __jive_emoticon_name="confused"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;That´s why I "want" to use ABAP-Memory...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With regards,&lt;/P&gt;&lt;P&gt;Oliver&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2008 09:39:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generate-selection-screen-as-popup-dynamically/m-p/4657443#M1095844</guid>
      <dc:creator>o_seifer</dc:creator>
      <dc:date>2008-10-30T09:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Selection Screen as Popup dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generate-selection-screen-as-popup-dynamically/m-p/4657444#M1095845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Oliver,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please post your solution too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2008 09:42:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generate-selection-screen-as-popup-dynamically/m-p/4657444#M1095845</guid>
      <dc:creator>former_member301120</dc:creator>
      <dc:date>2008-10-30T09:42:01Z</dc:date>
    </item>
  </channel>
</rss>

