<?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: fieldvalue only from search help in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/fieldvalue-only-from-search-help/m-p/5281397#M1218921</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Append the values you required for that field into an internal table and use this function module.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;F4IF_INT_TABLE_VALUE_REQUEST&lt;/STRONG&gt; ,raise a message if user enters something else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this for sample.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TABLES : tadir.
SELECT-OPTIONS: s_devc FOR tadir-devclass NO INTERVALS NO-EXTENSION.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_devc-low .
  REFRESH: it_sel.
  CLEAR: it_sel.
  it_sel-devclass = 'ZBASIS'.
  it_sel-ctext = 'Development Class For BASIS'.
  APPEND it_sel.
  CLEAR: it_sel.
  it_sel-devclass = 'ZMM'.
  it_sel-ctext = 'Development Class For Material Management'.
  APPEND it_sel.
  CLEAR: it_sel.
  it_sel-devclass = 'ZHR'.
  it_sel-ctext = 'Customer Developments for HR '.
  APPEND it_sel.
  CLEAR: it_sel.
  it_sel-devclass = 'ZFI'.
  it_sel-ctext = 'Development Class for FI'.
  APPEND it_sel.
  CLEAR: it_sel.
  it_sel-devclass = 'ZCO'.
  it_sel-ctext = 'Development Class for CO'.
  APPEND it_sel.
  CLEAR: it_sel.
  it_sel-devclass = 'ZPS'.
  it_sel-ctext = 'Development Class For Project System'.
  APPEND it_sel.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
*   DDIC_STRUCTURE         = ' '
      retfield               = 'DEVCLASS'
*   PVALKEY                = ' '
     dynpprog               = sy-repid
     dynpnr                 = sy-dynnr
     dynprofield            = 'S_DEVC-LOW'
*   STEPL                  = 0
*   WINDOW_TITLE           =
*   VALUE                  = ' '
     value_org              = 'S'
*   MULTIPLE_CHOICE        = ' '
*   DISPLAY                = ' '
*   CALLBACK_PROGRAM       = 'SY-REPID'
*   CALLBACK_FORM          = ' '
*   MARK_TAB               =
* IMPORTING
*   USER_RESET             =
    TABLES
      value_tab              =  it_sel
*   FIELD_TAB              =
*   RETURN_TAB             =
*   DYNPFLD_MAPPING        =
* 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.
  ENDIF.
  READ TABLE it_sel INDEX sy-index.

AT SELECTION-SCREEN.

  LOOP AT s_devc .
    IF (  s_devc-low = 'ZBASIS' OR s_devc-low = 'ZFI' OR s_devc-low = 'ZMM'
     OR s_devc-low = 'ZHR' OR s_devc-low = 'ZCO' OR s_devc-low = 'ZPS' ).
    ELSE.
*      refresh s_devc.
      CLEAR s_devc.
      MESSAGE 'Enter the correct package' TYPE 'E'.
    ENDIF.
  ENDLOOP.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Mar 2009 12:37:36 GMT</pubDate>
    <dc:creator>GauthamV</dc:creator>
    <dc:date>2009-03-03T12:37:36Z</dc:date>
    <item>
      <title>fieldvalue only from search help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fieldvalue-only-from-search-help/m-p/5281395#M1218919</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;there is a a field (select options) and the requirement is the user&lt;/P&gt;&lt;P&gt;may only choose the values what has been suggested from the search help .&lt;/P&gt;&lt;P&gt;It should not  be possible to type in any other value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reagrds&lt;/P&gt;&lt;P&gt;sas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Mar 2009 12:31:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fieldvalue-only-from-search-help/m-p/5281395#M1218919</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-03T12:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: fieldvalue only from search help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fieldvalue-only-from-search-help/m-p/5281396#M1218920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi erdem,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have one possible solution for that.&lt;/P&gt;&lt;P&gt;Validate what ever entered in that select option based on the F4 help values.&lt;/P&gt;&lt;P&gt;if not there you can give the error message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i don't thnk we do have aprat from this solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Mar 2009 12:37:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fieldvalue-only-from-search-help/m-p/5281396#M1218920</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-03T12:37:09Z</dc:date>
    </item>
    <item>
      <title>Re: fieldvalue only from search help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fieldvalue-only-from-search-help/m-p/5281397#M1218921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Append the values you required for that field into an internal table and use this function module.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;F4IF_INT_TABLE_VALUE_REQUEST&lt;/STRONG&gt; ,raise a message if user enters something else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this for sample.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TABLES : tadir.
SELECT-OPTIONS: s_devc FOR tadir-devclass NO INTERVALS NO-EXTENSION.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_devc-low .
  REFRESH: it_sel.
  CLEAR: it_sel.
  it_sel-devclass = 'ZBASIS'.
  it_sel-ctext = 'Development Class For BASIS'.
  APPEND it_sel.
  CLEAR: it_sel.
  it_sel-devclass = 'ZMM'.
  it_sel-ctext = 'Development Class For Material Management'.
  APPEND it_sel.
  CLEAR: it_sel.
  it_sel-devclass = 'ZHR'.
  it_sel-ctext = 'Customer Developments for HR '.
  APPEND it_sel.
  CLEAR: it_sel.
  it_sel-devclass = 'ZFI'.
  it_sel-ctext = 'Development Class for FI'.
  APPEND it_sel.
  CLEAR: it_sel.
  it_sel-devclass = 'ZCO'.
  it_sel-ctext = 'Development Class for CO'.
  APPEND it_sel.
  CLEAR: it_sel.
  it_sel-devclass = 'ZPS'.
  it_sel-ctext = 'Development Class For Project System'.
  APPEND it_sel.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
*   DDIC_STRUCTURE         = ' '
      retfield               = 'DEVCLASS'
*   PVALKEY                = ' '
     dynpprog               = sy-repid
     dynpnr                 = sy-dynnr
     dynprofield            = 'S_DEVC-LOW'
*   STEPL                  = 0
*   WINDOW_TITLE           =
*   VALUE                  = ' '
     value_org              = 'S'
*   MULTIPLE_CHOICE        = ' '
*   DISPLAY                = ' '
*   CALLBACK_PROGRAM       = 'SY-REPID'
*   CALLBACK_FORM          = ' '
*   MARK_TAB               =
* IMPORTING
*   USER_RESET             =
    TABLES
      value_tab              =  it_sel
*   FIELD_TAB              =
*   RETURN_TAB             =
*   DYNPFLD_MAPPING        =
* 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.
  ENDIF.
  READ TABLE it_sel INDEX sy-index.

AT SELECTION-SCREEN.

  LOOP AT s_devc .
    IF (  s_devc-low = 'ZBASIS' OR s_devc-low = 'ZFI' OR s_devc-low = 'ZMM'
     OR s_devc-low = 'ZHR' OR s_devc-low = 'ZCO' OR s_devc-low = 'ZPS' ).
    ELSE.
*      refresh s_devc.
      CLEAR s_devc.
      MESSAGE 'Enter the correct package' TYPE 'E'.
    ENDIF.
  ENDLOOP.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Mar 2009 12:37:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fieldvalue-only-from-search-help/m-p/5281397#M1218921</guid>
      <dc:creator>GauthamV</dc:creator>
      <dc:date>2009-03-03T12:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: fieldvalue only from search help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fieldvalue-only-from-search-help/m-p/5281398#M1218922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is a problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using this FM . Range field -&amp;gt; r_nsize is defined as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA:
NSNAME(5),           "Also Dynprofield
RANGES: r_nsize  FOR NSNAME,

 CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
      EXPORTING
        title             = 'Auswahl Normal Size'
        text              = 'Normal Size'
        SEARCH_HELP       = lv_sh_1
      TABLES
        range             = r_nsize
      EXCEPTIONS
        no_range_tab      = 1
        cancelled         = 2
        internal_error    = 3
        invalid_fieldname = 4
        OTHERS            = 5.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Mar 2009 12:41:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fieldvalue-only-from-search-help/m-p/5281398#M1218922</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-03T12:41:34Z</dc:date>
    </item>
  </channel>
</rss>

