<?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: fill select-options dynamically in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/fill-select-options-dynamically/m-p/2626778#M603660</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi can you give an example how do you mean that with for all entries &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;ilhan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 Jul 2007 09:18:35 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-31T09:18:35Z</dc:date>
    <item>
      <title>fill select-options dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fill-select-options-dynamically/m-p/2626776#M603658</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;How can I fill a select-options dynamically out of an internal table.&lt;/P&gt;&lt;P&gt;The content of internal table have to be shown in the select-options &lt;/P&gt;&lt;P&gt;so that only  these values can be choocen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;ilhan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2007 09:06:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fill-select-options-dynamically/m-p/2626776#M603658</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-31T09:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: fill select-options dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fill-select-options-dynamically/m-p/2626777#M603659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you not use for all entries in statement on you select....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2007 09:17:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fill-select-options-dynamically/m-p/2626777#M603659</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-31T09:17:14Z</dc:date>
    </item>
    <item>
      <title>Re: fill select-options dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fill-select-options-dynamically/m-p/2626778#M603660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi can you give an example how do you mean that with for all entries &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;ilhan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2007 09:18:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fill-select-options-dynamically/m-p/2626778#M603660</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-31T09:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: fill select-options dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fill-select-options-dynamically/m-p/2626779#M603661</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;for that u need to handle the code in AT SELECTION SCREEN  event&lt;/P&gt;&lt;P&gt;and use the function module F4_INT_VALUE_REQUEST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2007 09:20:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fill-select-options-dynamically/m-p/2626779#M603661</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-31T09:20:17Z</dc:date>
    </item>
    <item>
      <title>Re: fill select-options dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fill-select-options-dynamically/m-p/2626780#M603662</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;As you know every select option variable is a range table. If you want the select option to be filled in the initial screen itself use the INITIALIZATION event to append the select-options table as you populate a range table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want the select option to be filled at the time of selection screen population use the at selection screen event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Irudayaraj Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2007 09:34:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fill-select-options-dynamically/m-p/2626780#M603662</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-31T09:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: fill select-options dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fill-select-options-dynamically/m-p/2626781#M603663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this it may help you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TABLES : MARA.

TYPE-POOLS : VRM.
DATA : BEGIN OF ITAB OCCURS 0,
       MATNR LIKE MARA-MATNR,
       END OF ITAB.
DATA : IPARAMVA TYPE VRM_VALUES,
       WPARAMVA TYPE VRM_VALUE,
       IPARAMID TYPE VRM_ID. .
PARAMETERS : P_MATNR LIKE MARA-MATNR AS LISTBOX VISIBLE LENGTH 20.

INITIALIZATION.
  SELECT MATNR INTO TABLE ITAB FROM MARA UP TO 10 ROWS.

  IPARAMID = 'P_MATNR'.
  LOOP AT ITAB.
    WPARAMVA-KEY = ITAB-MATNR.
    WPARAMVA-TEXT = ITAB-MATNR.
    APPEND WPARAMVA TO IPARAMVA.
  ENDLOOP.

  CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
      ID              = IPARAMID
      VALUES          = IPARAMVA
    EXCEPTIONS
      ID_ILLEGAL_NAME = 1
      OTHERS          = 2.
  IF SY-SUBRC &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;shiba dutta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2007 10:33:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fill-select-options-dynamically/m-p/2626781#M603663</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-31T10:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: fill select-options dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fill-select-options-dynamically/m-p/2626782#M603664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;" Please see the below code is the best example of passing the table values 
" as  F4 help values in the selection screen through the even of the report .....&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT Ztest_HELP .
TABLES : MARA.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS : P_MATNR(10) TYPE C.
SELECTION-SCREEN END OF BLOCK B1.
DATA : BEGIN OF ITAB OCCURS 0,
MATNR TYPE MATNR,
END OF ITAB.
 
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_MATNR.
SELECT MATNR
FROM MARA
INTO TABLE ITAB
UP TO 10 ROWS.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'MATERIAL NUMBER'
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'P_MATNR'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = ITAB
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are number of function modules that can be used for the purpose, but these&lt;/P&gt;&lt;P&gt;can fullfill the task easily or combination of them. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;" DYNP_VALUE_READ&lt;/P&gt;&lt;P&gt;" F4IF_FIELD_VALUE_REQUEST&lt;/P&gt;&lt;P&gt;" F4IF_INT_TABLE_VALUE_REQUEST&lt;/P&gt;&lt;P&gt;" POPUP_WITH_TABLE_DISPLAY&lt;/P&gt;&lt;P&gt;" DYNP_VALUE_READ  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;' This function module is used to read values in the screen fields. Use of this 
' FM causes forced transfer of data from screen fields to ABAP fields.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are 3 exporting parameters &lt;/P&gt;&lt;P&gt;DYNAME = program name = SY-CPROG&lt;/P&gt;&lt;P&gt;DYNUMB = Screen number = SY-DYNNR&lt;/P&gt;&lt;P&gt;TRANSLATE_TO_UPPER = 'X'&lt;/P&gt;&lt;P&gt;and one importing TABLE parameter &lt;/P&gt;&lt;P&gt;DYNPFIELDS = Table of TYPE DYNPREAD&lt;/P&gt;&lt;P&gt;The DYNPFIELDS parameter is used to pass internal table of type DYNPREAD&lt;/P&gt;&lt;P&gt;to this FM and the values read from the screen will be stored in this table.This&lt;/P&gt;&lt;P&gt;table consists of two fields:&lt;/P&gt;&lt;P&gt;FIELDNAME : Used to pass the name of screen field for which the value is to&lt;/P&gt;&lt;P&gt;be read.&lt;/P&gt;&lt;P&gt;FIELDVALUE : Used to read the value of the field in the screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if it is usefull ...&lt;/P&gt;&lt;P&gt;Girish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2007 10:39:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fill-select-options-dynamically/m-p/2626782#M603664</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-31T10:39:41Z</dc:date>
    </item>
    <item>
      <title>Re: fill select-options dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fill-select-options-dynamically/m-p/2626783#M603665</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;Data: data type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select-options: s_value for data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;plz reward if useful&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Swati&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2007 12:20:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fill-select-options-dynamically/m-p/2626783#M603665</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-31T12:20:07Z</dc:date>
    </item>
    <item>
      <title>Re: fill select-options dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fill-select-options-dynamically/m-p/2626784#M603666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want to use the values only to fetch data from the database then u can populate a range..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ranges: r_int for mara-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u can append material values from your internal table into range r_int &amp;amp; then use it in SELECT statement..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM MARA &lt;/P&gt;&lt;P&gt;  WHERE matnr IN r_int.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR if the range is already there on selection screen as a select-option, populate as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;s_int-sign = 'I'&lt;/P&gt;&lt;P&gt;s_int-option = 'EQ'&lt;/P&gt;&lt;P&gt;s_int-low = inttab-matnr&lt;/P&gt;&lt;P&gt;append s_int.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Cmehr&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2007 14:06:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fill-select-options-dynamically/m-p/2626784#M603666</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-31T14:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: fill select-options dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fill-select-options-dynamically/m-p/2626785#M603667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if you want to display as list box use &lt;/P&gt;&lt;P&gt; fm vrm_set_values or other wise just use below code in initialize event &lt;/P&gt;&lt;P&gt; with your values it will work &lt;/P&gt;&lt;P&gt;use it based on your requirement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;initialize. &lt;/P&gt;&lt;P&gt;s_int-sign = 'I'&lt;/P&gt;&lt;P&gt;s_int-option = 'EQ'&lt;/P&gt;&lt;P&gt;s_int-low = '001'&lt;/P&gt;&lt;P&gt;append s_int.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;s_int-sign = 'I'&lt;/P&gt;&lt;P&gt;s_int-option = 'EQ'&lt;/P&gt;&lt;P&gt;s_int-low = '002'&lt;/P&gt;&lt;P&gt;append s_int.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2007 23:33:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fill-select-options-dynamically/m-p/2626785#M603667</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-31T23:33:43Z</dc:date>
    </item>
  </channel>
</rss>

