<?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 How to create search help exits (function modules for search help) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-search-help-exits-function-modules-for-search-help/m-p/2472638#M556044</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a simple Z-table for which I have created a search help, and I need to create a &amp;lt;b&amp;gt;search help exit (function module)&amp;lt;/b&amp;gt; to use with this search help. In this function module I have to restrict the selection of entries from the Z-table which are to be displayed in the F4-list. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a special way of creating a search help exit function module? Which &amp;lt;b&amp;gt;import parameters&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;export parameters&amp;lt;/b&amp;gt;, and &amp;lt;b&amp;gt;tables&amp;lt;/b&amp;gt; are available? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALL HELPFUL ANSWERS WILL BE REWARDED!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Mari Virik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Jun 2007 09:19:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-25T09:19:52Z</dc:date>
    <item>
      <title>How to create search help exits (function modules for search help)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-search-help-exits-function-modules-for-search-help/m-p/2472638#M556044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a simple Z-table for which I have created a search help, and I need to create a &amp;lt;b&amp;gt;search help exit (function module)&amp;lt;/b&amp;gt; to use with this search help. In this function module I have to restrict the selection of entries from the Z-table which are to be displayed in the F4-list. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a special way of creating a search help exit function module? Which &amp;lt;b&amp;gt;import parameters&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;export parameters&amp;lt;/b&amp;gt;, and &amp;lt;b&amp;gt;tables&amp;lt;/b&amp;gt; are available? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALL HELPFUL ANSWERS WILL BE REWARDED!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Mari Virik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 09:19:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-search-help-exits-function-modules-for-search-help/m-p/2472638#M556044</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T09:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to create search help exits (function modules for search help)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-search-help-exits-function-modules-for-search-help/m-p/2472639#M556045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;See the links&lt;/P&gt;&lt;P&gt;Search Help Exits:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="2291334"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="2956586"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 09:26:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-search-help-exits-function-modules-for-search-help/m-p/2472639#M556045</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T09:26:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to create search help exits (function modules for search help)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-search-help-exits-function-modules-for-search-help/m-p/2472640#M556046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can copy the standard search help exit and make a z copy of &lt;/P&gt;&lt;P&gt;Function Module : F4IF_SHLP_EXIT_EXAMPLE &lt;/P&gt;&lt;P&gt;and include in your search help after making the necessary changes. Please checkout for the RECORD-TAB .. how it is getting poulated by the help of a debugger in the z FM. &lt;/P&gt;&lt;P&gt;RECORD_-TAB  will contain the details that is finally output to the screen as search help &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can read documentation for FM: F4IF_SHLP_EXIT_EXAMPLE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;More details :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee52446011d189700000e8322d00/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee52446011d189700000e8322d00/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://fuller.mit.edu/tech/search_helps.ppt#260,5,Simple" target="test_blank"&gt;http://fuller.mit.edu/tech/search_helps.ppt#260,5,Simple&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/dictionary/shelp/shelp_elementary.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/dictionary/shelp/shelp_elementary.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/dictionary/shelp/shelp_exit.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/dictionary/shelp/shelp_exit.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 09:26:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-search-help-exits-function-modules-for-search-help/m-p/2472640#M556046</guid>
      <dc:creator>former_member150733</dc:creator>
      <dc:date>2007-06-25T09:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to create search help exits (function modules for search help)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-search-help-exits-function-modules-for-search-help/m-p/2472641#M556047</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;Go thru the Following Link,&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee52446011d189700000e8322d00/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee52446011d189700000e8322d00/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/implementing%2bsearch%2bhelp%2bexits" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/implementing%2bsearch%2bhelp%2bexits&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Padmam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 09:33:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-search-help-exits-function-modules-for-search-help/m-p/2472641#M556047</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T09:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to create search help exits (function modules for search help)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-search-help-exits-function-modules-for-search-help/m-p/2472642#M556048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Mari&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have to copy the sample function module &lt;B&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;F4IF_SHLP_EXIT_EXAMPLE&lt;/P&gt; and adjust it to your requirements.&lt;BR /&gt;I can give you a few coding pieces that may be helpful.&lt;BR /&gt;&lt;BR /&gt;&lt;B&gt;&lt;P&gt;(1) Change the STEP SELECT in your exit function module&lt;/P&gt;&lt;/B&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*"----------------------------------------------------------------------
* STEP SELECT    (Select values)
*"----------------------------------------------------------------------
* This step may be used to overtake the data selection completely.
* To skip the standard seletion, you should return 'DISP' as following
* step in CALLCONTROL-STEP.
* Normally RECORD_TAB should be filled after this step.
* Standard function module F4UT_RESULTS_MAP may be very helpfull in this
* step.
  DATA: rc LIKE sy-subrc.
  IF callcontrol-step = 'SELECT'.
    PERFORM step_select_kostl
                       CHANGING
                             record_tab[] shlp_tab[]
                             shlp callcontrol rc.
    IF rc = 0.
      callcontrol-step = 'DISP'.
    ELSE.
      callcontrol-step = 'EXIT'.
    ENDIF.
    EXIT. "Don't process STEP DISP additionally in this call.
  ENDIF.
*"----------------------------------------------------------------------
* STEP DISP     (Display values)
*"----------------------------------------------------------------------&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;(1.a) Selection step in detail:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  step_select_kostl
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      --&amp;gt;P_RECORD_TAB  text
*      --&amp;gt;P_SHLP_TAB  text
*      &amp;lt;--P_SHLP  text
*      &amp;lt;--P_CALLCONTROL  text
*      &amp;lt;--P_RC  text
*----------------------------------------------------------------------*
FORM step_select_kostl
                  CHANGING
                       ct_record_tab    TYPE ddshreslts
                       ct_shlp_tab      TYPE shlp_desct
                        cs_shlp         TYPE shlp_descr_t
                        cs_callcontrol  TYPE ddshf4ctrl
                        cd_rc           TYPE syst-subrc.

...
* If the CREATE method returned an instance then get the values
* for the F4 list
  CHECK ( lo_f4kostl IS BOUND ).
  CALL METHOD lo_f4kostl-&amp;gt;get_f4_list
    RECEIVING
      rdo_data = ldo_data.
* NOTE: This method does not return the list directly but a
*       data reference to the list.

* Next we dereference the data reference by assigning it to
* an field symbol typed as (generic) table.
  ASSIGN ldo_data-&amp;gt;* TO &amp;lt;lt_list&amp;gt;.

* NOTE: The structure of the list data is provided in the instance
*       attribute MD_TABNAME. This attribute can be initial. However,
* the list data MUST have a FLAT structure, otherwise the mapping
* function module may raise an exception.

* Konvertierung in F4-Format (Trefferliste für Suchhilfe)
  CALL METHOD /bvccsap/cl_im_c1_f4kostl=&amp;gt;map_f4ut_results
     EXPORTING
       id_source_structure   = lo_f4kostl-&amp;gt;md_tabname
*      ID_APPLY_RESTRICTIONS = ' '
    CHANGING
      cs_shlp               = cs_shlp
      cs_callcontrol        = cs_callcontrol
      ct_shlp_tab           = ct_shlp_tab
      ct_record_tab         = ct_record_tab
      ct_source_tab         = &amp;lt;lt_list&amp;gt;.

ENDFORM.                    " step_select_kostl&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a class which returns the selected data as data reference. The data reference is de-referenced to field symbol (of TYPE table) which is then mapped to the parameters of the function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;(2) Mapping of selected data to search help parameter:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;METHOD map_f4ut_results .


  CALL FUNCTION 'F4UT_RESULTS_MAP'
    EXPORTING
      source_structure         = id_source_structure
*     APPLY_RESTRICTIONS       = ' '
    TABLES
      shlp_tab                 = ct_shlp_tab
      record_tab               = ct_record_tab
      source_tab               = ct_source_tab
    CHANGING
      shlp                     = cs_shlp
      callcontrol              = cs_callcontrol
    EXCEPTIONS
      illegal_structure        = 1
      OTHERS                   = 2.
  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.


ENDMETHOD.&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;  Uwe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 09:35:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-search-help-exits-function-modules-for-search-help/m-p/2472642#M556048</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2007-06-25T09:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to create search help exits (function modules for search help)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-search-help-exits-function-modules-for-search-help/m-p/2472643#M556049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again Uwe, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying out your solution, but I get the error message &amp;lt;b&amp;gt;The type "SHLP_DESCR_T" is unknown&amp;lt;/b&amp;gt;. The type is in the system as part of type group SHLP - do I have to include this type group anywhere? How and where?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you, points will be rewarded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Mari&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 10:24:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-search-help-exits-function-modules-for-search-help/m-p/2472643#M556049</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T10:24:47Z</dc:date>
    </item>
  </channel>
</rss>

