<?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: module pool in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool/m-p/4027935#M962560</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1) How to create a select-options in a module pool screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Method 1&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------" /&gt;&lt;P&gt;a) Create a subscreen area in your screen layout where you want to create the select options.&lt;/P&gt;&lt;P&gt;b) In the top include of  your module pool program declare a selection screen as a subscreen e.g.&lt;/P&gt;&lt;P&gt;       SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.&lt;/P&gt;&lt;P&gt;             select-options s_matnr for mara-matnr.&lt;/P&gt;&lt;P&gt;       SELECTION-SCREEN END OF SCREEN.&lt;/P&gt;&lt;P&gt;c) In the PBO and PAI of the main screen where the select options needs to be created do a call subscreen of the above screen (100).&lt;/P&gt;&lt;P&gt;       CALL SUBCREEN sub_area INCLUDING  &amp;lt;program&amp;gt;   &amp;lt;screen&amp;gt;&lt;/P&gt;&lt;P&gt;  This call subscreen statement is necessary for transport of values between screen and program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: All validations of the selection screen fields e.g. the s_matnr field created above should be done in selection screen events like AT SELECTION-SCREEN etc and not in PAI. These selection screen validations etc should be done in the top include only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Method 2&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------" /&gt;&lt;P&gt;a) Create 2 separate fields in your screen layout - one for the low value and one for the high value. Insert an icon beside the high value which will call the multiple selections popup screen on user command. Use function module COMPLEX_SELECTIONS_DIALOG to achieve this. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;struc_tab_and_field-fieldname = con_cust.  " 'KUNNR'&lt;/P&gt;&lt;P&gt; struc_tab_and_field-tablename = con_kna1.  " 'KNA1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'&lt;/P&gt;&lt;P&gt;          EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          TITLE                        = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            text                         = g_titl1   " 'Customers'&lt;/P&gt;&lt;P&gt;            tab_and_field                = struc_tab_and_field&lt;/P&gt;&lt;P&gt;          TABLES&lt;/P&gt;&lt;P&gt;            RANGE                        = rng_kunnr&lt;/P&gt;&lt;P&gt;          EXCEPTIONS&lt;/P&gt;&lt;P&gt;            NO_RANGE_TAB                 = 1&lt;/P&gt;&lt;P&gt;            CANCELLED                    = 2&lt;/P&gt;&lt;P&gt;            INTERNAL_ERROR               = 3&lt;/P&gt;&lt;P&gt;            INVALID_FIELDNAME            = 4&lt;/P&gt;&lt;P&gt;            OTHERS                       = 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NOT rng_kunnr[] IS INITIAL.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         Read the very first entry of the range table and pass it to&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         dynpro screen field&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;           READ TABLE rng_kunnr INDEX 1.&lt;/P&gt;&lt;P&gt;           IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;              g_cust = rng_kunnr-low.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the return table rng_kunnr to populate your own internal range table with the values entered by the user. Basically here you are just simulating the work of a select-options parameter by module pool screen elements.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Jun 2008 10:02:16 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-23T10:02:16Z</dc:date>
    <item>
      <title>module pool</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool/m-p/4027932#M962557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi sdn,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table control on my screen to display details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want only particlar range details, can i put select options for tthat?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; If it is possible then how i  place that selection options&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please tell the ans.&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>Mon, 23 Jun 2008 09:07:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool/m-p/4027932#M962557</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-23T09:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: module pool</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool/m-p/4027933#M962558</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;      We can't place the select-options on the screens that we created, use the RANGES as select-options as below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Enter Value:&lt;/U&gt;  R_RANGES-LOW   &lt;U&gt;to&lt;/U&gt;   R_RANGES-HIGH.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2008 09:12:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool/m-p/4027933#M962558</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-23T09:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: module pool</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool/m-p/4027934#M962559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As we can't put select-options in the module pool programming.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create two I/O fields as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;material  _______  To _________&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;while selecting the data  in the where condition u can use BT operator,  this will give result as select-options only.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2008 09:49:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool/m-p/4027934#M962559</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-23T09:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: module pool</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool/m-p/4027935#M962560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1) How to create a select-options in a module pool screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Method 1&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------" /&gt;&lt;P&gt;a) Create a subscreen area in your screen layout where you want to create the select options.&lt;/P&gt;&lt;P&gt;b) In the top include of  your module pool program declare a selection screen as a subscreen e.g.&lt;/P&gt;&lt;P&gt;       SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.&lt;/P&gt;&lt;P&gt;             select-options s_matnr for mara-matnr.&lt;/P&gt;&lt;P&gt;       SELECTION-SCREEN END OF SCREEN.&lt;/P&gt;&lt;P&gt;c) In the PBO and PAI of the main screen where the select options needs to be created do a call subscreen of the above screen (100).&lt;/P&gt;&lt;P&gt;       CALL SUBCREEN sub_area INCLUDING  &amp;lt;program&amp;gt;   &amp;lt;screen&amp;gt;&lt;/P&gt;&lt;P&gt;  This call subscreen statement is necessary for transport of values between screen and program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: All validations of the selection screen fields e.g. the s_matnr field created above should be done in selection screen events like AT SELECTION-SCREEN etc and not in PAI. These selection screen validations etc should be done in the top include only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Method 2&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------" /&gt;&lt;P&gt;a) Create 2 separate fields in your screen layout - one for the low value and one for the high value. Insert an icon beside the high value which will call the multiple selections popup screen on user command. Use function module COMPLEX_SELECTIONS_DIALOG to achieve this. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;struc_tab_and_field-fieldname = con_cust.  " 'KUNNR'&lt;/P&gt;&lt;P&gt; struc_tab_and_field-tablename = con_kna1.  " 'KNA1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'&lt;/P&gt;&lt;P&gt;          EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          TITLE                        = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            text                         = g_titl1   " 'Customers'&lt;/P&gt;&lt;P&gt;            tab_and_field                = struc_tab_and_field&lt;/P&gt;&lt;P&gt;          TABLES&lt;/P&gt;&lt;P&gt;            RANGE                        = rng_kunnr&lt;/P&gt;&lt;P&gt;          EXCEPTIONS&lt;/P&gt;&lt;P&gt;            NO_RANGE_TAB                 = 1&lt;/P&gt;&lt;P&gt;            CANCELLED                    = 2&lt;/P&gt;&lt;P&gt;            INTERNAL_ERROR               = 3&lt;/P&gt;&lt;P&gt;            INVALID_FIELDNAME            = 4&lt;/P&gt;&lt;P&gt;            OTHERS                       = 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NOT rng_kunnr[] IS INITIAL.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         Read the very first entry of the range table and pass it to&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         dynpro screen field&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;           READ TABLE rng_kunnr INDEX 1.&lt;/P&gt;&lt;P&gt;           IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;              g_cust = rng_kunnr-low.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the return table rng_kunnr to populate your own internal range table with the values entered by the user. Basically here you are just simulating the work of a select-options parameter by module pool screen elements.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2008 10:02:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool/m-p/4027935#M962560</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-23T10:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: module pool</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool/m-p/4027936#M962561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi phani,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The easiest way is to define a selection screen as a subscreen and embed this into a subscreen area of a dynpro. Here is a sample program including the screen flow logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report zrich_0006 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables: mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Custom Selection Screen 1010 &lt;/P&gt;&lt;P&gt;selection-screen begin of screen 1010 as subscreen.&lt;/P&gt;&lt;P&gt;selection-screen begin of block b1 with frame title text-001.&lt;/P&gt;&lt;P&gt;parameters: p_rad1 radiobutton group grp1 default 'X',&lt;/P&gt;&lt;P&gt;p_rad2 radiobutton group grp1,&lt;/P&gt;&lt;P&gt;p_rad3 radiobutton group grp1.&lt;/P&gt;&lt;P&gt;select-options: s_matnr for mara-matnr,&lt;/P&gt;&lt;P&gt;s_matkl for mara-matkl,&lt;/P&gt;&lt;P&gt;s_mtart for mara-mtart.&lt;/P&gt;&lt;P&gt;selection-screen end of block b1.&lt;/P&gt;&lt;P&gt;selection-screen end of screen 1010.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call screen 100.&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Module STATUS_0100 OUTPUT&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;module status_0100 output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET PF-STATUS 'xxxxxxxx'. &lt;/P&gt;&lt;P&gt;SET TITLEBAR 'xxx'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endmodule.&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Module USER_COMMAND_0100 INPUT&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;module user_command_0100 input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endmodule.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Screen screen 100 with a subscreen area called "subscreen_1010" &lt;/P&gt;&lt;P&gt;Screen Flow Logic follows &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;process before output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;module status_0100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call subscreen subscreen_1010 including sy-repid '1010'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;process after input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call subscreen subscreen_1010 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;module user_command_0100.&lt;/P&gt;&lt;P&gt;[/code]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2008 10:18:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool/m-p/4027936#M962561</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-23T10:18:31Z</dc:date>
    </item>
  </channel>
</rss>

