<?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: Serch Help Exit problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/serch-help-exit-problem/m-p/4348789#M1035640</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What i am suggesting is for testing purpose just remove the function exit and check whether you are getting the records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;another way is to create a database view for that table with filtered records and apply that database view in the "selection method" in the search help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Aug 2008 17:24:38 GMT</pubDate>
    <dc:creator>former_member194669</dc:creator>
    <dc:date>2008-08-19T17:24:38Z</dc:date>
    <item>
      <title>Serch Help Exit problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/serch-help-exit-problem/m-p/4348783#M1035634</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;I have this FM created by me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; FUNCTION z_ricerca_ara_ofi.
*"----------------------------------------------------------------------
*"*"Interfaccia locale:
*"  TABLES
*"      SHLP_TAB TYPE  SHLP_DESCR_TAB_T
*"      RECORD_TAB STRUCTURE  SEAHLPRES
*"  CHANGING
*"     VALUE(SHLP) TYPE  SHLP_DESCR_T
*"     VALUE(CALLCONTROL) LIKE  DDSHF4CTRL STRUCTURE  DDSHF4CTRL
*"----------------------------------------------------------------------

DATA DECLARED ... :P

* EXIT immediately, if you do not want to handle this step
  IF callcontrol-step &amp;lt;&amp;gt; 'SELONE' AND
     callcontrol-step &amp;lt;&amp;gt; 'SELECT' AND
     " AND SO ON
     callcontrol-step &amp;lt;&amp;gt; 'DISP'.
    EXIT.
  ENDIF.

*"----------------------------------------------------------------------
* STEP SELONE  (Select one of the elementary searchhelps)
*"----------------------------------------------------------------------
* This step is only called for collective searchhelps. It may be used
* to reduce the amount of elementary searchhelps given in SHLP_TAB.
* The compound searchhelp is given in SHLP.
* If you do not change CALLCONTROL-STEP, the next step is the
* dialog, to select one of the elementary searchhelps.
* If you want to skip this dialog, you have to return the selected
* elementary searchhelp in SHLP and to change CALLCONTROL-STEP to
* either to 'PRESEL' or to 'SELECT'.
  IF callcontrol-step = 'SELONE'.
*   PERFORM SELONE .........
    EXIT.
  ENDIF.

*"----------------------------------------------------------------------
* STEP PRESEL  (Enter selection conditions)
*"----------------------------------------------------------------------
* This step allows you, to influence the selection conditions either
* before they are displayed or in order to skip the dialog completely.
* If you want to skip the dialog, you should change CALLCONTROL-STEP
* to 'SELECT'.
* Normaly only SHLP-SELOPT should be changed in this step.
  IF callcontrol-step = 'PRESEL'.
*   PERFORM PRESEL ..........
    EXIT.
  ENDIF.
*"----------------------------------------------------------------------
* 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

  IF callcontrol-step = 'SELECT'.

    LOOP AT shlp-selopt INTO ls_interface.
      APPEND ls_interface TO lt_interface.
    ENDLOOP.
....
    STUFF DONE HERE :P.
....
    LOOP AT lt_matnr INTO ls_matnr.
      APPEND ls_matnr TO record_tab.
    ENDLOOP.

  ENDIF.
*"----------------------------------------------------------------------
* STEP DISP     (Display values)
*"----------------------------------------------------------------------
* This step is called, before the selected data is displayed.
* You can e.g. modify or reduce the data in RECORD_TAB
* according to the users authority.
* If you want to get the standard display dialog afterwards, you
* should not change CALLCONTROL-STEP.
* If you want to overtake the dialog on you own, you must return
* the following values in CALLCONTROL-STEP:
* - "RETURN" if one line was selected. The selected line must be
*   the only record left in RECORD_TAB. The corresponding fields of
*   this line are entered into the screen.
* - "EXIT" if the values request should be aborted
* - "PRESEL" if you want to return to the selection dialog
  IF callcontrol-step = 'DISP'.
*   PERFORM AUTHORITY_CHECK TABLES RECORD_TAB USING SHLP.
    EXIT.
  ENDIF.

ENDFUNCTION. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My questions is:&lt;/P&gt;&lt;P&gt;Do i have to write something else in some of the STEPS ?&lt;/P&gt;&lt;P&gt;Because i receive the message that the list is empty, but &lt;EM&gt;lt_matnr&lt;/EM&gt; has 397 lines.&lt;/P&gt;&lt;P&gt;I saw that in some further steps, outside my FM, record_tab is refreshed.&lt;/P&gt;&lt;P&gt;There seams to be something missing from my FM, but i can't figure it out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2008 15:25:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/serch-help-exit-problem/m-p/4348783#M1035634</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-19T15:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: Serch Help Exit problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/serch-help-exit-problem/m-p/4348784#M1035635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Exit Function starts with &lt;STRONG&gt;F4UT&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;function f4ut_shlp_ext_lgobe.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  TABLES
*"      SHLP_TAB TYPE  SHLP_DESCT
*"      RECORD_TAB STRUCTURE  SEAHLPRES
*"  CHANGING
*"     VALUE(SHLP) TYPE  SHLP_DESCR
*"     VALUE(CALLCONTROL) LIKE  DDSHF4CTRL STRUCTURE  DDSHF4CTRL&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and second when you are using exit function for search help that means using this function we add some extra fields display logic etc.&lt;/P&gt;&lt;P&gt;in the below example i am just showing the search help for LGOBE Text in different language along with other fields so i coded in the DISP step.. &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;if callcontrol-step = 'DISP'.


perform authority_check tables record_tab shlp_tab
                           changing shlp callcontrol.

    exit.
  endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;form authority_check  tables   record_tab structure seahlpres
                               shlp_tab type shlp_desct
                      changing p_shlp type shlp_descr
                               p_callcontrol type ddshf4ctrl.

data: wa_shlp  type dfies,
        v_lgobe type zt001l-zlgobe_de,
      lt_record type seahlpres occurs 0 with header line.


read table  shlp_tab index 1.
loop at record_tab.
read table shlp_tab-fielddescr into wa_shlp with key tabname = 'T001L'
                                                 fieldname = 'WERKS'.
*if record_tab-string+3(4) = 1000.
  lt_record-string = record_tab-string.
  select single zlgobe_de
         from zt001l
         into v_lgobe
         where werks = record_tab-string+3(4) and
               lgort = record_tab-string+7(4).
 if sy-subrc eq 0.
 lt_record-string+11(16) = v_lgobe.
 clear v_lgobe.
 append lt_record.
 endif.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;even if you don't do any thing in the exit, but make sure that you have created the Function starts with F4UT*&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2008 15:34:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/serch-help-exit-problem/m-p/4348784#M1035635</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-19T15:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: Serch Help Exit problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/serch-help-exit-problem/m-p/4348785#M1035636</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;create one sample program and try to use the search help created by you, if you directly execute the function module it will not give desired results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sreeram.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2008 15:39:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/serch-help-exit-problem/m-p/4348785#M1035636</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-19T15:39:53Z</dc:date>
    </item>
    <item>
      <title>Re: Serch Help Exit problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/serch-help-exit-problem/m-p/4348786#M1035637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Test the search help without the search help exit "z_ricerca_ara_ofi"&lt;/P&gt;&lt;P&gt;confirm whether you are getting 397 or more records?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and also check your selection method (may be view) is correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2008 15:42:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/serch-help-exit-problem/m-p/4348786#M1035637</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2008-08-19T15:42:55Z</dc:date>
    </item>
    <item>
      <title>Re: Serch Help Exit problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/serch-help-exit-problem/m-p/4348787#M1035638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's too complicated to do it without the exit. I haven't got it yet. &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;&lt;P&gt;BUT searching by hand in those tables, i get to the same result as the program. So i guess i'm right about those 397 records.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2008 17:03:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/serch-help-exit-problem/m-p/4348787#M1035638</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-19T17:03:21Z</dc:date>
    </item>
    <item>
      <title>Re: Serch Help Exit problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/serch-help-exit-problem/m-p/4348788#M1035639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So it's ok to use record_tab as the result table, right ?&lt;/P&gt;&lt;P&gt;I only need to add something after &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;if callcontrol-step = 'DISP'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; regarding record_tab (assuming i did the "f4ut*" change)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2008 17:05:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/serch-help-exit-problem/m-p/4348788#M1035639</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-19T17:05:32Z</dc:date>
    </item>
    <item>
      <title>Re: Serch Help Exit problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/serch-help-exit-problem/m-p/4348789#M1035640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What i am suggesting is for testing purpose just remove the function exit and check whether you are getting the records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;another way is to create a database view for that table with filtered records and apply that database view in the "selection method" in the search help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2008 17:24:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/serch-help-exit-problem/m-p/4348789#M1035640</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2008-08-19T17:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: Serch Help Exit problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/serch-help-exit-problem/m-p/4348790#M1035641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there guys.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help and for the ideas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The answer was allot simpler. It was only needed to add one line &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;callcontrol-step = 'DISP'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; before the corresponding ENDIF of &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF callcontrol-step = 'SELECT'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is what I did:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FUNCTION z_ricerca_ara_ofi.
*"----------------------------------------------------------------------
*"*"Interfaccia locale:
*"  TABLES
*"      SHLP_TAB TYPE  SHLP_DESCR_TAB_T
*"      RECORD_TAB STRUCTURE  SEAHLPRES
*"  CHANGING
*"     VALUE(SHLP) TYPE  SHLP_DESCR_T
*"     VALUE(CALLCONTROL) LIKE  DDSHF4CTRL STRUCTURE  DDSHF4CTRL
*"----------------------------------------------------------------------

  DATA: BEGIN OF ls_cawnt,
        atinn TYPE atinn,
        spras TYPE spras,
        adzhl TYPE adzhl,
        atzhl TYPE atzhl,
        END OF ls_cawnt.

  DATA: BEGIN OF ls_cawn,
        atwrt TYPE atwrt,
        atflv TYPE atflv,
        END OF ls_cawn.

  DATA: BEGIN OF ls_cabn,
        atfor TYPE atfor,
        anzst TYPE anzst,
        anzdz TYPE anzdz,
        END OF ls_cabn.

  DATA: BEGIN OF lt_ausp OCCURS 0,
        objek TYPE objnum,
        cuobf	TYPE cuobm,
        END OF lt_ausp,
        ls_ausp LIKE LINE OF lt_ausp.

  DATA: lt_interface TYPE STANDARD TABLE OF ddshselopt,
        ls_interface LIKE LINE OF lt_interface,
        strwhere TYPE string,
        strwhere2 TYPE string
         .

  TYPES: BEGIN OF gs_matnr,
          matnr TYPE matnr,
         END OF gs_matnr.
  DATA: lt_matnr TYPE TABLE OF gs_matnr,
        ls_matnr TYPE gs_matnr.

  DATA: BEGIN OF s_matnr OCCURS 0,
         sign(1),
         option(2),
         low  TYPE matnr,
         high TYPE matnr,
        END OF s_matnr.

  DATA: BEGIN OF s_maktg OCCURS 0,
         sign(1),
         option(2),
         low  TYPE maktg,
         high TYPE maktg,
        END OF s_maktg.

  DATA: BEGIN OF s_spras OCCURS 0,
         sign(1),
         option(2),
         low  TYPE spras,
         high TYPE spras,
        END OF s_spras.

  DATA: BEGIN OF s_zzcodara OCCURS 0,
         sign(1),
         option(2),
         low  TYPE zzcodara,
         high TYPE zzcodara,
        END OF s_zzcodara.

  DATA: BEGIN OF s_zzcodofi OCCURS 0,
         sign(1),
         option(2),
         low  TYPE zzcodofi,
         high TYPE zzcodofi,
        END OF s_zzcodofi.

  DATA: BEGIN OF s_carat1 OCCURS 0,
        sign(1),
        option(2),
        low  TYPE zcarat,
        high TYPE zcarat,
       END OF s_carat1.

  DATA: BEGIN OF s_carat2 OCCURS 0,
        sign(1),
        option(2),
        low  TYPE zcarat,
        high TYPE zcarat,
       END OF s_carat2.

  DATA: BEGIN OF s_carat3 OCCURS 0,
        sign(1),
        option(2),
        low  TYPE zcarat,
        high TYPE zcarat,
       END OF s_carat3.

  DATA: BEGIN OF s_categ OCCURS 0,
        sign(1),
        option(2),
        low  TYPE zcateg,
        high TYPE zcateg,
       END OF s_categ.

* EXIT immediately, if you do not want to handle this step
  IF callcontrol-step &amp;lt;&amp;gt; 'SELONE' AND
     callcontrol-step &amp;lt;&amp;gt; 'SELECT' AND
     " AND SO ON
     callcontrol-step &amp;lt;&amp;gt; 'DISP'.
    EXIT.
  ENDIF.

*"----------------------------------------------------------------------
* STEP SELONE  (Select one of the elementary searchhelps)
*"----------------------------------------------------------------------
* This step is only called for collective searchhelps. It may be used
* to reduce the amount of elementary searchhelps given in SHLP_TAB.
* The compound searchhelp is given in SHLP.
* If you do not change CALLCONTROL-STEP, the next step is the
* dialog, to select one of the elementary searchhelps.
* If you want to skip this dialog, you have to return the selected
* elementary searchhelp in SHLP and to change CALLCONTROL-STEP to
* either to 'PRESEL' or to 'SELECT'.
  IF callcontrol-step = 'SELONE'.
*   PERFORM SELONE .........
    EXIT.
  ENDIF.

*"----------------------------------------------------------------------
* STEP PRESEL  (Enter selection conditions)
*"----------------------------------------------------------------------
* This step allows you, to influence the selection conditions either
* before they are displayed or in order to skip the dialog completely.
* If you want to skip the dialog, you should change CALLCONTROL-STEP
* to 'SELECT'.
* Normaly only SHLP-SELOPT should be changed in this step.
  IF callcontrol-step = 'PRESEL'.
*   PERFORM PRESEL ..........
    EXIT.
  ENDIF.
*"----------------------------------------------------------------------
* 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

  IF callcontrol-step = 'SELECT'.

    LOOP AT shlp-selopt INTO ls_interface.
      APPEND ls_interface TO lt_interface.
    ENDLOOP.

    READ TABLE lt_interface INTO ls_interface WITH KEY shlpfield = 'MATNR'.
    IF sy-subrc = 0.
      s_matnr-sign = ls_interface-sign.
      s_matnr-option = ls_interface-option.
      s_matnr-low = ls_interface-low.
      APPEND s_matnr.
      CONCATENATE strwhere ' mara~matnr IN s_matnr AND' INTO strwhere.
      CLEAR ls_interface.
    ENDIF.

    READ TABLE lt_interface INTO ls_interface WITH KEY shlpfield = 'MAKTG'.
    IF sy-subrc = 0.
      s_maktg-sign = ls_interface-sign.
      s_maktg-option = ls_interface-option.
      s_maktg-low = ls_interface-low.
      APPEND s_maktg.
      CONCATENATE strwhere ' MAKTG IN s_maktg AND' INTO strwhere.
      CLEAR ls_interface.
    ENDIF.

    READ TABLE lt_interface INTO ls_interface WITH KEY shlpfield = 'SPRAS'.
    IF sy-subrc = 0.
      s_spras-sign = ls_interface-sign.
      s_spras-option = ls_interface-option.
      s_spras-low = ls_interface-low.
      APPEND s_spras.
      CONCATENATE strwhere ' spras IN s_spras AND' INTO strwhere.
      CLEAR ls_interface.
    ENDIF.

    READ TABLE lt_interface INTO ls_interface WITH KEY shlpfield = 'ZZCODARA'.
    IF sy-subrc = 0.
      s_zzcodara-sign = ls_interface-sign.
      s_zzcodara-option = ls_interface-option.
      s_zzcodara-low = ls_interface-low.
      APPEND s_zzcodara.
      CONCATENATE strwhere ' zzcodara IN s_zzcodara AND' INTO strwhere.
      CLEAR ls_interface.
    ENDIF.

    READ TABLE lt_interface INTO ls_interface WITH KEY shlpfield = 'ZZCODOFI'.
    IF sy-subrc = 0.
      s_zzcodofi-sign = ls_interface-sign.
      s_zzcodofi-option = ls_interface-option.
      s_zzcodofi-low = ls_interface-low.
      APPEND s_zzcodofi.
      CONCATENATE strwhere ' zzcodofi IN s_zzcodofi AND' INTO strwhere.
      CLEAR ls_interface.
    ENDIF.

    READ TABLE lt_interface INTO ls_interface WITH KEY shlpfield = 'CARAT1'.
    IF sy-subrc = 0.
      s_carat1-sign = ls_interface-sign.
      s_carat1-option = ls_interface-option.
      s_carat1-low = ls_interface-low.
      APPEND s_carat1.
      CONCATENATE strwhere2 ' ATWTB IN s_carat1 AND' INTO strwhere2.
      CLEAR ls_interface.
    ENDIF.

    READ TABLE lt_interface INTO ls_interface WITH KEY shlpfield = 'CARAT2'.
    IF sy-subrc = 0.
      s_carat2-sign = ls_interface-sign.
      s_carat2-option = ls_interface-option.
      s_carat2-low = ls_interface-low.
      APPEND s_carat2.
      CONCATENATE strwhere2 ' ATWTB IN s_carat2 AND' INTO strwhere2.
      CLEAR ls_interface.
    ENDIF.

    READ TABLE lt_interface INTO ls_interface WITH KEY shlpfield = 'CARAT3'.
    IF sy-subrc = 0.
      s_carat3-sign = ls_interface-sign.
      s_carat3-option = ls_interface-option.
      s_carat3-low = ls_interface-low.
      APPEND s_carat3.
      CONCATENATE strwhere2 ' ATWTB IN s_carat3 AND' INTO strwhere2.
      CLEAR ls_interface.
    ENDIF.

    IF ( NOT strwhere2 IS INITIAL ).

      SHIFT strwhere2 RIGHT DELETING TRAILING 'AND'.

      SELECT SINGLE atinn spras adzhl atzhl
      FROM cawnt
      INTO CORRESPONDING FIELDS OF ls_cawnt
      WHERE (strwhere2).

      SELECT SINGLE atwrt atflv
      FROM cawn
      INTO CORRESPONDING FIELDS OF ls_cawn
      WHERE atinn EQ ls_cawnt-atinn
        AND atzhl EQ ls_cawnt-atzhl.

      SELECT SINGLE atfor anzst anzdz
      FROM cabn
      INTO CORRESPONDING FIELDS OF ls_cabn
      WHERE atinn EQ ls_cawnt-atinn
        AND adzhl EQ ls_cawnt-adzhl.

      IF ls_cabn-atfor = 'CHAR'.
        SELECT objek
        FROM ausp
        INTO CORRESPONDING FIELDS OF TABLE lt_ausp
        WHERE atinn EQ ls_cawnt-atinn
          AND adzhl EQ ls_cawnt-adzhl
          AND atwrt EQ ls_cawn-atwrt.
      ENDIF.

      IF ls_cabn-atfor = 'NUM'.
        SELECT objek
        FROM ausp
        INTO CORRESPONDING FIELDS OF TABLE lt_ausp
        WHERE atinn EQ ls_cawnt-atinn
          AND adzhl EQ ls_cawnt-adzhl
          AND atflv GE ls_cawn-atflv
          AND atflb LE ls_cawn-atflv.
      ENDIF.

      LOOP AT lt_ausp INTO ls_ausp.
        MOVE ls_ausp-objek+0(18) TO ls_ausp-cuobf.
        MODIFY lt_ausp INDEX sy-tabix FROM ls_ausp
               TRANSPORTING cuobf.
      ENDLOOP.

      IF sy-subrc = 0.
        SELECT matnr
        FROM mara
        INTO CORRESPONDING FIELDS OF TABLE lt_matnr
        FOR ALL ENTRIES IN lt_ausp
        WHERE cuobf EQ lt_ausp-cuobf.
      ENDIF.

    ENDIF.

    SHIFT strwhere RIGHT DELETING TRAILING 'AND'.

    IF NOT s_matnr-low IS INITIAL.
      SELECT mara~matnr
      FROM mara
            JOIN makt ON mara~matnr = makt~matnr
      INTO CORRESPONDING FIELDS OF TABLE lt_matnr
      WHERE (strwhere) " mara~prdha IN s_categ AND spras IN s_spras "
        .
    ENDIF.

    LOOP AT lt_matnr INTO ls_matnr.
      APPEND ls_matnr TO record_tab.
    ENDLOOP.

    callcontrol-step = 'DISP'.
    CLEAR s_categ.
    CLEAR lt_matnr. REFRESH lt_matnr.
    CLEAR ls_matnr.
  ENDIF.
*"----------------------------------------------------------------------
* STEP DISP     (Display values)
*"----------------------------------------------------------------------
* This step is called, before the selected data is displayed.
* You can e.g. modify or reduce the data in RECORD_TAB
* according to the users authority.
* If you want to get the standard display dialog afterwards, you
* should not change CALLCONTROL-STEP.
* If you want to overtake the dialog on you own, you must return
* the following values in CALLCONTROL-STEP:
* - "RETURN" if one line was selected. The selected line must be
*   the only record left in RECORD_TAB. The corresponding fields of
*   this line are entered into the screen.
* - "EXIT" if the values request should be aborted
* - "PRESEL" if you want to return to the selection dialog
  IF callcontrol-step = 'DISP'.
*    PERFORM authority_check TABLES record_tab shlp_tab
*                               CHANGING shlp callcontrol.
*    EXIT.
  ENDIF.

ENDFUNCTION.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's true that it was not obligatory to do something in that perform (that's why it's still commented), but still I did not have to change the name in F4UT*.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there is a special reason i have to change it in F4UT* pls tell me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for you help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Marius Cosmin Stoica on Aug 19, 2008 8:13 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2008 18:12:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/serch-help-exit-problem/m-p/4348790#M1035641</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-19T18:12:10Z</dc:date>
    </item>
    <item>
      <title>Re: Serch Help Exit problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/serch-help-exit-problem/m-p/4348791#M1035642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The search help exit function will always be identified with F4UT* this is the general convention.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it is documented By SAP in the Search help exit Documentation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2008 18:17:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/serch-help-exit-problem/m-p/4348791#M1035642</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-19T18:17:53Z</dc:date>
    </item>
  </channel>
</rss>

