<?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: Dropdown values from dictionary in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dropdown-values-from-dictionary/m-p/8311109#M1636457</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want to fill the Listbox you can use FM &lt;STRONG&gt;'VRM_SET_VALUES'&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: NAME TYPE VRM_ID, 
            LIST TYPE VRM_VALUES, 
            VALUE LIKE LINE OF LIST. 
 
 NAME = 'Your_field_name'. 
  VALUE-KEY = '1'. 
  VALUE-TEXT = 'LINE 1'. 
  APPEND VALUE TO LIST. 
  VALUE-KEY = '2'. 
  VALUE-TEXT = 'LINE 2'. 
  APPEND VALUE TO LIST. 

  CALL FUNCTION 'VRM_SET_VALUES' 
  EXPORTING 
  ID = NAME 
  VALUES = LIST.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Nov 2011 00:53:31 GMT</pubDate>
    <dc:creator>surajarafath</dc:creator>
    <dc:date>2011-11-18T00:53:31Z</dc:date>
    <item>
      <title>Dropdown values from dictionary</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dropdown-values-from-dictionary/m-p/8311108#M1636456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to dsplay 2 dropdown lists on the first screen of my dialog program with the values being plant numbers and cost center numbers. I tried creating fields from the dictionary which creates the variable field name for me with a "-", but in my program if I name the data attribute the same I get an error saying "-" is not allowed in the name of the attribute. If I change it to "_" the program is fine, but the screen painter doesn't allow me to make it a dictionary referenced field. Is there some way to get them named so they are synchronized and so the value list is from the dictionary?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2011 17:54:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dropdown-values-from-dictionary/m-p/8311108#M1636456</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-17T17:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: Dropdown values from dictionary</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dropdown-values-from-dictionary/m-p/8311109#M1636457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want to fill the Listbox you can use FM &lt;STRONG&gt;'VRM_SET_VALUES'&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: NAME TYPE VRM_ID, 
            LIST TYPE VRM_VALUES, 
            VALUE LIKE LINE OF LIST. 
 
 NAME = 'Your_field_name'. 
  VALUE-KEY = '1'. 
  VALUE-TEXT = 'LINE 1'. 
  APPEND VALUE TO LIST. 
  VALUE-KEY = '2'. 
  VALUE-TEXT = 'LINE 2'. 
  APPEND VALUE TO LIST. 

  CALL FUNCTION 'VRM_SET_VALUES' 
  EXPORTING 
  ID = NAME 
  VALUES = LIST.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Nov 2011 00:53:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dropdown-values-from-dictionary/m-p/8311109#M1636457</guid>
      <dc:creator>surajarafath</dc:creator>
      <dc:date>2011-11-18T00:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: Dropdown values from dictionary</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dropdown-values-from-dictionary/m-p/8311110#M1636458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your help. It is still not working. Where do I place the code? I am using a module pool program and have put it in the PBO and POV-R. The table with the values is in the top include with the dropdown field.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Nov 2011 22:15:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dropdown-values-from-dictionary/m-p/8311110#M1636458</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-18T22:15:27Z</dc:date>
    </item>
    <item>
      <title>Re: Dropdown values from dictionary</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dropdown-values-from-dictionary/m-p/8311111#M1636459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think if you would give a specific example of what you are trying to do, that'd be helpful to understand your scenario.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Nov 2011 22:20:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dropdown-values-from-dictionary/m-p/8311111#M1636459</guid>
      <dc:creator>Tamas_Hoznek</dc:creator>
      <dc:date>2011-11-18T22:20:38Z</dc:date>
    </item>
    <item>
      <title>Re: Dropdown values from dictionary</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dropdown-values-from-dictionary/m-p/8311112#M1636460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is the code from my top include and the module that I have placed in the PBO and POV-R. The table is populated with all plants, then loops throught the table and assigns the value to the values structure with the value-key being assigned to sy-index, and appends the line to the LIST table. Then it calls the function to populate. Thanks for any help.&lt;/P&gt;&lt;P&gt;*&lt;STRONG&gt;TOP INCLUDE&lt;/STRONG&gt;*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE-POOLS: vrm.&lt;/P&gt;&lt;P&gt;DATA: DD_NAME  TYPE VRM_ID,&lt;/P&gt;&lt;P&gt;      DD_LIST  TYPE VRM_VALUES,&lt;/P&gt;&lt;P&gt;      DD_VALUE LIKE LINE OF DD_LIST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: BEGIN OF wa_plant,&lt;/P&gt;&lt;P&gt;    werks TYPE WERKS,&lt;/P&gt;&lt;P&gt;  END OF wa_plant.&lt;/P&gt;&lt;P&gt;  DATA: plant_tab LIKE STANDARD TABLE OF wa_plant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;STRONG&gt;PBO&lt;/STRONG&gt;*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT werks&lt;/P&gt;&lt;P&gt;  FROM t001w&lt;/P&gt;&lt;P&gt;  INTO TABLE plant_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DD_NAME = 'S1000_PLANT'.&lt;/P&gt;&lt;P&gt; LOOP AT plant_tab INTO wa_plant.&lt;/P&gt;&lt;P&gt;      DD_VALUE-KEY = sy-index.&lt;/P&gt;&lt;P&gt;      DD_VALUE-TEXT = wa_plant-werks.&lt;/P&gt;&lt;P&gt;      APPEND DD_VALUE TO DD_LIST.&lt;/P&gt;&lt;P&gt; ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'VRM_SET_VALUES'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;    ID = DD_NAME&lt;/P&gt;&lt;P&gt;    VALUES = DD_LIST.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Nov 2011 22:43:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dropdown-values-from-dictionary/m-p/8311112#M1636460</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-18T22:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: Dropdown values from dictionary</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dropdown-values-from-dictionary/m-p/8311113#M1636461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hm... if you want plant dropdown values when the user presses F4, all you need to do is to define your screen fields with reference to the proper DDIC data element. In case of plant, this would be WERKS_D.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So for instance, if you define your field as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: I_PLANT TYPE WERKS_D.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the screen field is also called I_PLANT, then this should be automatic.&lt;/P&gt;&lt;P&gt;The same could be done for the cost center too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I missing something?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Nov 2011 23:49:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dropdown-values-from-dictionary/m-p/8311113#M1636461</guid>
      <dc:creator>Tamas_Hoznek</dc:creator>
      <dc:date>2011-11-18T23:49:19Z</dc:date>
    </item>
    <item>
      <title>Re: Dropdown values from dictionary</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dropdown-values-from-dictionary/m-p/8311114#M1636462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I try to do that it doesnt let me assign the dictionary value to the field in the screen painter because the name has a "_" instead of a "-". If I define it as a dictionary field from the screen painter it automatically names the field with a "-" which doesn't work in the program as a field name. I feel like I am missing something too, the field name is named the same as in the program and is of the dictionary type, the field display value type is right, but it still displays nothing. I feel like theres something else that has to be done to make the vale come automatically from the dictionary.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2011 15:23:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dropdown-values-from-dictionary/m-p/8311114#M1636462</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-21T15:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: Dropdown values from dictionary</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dropdown-values-from-dictionary/m-p/8311115#M1636463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Even though you marked this question as "answered", I just wanted to reiterate that with the method described above, you should be able to get the dropdowns as long as you refer to a program field that has the proper data element reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Screen Painter, when editing the layout, just use Goto -&amp;gt; Secondary Window -&amp;gt; Dictionary/Program fields, and in the window click on 'Get from Program'. You'll get a list of all fields defined in the module pool, and you'll be able to copy those into the screen layout. Doesn't matter if the field has an '_' in the name or not.&lt;/P&gt;&lt;P&gt;If that doesn't work, then the program field definition doesn't refer to the correct data element in the DDIC.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2011 22:33:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dropdown-values-from-dictionary/m-p/8311115#M1636463</guid>
      <dc:creator>Tamas_Hoznek</dc:creator>
      <dc:date>2011-11-21T22:33:46Z</dc:date>
    </item>
  </channel>
</rss>

