<?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 Record_Tab Enable Multiple Selection CV04N in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/search-help-record-tab-enable-multiple-selection-cv04n/m-p/647668#M27767</link>
    <description>&lt;P&gt;Value of callcontrol-multisel is provided by the caller of the search help not by the search help. Now, go for a small report to perform a test worth a thousand words&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;TABLES: lfa1.
PARAMETER pa_lifnr TYPE lfa1-lifnr MATCHCODE OBJECT kredi.
SELECT-OPTIONS so_lifnr FOR lfa1-lifnr MATCHCODE OBJECT kredi.
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;You should be able to use KREDI, as it was delivered by SAP, for the select-options and use multiple selection, but not for the parameter. What conclusions can you draw?&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;...&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;In your case, the search help wont be able to fill other fields, so you have to explicitly handle it in the PROCESS ON VALUE REQUEST block. Use FM F4_FIELD_ON_VALUE_REQUEST to call the search-help using parameters SEARCHHELP and MULTIPLE_CHOICE, use returned records of RETURN_TAB to update dynpro fields. &lt;/P&gt;
  &lt;P&gt;&lt;EM&gt;NB: don't forget to handle field STEPL to fill the table-control, starting from value returned by DYNP_GET_STEPL.&lt;/EM&gt;&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;</description>
    <pubDate>Fri, 06 Apr 2018 11:20:46 GMT</pubDate>
    <dc:creator>RaymondGiuseppi</dc:creator>
    <dc:date>2018-04-06T11:20:46Z</dc:date>
    <item>
      <title>Search Help Record_Tab Enable Multiple Selection CV04N</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/search-help-record-tab-enable-multiple-selection-cv04n/m-p/647665#M27764</link>
      <description>&lt;P&gt;Transaction Code: CV04N&lt;/P&gt;
  &lt;P&gt;Go to Object Links tab &amp;gt; Vendor &amp;gt; press F4&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;It will display search help KRED_C (then KRED_T). Elementary search help KREDI (Vendors by Country/Company Code) only allows one selection. My requirement is to enable multiple selection.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;What I did was copied KREDI to ZKREDI and enabled the multiple selection feature (callcontrol-multisel = 'X') in the search help exit. Checkbox is now present to select multiple values. RECORD_TAB now shows the records selected depending on how much boxes were ticked. However, only the last record is being displayed.&lt;/P&gt;
  &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/126446-cvo4n-zkredi.jpg" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;In the screenshot, I selected 5 records. However, only the last record will be displayed in the left table control "Vendor"&lt;/P&gt;
  &lt;P&gt;&lt;U&gt;Search Help Exit Pseudo Code&lt;/U&gt;&lt;/P&gt;
  &lt;P&gt;CHECK sy-tcode EQ 'CV04N'. &lt;/P&gt;
  &lt;P&gt;*EXIT immediately, if you do not want to handle this step &lt;/P&gt;
  &lt;P&gt;IF callcontrol-step &amp;lt;&amp;gt; 'SELONE' AND &lt;/P&gt;
  &lt;P&gt;callcontrol-step &amp;lt;&amp;gt; 'SELECT' AND &lt;/P&gt;
  &lt;P&gt; callcontrol-step &amp;lt;&amp;gt; 'RETURN' AND &lt;/P&gt;
  &lt;P&gt; callcontrol-step &amp;lt;&amp;gt; 'DISP'. &lt;/P&gt;
  &lt;P&gt; EXIT. &lt;/P&gt;
  &lt;P&gt;ENDIF. &lt;/P&gt;
  &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
  &lt;P&gt;"Enable multiple selection &lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;callcontrol-multisel = 'X'. &lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
  &lt;P&gt;IF callcontrol-step = 'RETURN'. &lt;/P&gt;
  &lt;P&gt;ENDIF.&lt;/P&gt;
  &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Problem:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;How can I return multiple selected values in the screen? &lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 17:07:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/search-help-record-tab-enable-multiple-selection-cv04n/m-p/647665#M27764</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-04-03T17:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: Search Help Record_Tab Enable Multiple Selection CV04N</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/search-help-record-tab-enable-multiple-selection-cv04n/m-p/647666#M27765</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;for filling selected data of search help in table control, you should write code.&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;use fm for calling search help &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;F4IF_FIELD_VALUE_REQUEST&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 04:39:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/search-help-record-tab-enable-multiple-selection-cv04n/m-p/647666#M27765</guid>
      <dc:creator>former_member241258</dc:creator>
      <dc:date>2018-04-04T04:39:30Z</dc:date>
    </item>
    <item>
      <title>Re: Search Help Record_Tab Enable Multiple Selection CV04N</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/search-help-record-tab-enable-multiple-selection-cv04n/m-p/647667#M27766</link>
      <description>&lt;P&gt;see below sample code&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;DATA:LT_DDSHRETVAL TYPE STANDARD TABLE OF DDSHRETVAL,&lt;BR /&gt; LS_DDSHRETVAL TYPE DDSHRETVAL,&lt;BR /&gt; LV_IN TYPE I.&lt;BR /&gt; &lt;BR /&gt; DATA:LT_DYNPREAD TYPE STANDARD TABLE OF DYNPREAD,&lt;BR /&gt; LS_DYNPREAD TYPE DYNPREAD.&lt;BR /&gt; &lt;BR /&gt; FIELD-SYMBOLS:&amp;lt;LS_DYNPREAD&amp;gt; TYPE DYNPREAD.&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'&lt;BR /&gt; EXPORTING&lt;BR /&gt; TABNAME = 'MAKT'&lt;BR /&gt; FIELDNAME = 'MAKTX'&lt;BR /&gt; SEARCHHELP = 'ZDEMO_MSH'&lt;BR /&gt; TABLES&lt;BR /&gt; RETURN_TAB = LT_DDSHRETVAL&lt;BR /&gt; EXCEPTIONS&lt;BR /&gt; FIELD_NOT_FOUND = 1&lt;BR /&gt; NO_HELP_FOR_FIELD = 2&lt;BR /&gt; INCONSISTENT_HELP = 3&lt;BR /&gt; NO_VALUES_FOUND = 4&lt;BR /&gt; OTHERS = 5.&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; LOOP AT LT_DDSHRETVAL INTO LS_DDSHRETVAL.&lt;BR /&gt; &lt;BR /&gt; CLEAR GS_MAKT.&lt;BR /&gt; GS_MAKT-MAKTX = LS_DDSHRETVAL-FIELDVAL.&lt;BR /&gt; APPEND GS_MAKT TO GT_MAKT.&lt;BR /&gt; &lt;BR /&gt; ENDLOOP.&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; DO 20 TIMES.&lt;BR /&gt; &lt;BR /&gt; CLEAR LS_DYNPREAD.&lt;BR /&gt; LS_DYNPREAD-FIELDNAME = 'GS_MAKT-MAKTX'.&lt;BR /&gt; LS_DYNPREAD-STEPL = SY-INDEX.&lt;BR /&gt; APPEND LS_DYNPREAD TO LT_DYNPREAD.&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; ENDDO.&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; CALL FUNCTION 'DYNP_VALUES_READ'&lt;BR /&gt; EXPORTING&lt;BR /&gt; DYNAME = 'ZDEMO2'&lt;BR /&gt; DYNUMB = '0100'&lt;BR /&gt; * DETERMINE_LOOP_INDEX = 'X'&lt;BR /&gt; TABLES&lt;BR /&gt; DYNPFIELDS = LT_DYNPREAD&lt;BR /&gt; EXCEPTIONS&lt;BR /&gt; INVALID_ABAPWORKAREA = 1&lt;BR /&gt; INVALID_DYNPROFIELD = 2&lt;BR /&gt; INVALID_DYNPRONAME = 3&lt;BR /&gt; INVALID_DYNPRONUMMER = 4&lt;BR /&gt; INVALID_REQUEST = 5&lt;BR /&gt; NO_FIELDDESCRIPTION = 6&lt;BR /&gt; INVALID_PARAMETER = 7&lt;BR /&gt; UNDEFIND_ERROR = 8&lt;BR /&gt; DOUBLE_CONVERSION = 9&lt;BR /&gt; STEPL_NOT_FOUND = 10&lt;BR /&gt; OTHERS = 11.&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; CLEAR LV_IN.&lt;BR /&gt; &lt;BR /&gt; LOOP AT LT_DYNPREAD ASSIGNING &amp;lt;LS_DYNPREAD&amp;gt;.&lt;BR /&gt; &lt;BR /&gt; CHECK &amp;lt;LS_DYNPREAD&amp;gt;-FIELDVALUE IS INITIAL.&lt;BR /&gt; &lt;BR /&gt; LV_IN = LV_IN + 1.&lt;BR /&gt; &lt;BR /&gt; CLEAR LS_DDSHRETVAL.&lt;BR /&gt; &lt;BR /&gt; READ TABLE LT_DDSHRETVAL INTO LS_DDSHRETVAL INDEX LV_IN.&lt;BR /&gt; &lt;BR /&gt; &amp;lt;LS_DYNPREAD&amp;gt;-FIELDVALUE = LS_DDSHRETVAL-FIELDVAL.&lt;BR /&gt; &lt;BR /&gt; ENDLOOP.&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; CALL FUNCTION 'DYNP_VALUES_UPDATE'&lt;BR /&gt; EXPORTING&lt;BR /&gt; DYNAME = 'ZDEMO2'&lt;BR /&gt; DYNUMB = '0100'&lt;BR /&gt; TABLES&lt;BR /&gt; DYNPFIELDS = LT_DYNPREAD&lt;BR /&gt; EXCEPTIONS&lt;BR /&gt; INVALID_ABAPWORKAREA = 1&lt;BR /&gt; INVALID_DYNPROFIELD = 2&lt;BR /&gt; INVALID_DYNPRONAME = 3&lt;BR /&gt; INVALID_DYNPRONUMMER = 4&lt;BR /&gt; INVALID_REQUEST = 5&lt;BR /&gt; NO_FIELDDESCRIPTION = 6&lt;BR /&gt; UNDEFIND_ERROR = 7&lt;BR /&gt; OTHERS = 8.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 05:25:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/search-help-record-tab-enable-multiple-selection-cv04n/m-p/647667#M27766</guid>
      <dc:creator>former_member241258</dc:creator>
      <dc:date>2018-04-04T05:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: Search Help Record_Tab Enable Multiple Selection CV04N</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/search-help-record-tab-enable-multiple-selection-cv04n/m-p/647668#M27767</link>
      <description>&lt;P&gt;Value of callcontrol-multisel is provided by the caller of the search help not by the search help. Now, go for a small report to perform a test worth a thousand words&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;TABLES: lfa1.
PARAMETER pa_lifnr TYPE lfa1-lifnr MATCHCODE OBJECT kredi.
SELECT-OPTIONS so_lifnr FOR lfa1-lifnr MATCHCODE OBJECT kredi.
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;You should be able to use KREDI, as it was delivered by SAP, for the select-options and use multiple selection, but not for the parameter. What conclusions can you draw?&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;...&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;In your case, the search help wont be able to fill other fields, so you have to explicitly handle it in the PROCESS ON VALUE REQUEST block. Use FM F4_FIELD_ON_VALUE_REQUEST to call the search-help using parameters SEARCHHELP and MULTIPLE_CHOICE, use returned records of RETURN_TAB to update dynpro fields. &lt;/P&gt;
  &lt;P&gt;&lt;EM&gt;NB: don't forget to handle field STEPL to fill the table-control, starting from value returned by DYNP_GET_STEPL.&lt;/EM&gt;&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 11:20:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/search-help-record-tab-enable-multiple-selection-cv04n/m-p/647668#M27767</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2018-04-06T11:20:46Z</dc:date>
    </item>
  </channel>
</rss>

