<?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: list box with default value in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/list-box-with-default-value/m-p/1674249#M297585</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It should be as easy as filling the field with a valid listbox value, for example, in this program, I am building the listbox in the program and just assign P_FIELD a valid value from it.  Create screen 100 and create a field call P_FIELD, make sure to select "ListBox" from the DropDown Field.&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;



report  zrich_0001.

type-pools: vrm.

&amp;lt;b&amp;gt;data: p_field(20) type c.&amp;lt;/b&amp;gt;
data: ivrm_values type vrm_values.
data: xvrm_values like line of ivrm_values.
data: name type vrm_id.

start-of-selection.

&amp;lt;b&amp;gt;* Set default value, before calling the screen
  p_field = 'DEF'.&amp;lt;/b&amp;gt;

  call screen 100.
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Module  STATUS_0100  OUTPUT
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
module status_0100 output.
*  SET PF-STATUS 'xxxxxxxx'.
*  SET TITLEBAR 'xxx'.

&amp;lt;b&amp;gt;  name = 'P_FIELD'.

  xvrm_values-key = 'ABC'.
  xvrm_values-text = 'ABC'.
  append xvrm_values to ivrm_values.

  xvrm_values-key = 'DEF'.
  xvrm_values-text = 'DEF'.
  append xvrm_values to ivrm_values.

  xvrm_values-key = 'GHI'.
  xvrm_values-text = 'GHI'.
  append xvrm_values to ivrm_values.

  call function 'VRM_SET_VALUES'
       exporting
            id     = name
            values = ivrm_values.&amp;lt;/b&amp;gt;

endmodule.                 " STATUS_0100  OUTPUT
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Module  USER_COMMAND_0100  INPUT
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
module user_command_0100 input.

endmodule.                 " USER_COMMAND_0100  INPUT

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 Oct 2006 21:03:32 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2006-10-31T21:03:32Z</dc:date>
    <item>
      <title>list box with default value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/list-box-with-default-value/m-p/1674248#M297584</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 to do list box with &amp;lt;b&amp;gt;default&amp;lt;/b&amp;gt; value in &amp;lt;u&amp;gt;module pool screen&amp;lt;/u&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;aRs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Oct 2006 20:56:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/list-box-with-default-value/m-p/1674248#M297584</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2006-10-31T20:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: list box with default value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/list-box-with-default-value/m-p/1674249#M297585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It should be as easy as filling the field with a valid listbox value, for example, in this program, I am building the listbox in the program and just assign P_FIELD a valid value from it.  Create screen 100 and create a field call P_FIELD, make sure to select "ListBox" from the DropDown Field.&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;



report  zrich_0001.

type-pools: vrm.

&amp;lt;b&amp;gt;data: p_field(20) type c.&amp;lt;/b&amp;gt;
data: ivrm_values type vrm_values.
data: xvrm_values like line of ivrm_values.
data: name type vrm_id.

start-of-selection.

&amp;lt;b&amp;gt;* Set default value, before calling the screen
  p_field = 'DEF'.&amp;lt;/b&amp;gt;

  call screen 100.
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Module  STATUS_0100  OUTPUT
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
module status_0100 output.
*  SET PF-STATUS 'xxxxxxxx'.
*  SET TITLEBAR 'xxx'.

&amp;lt;b&amp;gt;  name = 'P_FIELD'.

  xvrm_values-key = 'ABC'.
  xvrm_values-text = 'ABC'.
  append xvrm_values to ivrm_values.

  xvrm_values-key = 'DEF'.
  xvrm_values-text = 'DEF'.
  append xvrm_values to ivrm_values.

  xvrm_values-key = 'GHI'.
  xvrm_values-text = 'GHI'.
  append xvrm_values to ivrm_values.

  call function 'VRM_SET_VALUES'
       exporting
            id     = name
            values = ivrm_values.&amp;lt;/b&amp;gt;

endmodule.                 " STATUS_0100  OUTPUT
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Module  USER_COMMAND_0100  INPUT
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
module user_command_0100 input.

endmodule.                 " USER_COMMAND_0100  INPUT

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Oct 2006 21:03:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/list-box-with-default-value/m-p/1674249#M297585</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-10-31T21:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: list box with default value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/list-box-with-default-value/m-p/1674250#M297586</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;Please check this demo program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DEMO_DROPDOWN_LIST_BOX&lt;/P&gt;&lt;P&gt;DEMO_DYNPRO_DROPDOWN_LISTBOX&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Oct 2006 21:04:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/list-box-with-default-value/m-p/1674250#M297586</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-31T21:04:32Z</dc:date>
    </item>
  </channel>
</rss>

