<?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 F4 function (drop down list) with limited values/selections in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/f4-function-drop-down-list-with-limited-values-selections/m-p/5564923#M1269590</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to ask if this is possible, and if yes, then how:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like create a selection screen where the user will select a certain UNAME from the drop down list. This selection field will have possible values taken from SU01 user names. But here's the twist; the selection field should not allow users to type on it or select a blank value. The user is obliged to select from the drop down list. Is this possible? If yes, please tell me how to do this or you may share some links for me to follow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;RE&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 May 2009 10:26:05 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-05-05T10:26:05Z</dc:date>
    <item>
      <title>F4 function (drop down list) with limited values/selections</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/f4-function-drop-down-list-with-limited-values-selections/m-p/5564923#M1269590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to ask if this is possible, and if yes, then how:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like create a selection screen where the user will select a certain UNAME from the drop down list. This selection field will have possible values taken from SU01 user names. But here's the twist; the selection field should not allow users to type on it or select a blank value. The user is obliged to select from the drop down list. Is this possible? If yes, please tell me how to do this or you may share some links for me to follow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;RE&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2009 10:26:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/f4-function-drop-down-list-with-limited-values-selections/m-p/5564923#M1269590</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-05T10:26:05Z</dc:date>
    </item>
    <item>
      <title>Re: F4 function (drop down list) with limited values/selections</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/f4-function-drop-down-list-with-limited-values-selections/m-p/5564924#M1269591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this demo program:&lt;/P&gt;&lt;P&gt;DEMO_DROPDOWN_LIST_BOX&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2009 10:28:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/f4-function-drop-down-list-with-limited-values-selections/m-p/5564924#M1269591</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-05T10:28:24Z</dc:date>
    </item>
    <item>
      <title>Re: F4 function (drop down list) with limited values/selections</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/f4-function-drop-down-list-with-limited-values-selections/m-p/5564925#M1269592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;List Box will not allow user to enter any values and you can some logic in PAI.&lt;/P&gt;&lt;P&gt; FIELD fld MODULE  chek_empty&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2009 13:50:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/f4-function-drop-down-list-with-limited-values-selections/m-p/5564925#M1269592</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-05T13:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: F4 function (drop down list) with limited values/selections</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/f4-function-drop-down-list-with-limited-values-selections/m-p/5564926#M1269593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Reymar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using listbox automatically restricts user with the input, he/she can only pick a value. Furthermore, simply adding OBLIGATORY addition will force selection by user on this field. Check this code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TYPES: t_c30(12) TYPE c.

PARAMETERS: pa_uname TYPE t_c30 AS LISTBOX VISIBLE LENGTH 40 USER-COMMAND f_code OBLIGATORY .

DATA: BEGIN OF it_users OCCURS 0,
        bname TYPE usr01-bname,
        name_textc TYPE user_addr-name_textc,
       END OF it_users.

"fill the table only once
INITIALIZATION.
  SELECT usr01~bname user_addr~name_textc INTO CORRESPONDING FIELDS OF TABLE it_users
           FROM usr01 INNER JOIN user_addr
                              ON usr01~bname = user_addr~bname.

"on F4 (input help) return user id (BNAME) 
AT SELECTION-SCREEN ON VALUE-REQUEST FOR pa_uname.
  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield        = 'BNAME'
      value_org       = 'S'
    TABLES
      value_tab       = it_users
    EXCEPTIONS
      parameter_error = 1
      no_values_found = 2
      OTHERS          = 3.

  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.
  ELSE.
     "&amp;lt;- here just react accordingly, user id is stored in  pa_uname
  ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The list will show only user names (not ids), but when you pick one, his/her id will be returned to PA_UNAME. If you want to see both user name and id, in standard toolbar of any SAP window choose last icon ( &lt;EM&gt;Customize Local Layout-&amp;gt;Options-&amp;gt;Expert-&amp;gt;&lt;/EM&gt; select &lt;EM&gt;Show all keys in dropdown lists&lt;/EM&gt; ). But please be aware that this setting is global one, hence is applicable to all lists accross the system. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2009 14:14:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/f4-function-drop-down-list-with-limited-values-selections/m-p/5564926#M1269593</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2009-05-05T14:14:06Z</dc:date>
    </item>
  </channel>
</rss>

