<?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: Search help multiple values selection problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/search-help-multiple-values-selection-problem/m-p/7039090#M1500439</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suhas,&lt;/P&gt;&lt;P&gt;you may try the following:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TABLES spfli.

SELECT-OPTIONS: s_carrid FOR spfli-carrid.

SELECTION-SCREEN: PUSHBUTTON /1(20) but1 USER-COMMAND carr.

INITIALIZATION.
  but1 = 'Choose CARRID(s)'.

AT SELECTION-SCREEN.
  CASE sy-ucomm.
    WHEN 'CARR'.
      TYPES: t_return_tab  TYPE ddshretval.

      TYPES: BEGIN OF ty_line,
        carrid   TYPE spfli-carrid,
        carrname TYPE scarr-carrname,
      END OF ty_line.

      DATA: it_list TYPE STANDARD TABLE OF ty_line,
            wa_return_tab TYPE t_return_tab,
            i_return_tab TYPE STANDARD TABLE OF t_return_tab,
            v_repid TYPE sy-repid,
            v_dynnr TYPE sy-dynnr.

      v_repid = sy-repid.
      v_dynnr = sy-dynnr.

      SELECT carrid carrname
      FROM scarr
      INTO TABLE it_list.

      IF sy-subrc = 0.

        CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
          EXPORTING
            retfield        = 'CARRID'
            dynpprog        = v_repid
            dynpnr          = v_dynnr
*        dynprofield     = 'S_CARRID-LOW'
            value_org       = 'S'
            multiple_choice = 'X'
          TABLES
            value_tab       = it_list
            return_tab      = i_return_tab
          EXCEPTIONS
            parameter_error = 1
            no_values_found = 2
            OTHERS          = 3.
        IF sy-subrc = 0.
          s_carrid-sign = 'I'.
          s_carrid-option = 'EQ'.
          LOOP AT i_return_tab INTO wa_return_tab.
            s_carrid-low = wa_return_tab-fieldval.
            APPEND s_carrid.
          ENDLOOP.

          READ TABLE s_carrid INDEX 1.
        ENDIF.
      ENDIF.

  ENDCASE.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I have done is:&lt;/P&gt;&lt;P&gt;- not linking the result of the F4 search to field S_CARRID-LOW&lt;/P&gt;&lt;P&gt;- inserting this F4 search into event AT SELECTION SCREEN. This allows to see the select-options filled when its contents are actually populated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps. Kind regards,&lt;/P&gt;&lt;P&gt;Alvaro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Jun 2010 16:45:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-06-16T16:45:22Z</dc:date>
    <item>
      <title>Search help multiple values selection problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/search-help-multiple-values-selection-problem/m-p/7039087#M1500436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using FM &lt;STRONG&gt;f4_if_int_table_value_request&lt;/STRONG&gt; FM to display multiple values on selection screen &lt;/P&gt;&lt;P&gt;in AT-selection-screen on value request event. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Multiple values are getting displayed perfectly .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then after that I am using &lt;STRONG&gt;DYNP_VALUES_UPDATE&lt;/STRONG&gt; FM to return the values back to screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the problem is in the select-option field . It only picks the last value selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a row:&lt;/P&gt;&lt;P&gt; I EQ 'last value selected from F4 help screen''.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to update multiple rows in the select option selection screen field. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jun 2010 14:04:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/search-help-multiple-values-selection-problem/m-p/7039087#M1500436</guid>
      <dc:creator>Azeemquadri</dc:creator>
      <dc:date>2010-06-16T14:04:48Z</dc:date>
    </item>
    <item>
      <title>Re: Search help multiple values selection problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/search-help-multiple-values-selection-problem/m-p/7039088#M1500437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abdul,&lt;/P&gt;&lt;P&gt;instead of using DYNP_VALUES_READ to populate the data into the select-options, please try to populate the select-options table instead.&lt;/P&gt;&lt;P&gt;For example, if the name of the select-options is S_SEL, then:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
loop at result_table_from_f4.
  s_sel-sign = 'I'.
  s_sel-option = 'EQ'.
  s_sel-low = value_from_result_table.
  clear s_sel-high.
  append s_sel.
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps. Kind regards,&lt;/P&gt;&lt;P&gt;Alvaro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jun 2010 15:04:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/search-help-multiple-values-selection-problem/m-p/7039088#M1500437</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-16T15:04:31Z</dc:date>
    </item>
    <item>
      <title>Re: Search help multiple values selection problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/search-help-multiple-values-selection-problem/m-p/7039089#M1500438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This code snippet should work. But to display the three values you have to press enter, this will trigger the PBO &amp;amp; the data will be updated in the screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TABLES spfli.

SELECT-OPTIONS:
s_carrid FOR spfli-carrid.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_carrid-low.

  TYPES: t_return_tab  TYPE ddshretval.

  TYPES: BEGIN OF ty_line,
    carrid   TYPE spfli-carrid,
    carrname TYPE scarr-carrname,
  END OF ty_line.

  DATA: it_list TYPE STANDARD TABLE OF ty_line,
        wa_return_tab TYPE t_return_tab,
        i_return_tab TYPE STANDARD TABLE OF t_return_tab,
        v_repid TYPE sy-repid,
        v_dynnr TYPE sy-dynnr.

  v_repid = sy-repid.
  v_dynnr = sy-dynnr.

  SELECT carrid carrname
  FROM scarr
  INTO TABLE it_list.

  IF sy-subrc = 0.

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
      EXPORTING
        retfield        = 'CARRID'
        dynpprog        = v_repid
        dynpnr          = v_dynnr
        dynprofield     = 'S_CARRID-LOW'
        value_org       = 'S'
        multiple_choice = 'X'
      TABLES
        value_tab       = it_list
        return_tab      = i_return_tab
      EXCEPTIONS
        parameter_error = 1
        no_values_found = 2
        OTHERS          = 3.
    IF sy-subrc = 0.
      s_carrid-sign = 'I'.
      s_carrid-option = 'EQ'.
      LOOP AT i_return_tab INTO wa_return_tab.
        s_carrid-low = wa_return_tab-fieldval.
        APPEND s_carrid.
      ENDLOOP.

      READ TABLE s_carrid INDEX 1.
    ENDIF.
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure if there is any alternate technique to this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jun 2010 16:10:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/search-help-multiple-values-selection-problem/m-p/7039089#M1500438</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2010-06-16T16:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: Search help multiple values selection problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/search-help-multiple-values-selection-problem/m-p/7039090#M1500439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suhas,&lt;/P&gt;&lt;P&gt;you may try the following:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TABLES spfli.

SELECT-OPTIONS: s_carrid FOR spfli-carrid.

SELECTION-SCREEN: PUSHBUTTON /1(20) but1 USER-COMMAND carr.

INITIALIZATION.
  but1 = 'Choose CARRID(s)'.

AT SELECTION-SCREEN.
  CASE sy-ucomm.
    WHEN 'CARR'.
      TYPES: t_return_tab  TYPE ddshretval.

      TYPES: BEGIN OF ty_line,
        carrid   TYPE spfli-carrid,
        carrname TYPE scarr-carrname,
      END OF ty_line.

      DATA: it_list TYPE STANDARD TABLE OF ty_line,
            wa_return_tab TYPE t_return_tab,
            i_return_tab TYPE STANDARD TABLE OF t_return_tab,
            v_repid TYPE sy-repid,
            v_dynnr TYPE sy-dynnr.

      v_repid = sy-repid.
      v_dynnr = sy-dynnr.

      SELECT carrid carrname
      FROM scarr
      INTO TABLE it_list.

      IF sy-subrc = 0.

        CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
          EXPORTING
            retfield        = 'CARRID'
            dynpprog        = v_repid
            dynpnr          = v_dynnr
*        dynprofield     = 'S_CARRID-LOW'
            value_org       = 'S'
            multiple_choice = 'X'
          TABLES
            value_tab       = it_list
            return_tab      = i_return_tab
          EXCEPTIONS
            parameter_error = 1
            no_values_found = 2
            OTHERS          = 3.
        IF sy-subrc = 0.
          s_carrid-sign = 'I'.
          s_carrid-option = 'EQ'.
          LOOP AT i_return_tab INTO wa_return_tab.
            s_carrid-low = wa_return_tab-fieldval.
            APPEND s_carrid.
          ENDLOOP.

          READ TABLE s_carrid INDEX 1.
        ENDIF.
      ENDIF.

  ENDCASE.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I have done is:&lt;/P&gt;&lt;P&gt;- not linking the result of the F4 search to field S_CARRID-LOW&lt;/P&gt;&lt;P&gt;- inserting this F4 search into event AT SELECTION SCREEN. This allows to see the select-options filled when its contents are actually populated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps. Kind regards,&lt;/P&gt;&lt;P&gt;Alvaro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jun 2010 16:45:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/search-help-multiple-values-selection-problem/m-p/7039090#M1500439</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-16T16:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: Search help multiple values selection problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/search-help-multiple-values-selection-problem/m-p/7039091#M1500440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Alvaro,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nice way of tricking SAP &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But i dont think this looks good to the eyes. I would rather hit an enter after selecting data from the F4 help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jun 2010 01:18:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/search-help-multiple-values-selection-problem/m-p/7039091#M1500440</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2010-06-17T01:18:35Z</dc:date>
    </item>
  </channel>
</rss>

