Adding the search help in program

hi i want to add a search help in program for a particular field of a parameter how to do this?

U need to create a serach help exit for this purpose.
F4IF_SHLP_EXIT_EXAMPLE - documents the different reasons to use a search help exit, and shows how it is done.
http://www.sapdevelopment.co.uk/dictionary/shelp/shelp_exit.htm
http://www.sapdevelopment.co.uk/dictionary/shelp/shelp_basic.htm
Create an Elementary Search help:
Eg: Zsearch
In the defintion tab:
Give the search help exit name: Zsearch_exit.
Also give the search help param and data element.
Copy F4IF_SHLP_EXIT_EXAMPLE into Zsearch_exit
Comment:
callcontrol-step = 'SELECT'.  (1st line)
Inside:
  IF CALLCONTROL-STEP = 'SELECT'.
Select required data for the search help
Select stmnts as per your requirement and populate in itab.
Move all the selected records to Record_Tab
    LOOP AT itab INTO wa_itab.
      MOVE wa_itab TO record_tab-string.
      APPEND record_tab.
      CLEAR record_tab.
    ENDLOOP.
    RC = 0 .
    IF RC = 0.
      CALLCONTROL-STEP = 'DISP'.
    ELSE.
      CALLCONTROL-STEP = 'EXIT'.
    ENDIF.
    EXIT. "Don't process STEP DISP additionally in this call.
Let me know if its working for you.
Also, chek this link if it helps you:Re: Find Storage location with respect to Plant

Similar Messages

  • Adding a new field to the search help exit

    Hi friends,
    adding a new field to the search help exit. How does it work ?
    Thanks in advace
    Ilhan

    The search help exit allows you to modify functionality of search help. If you add a new field to the
    parameter list that is not contained on the selection method you can manually populate it within the search
    help exit.
    This  would be performed within the u2018STEP DISPu2019 section. Once within this section all search help
    data has been retrieved and is stored in table RECORD_TAB (record_tab-string) as one long string value.
    Therefore you need to read table SHLP in-order to locate position of value within string.
    Example:
    To find position of personnel number (PERNR) within elemenory search
    help M_PREMN you would use the following code:
    Loop at record_tab.
         read table shlp-fielddescr into wa_shlp
                                       with key tabname   = 'M_PREMN'
                                                fieldname = 'PERNR'.
    You could then use this information in the following way, for
    example, to find a persons organisation unit:
          select  orgeh endda
            up to 1 rows
            from pa0001
            into (ld_orgeh,ld_endda)
           where pernr eq record_tab-string+wa_shlp-offset(8)
                                                      u201Cpernr length is 8
           order by endda descending.
          endselect.
          select single orgtx
            from t527x
            into ld_orgtxt
           where orgeh eq ld_orgeh and
                 sprsl eq sy-langu and
               ( endda ge sy-datum and
                 begda le sy-datum ).
    If you have added a new field to the end of the parameters list
    the next step is to populate it by adding this data to the end of
    the record_tab string:
      concatenate record_tab-string ld_orgtxt into record_tab-string.
      modify record_tab.
    endloop.

  • How to restrict the search help given to a field for a specific program ??

    Hi,
    I have one search help which is attached to a field.
    This seach help is using a Z table and showing values perfectly for one program where I attached earlier.
    The same fields and Z table I am using is some other related program where user wants to see the restricted values only.
    I am not getting, how a search help can be restricted.
    I try to take a example of it.
    If in first program the search help values are:
    Material           Level
    Orange              1
    Mango               2
    Grapes              3
    Now in the second program user wants to see only levels not the material. I Have given only two colums for understanding purposes not all .
    Please suggest what are the possible ways we can do it.
    Thanks right now.
    -=Maddu=-

    Hi,
    Use this event
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_cc.
      PERFORM company_code CHANGING p_cc.
    FORM company_code CHANGING p_cc.
      DATA: dynpfld_mapping LIKE dselc OCCURS 0 WITH HEADER LINE.
      REFRESH gt_bukrs.
      SELECT * FROM t001
      INTO CORRESPONDING FIELDS OF TABLE gt_bukrs.
      LOOP AT gt_bukrs.
    **ST AS ON 08.09.2006
        AUTHORITY-CHECK OBJECT 'ZREP_TMF'
              ID 'BUKRS' FIELD gt_bukrs-bukrs
              ID 'VKORG' FIELD gt_bukrs-bukrs
              ID 'VKBUR' DUMMY
              ID 'SPART' DUMMY
              ID 'VTWEG' DUMMY.
       AUTHORITY-CHECK OBJECT 'ZREM_ORG'
             ID 'VKORG' FIELD gt_bukrs-bukrs
             ID 'VKBUR' DUMMY
             ID 'SPART' DUMMY
             ID 'VTWEG' DUMMY.
    **ST AS ON 08.09.2006
        IF sy-subrc NE 0.
          DELETE gt_bukrs.
        ENDIF.
      ENDLOOP.
      dynpfld_mapping-fldname   = 'BUKRS'.
      dynpfld_mapping-dyfldname = 'BUKRS'.
      APPEND dynpfld_mapping.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'BUKRS'
          dynpprog        = 'ZREM_AGENCY_REPORT'
          dynpnr          = '1000'
          dynprofield     = 'COMPANY'
          value_org       = 'S'
        TABLES
          value_tab       = gt_bukrs
          return_tab      = return_tab
          dynpfld_mapping = dynpfld_mapping.
    ENDFORM.                    " sale_org
    Reward points

  • How to add the search help in Screen programming "F4" help

    i add the input field
    se51 --> layout and now want to add the search help with these field,
    please help me... in this way.

    Looks like u r a novice in Mp programming.
    Please look at some demo programs in SAP which can teach u the basics of Module Pool programming . Use Demo* in se38 and search first in sap and then in some other sites.
    The above thing can be done in Process on value request .
    Br, vijay.

  • How to restrict the values for selection in the search help..

    hi,
    i have a requirement regarding screen programming. i have added a i/o field in a screen and i linked a search help for that field.
    i used the standard search help it holds some 15 values for selection...
    when i click on the  search help i m getting some 15 values for selection. but i dont need all the 15 values. i need only 4 values for selection..can any one help me regarding this...
    waiting for ur reply...
    Uday.
    Edited by: uday13 on May 31, 2010 9:17 AM

    Hello,
    Refer the below code and you can provide your own search help to a parameter depending on the value in another parameter:-
    PARAMETERS : p_belnr TYPE belnr,
                 p_bukrs TYPE bukrs.
    DATA : BEGIN OF itab OCCURS 0,
             bukrs TYPE bukrs,
           END OF itab.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_bukrs.
      PERFORM f4_bukrs_help USING p_bukrs.
    *&      Form  f4_bukrs_help
    FORM f4_bukrs_help USING p_bukrs.
      DATA : itab TYPE STANDARD TABLE OF it WITH HEADER LINE,
             tb_dynpfields LIKE dynpread OCCURS 0 WITH HEADER LINE,
             v_belnr TYPE belnr.
      CLEAR:   tb_dynpfields.
      REFRESH: tb_dynpfields.
      MOVE 'P_BELNR' TO tb_dynpfields-fieldname.
      APPEND tb_dynpfields.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname                               = 'Z_F4' "program name
          dynumb                               = '1000' "screen number
        TABLES
          dynpfields                           = tb_dynpfields
      IF sy-subrc NE 0.
      ENDIF.
    READ TABLE tb_dynpfields INDEX 1.
      IF sy-subrc EQ 0.
        v_belnr = tb_dynpfields-fieldvalue.
      ENDIF.
      SELECT bukrs from <db_table> INTO TABLE itab WHERE belnr = v_belnr.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield               = 'BURKS' "internal table field
          dynpprog               = 'Z_F4' "program name
          dynpnr                 = '1000' "screen number
          dynprofield            = 'P_BUKRS' "screen field name
          value_org              = 'S'
        TABLES
          value_tab              = itab "internal table
      IF sy-subrc NE 0.
      ENDIF.
    ENDFORM.                    " f4_bukrs_help
    Hope this helps you.
    Regards,
    Tarun

  • How to restrict the results in the search help

    Hi Friends,
    My current assignment calls for a program using search help. The scenario is.. there are different radio buttons for organizational units and if a unit is selected, corresponding users need to be displayed in the screen. Multiple selection should be allowed.
    I created the search help and attached it to the screen field userid. I am able to display all the users.
    But my problem is , i need to consider the organizational unit before displaying the users... If the radio button for A/R is selected, only the A/R should be displayed.....
    Is there any way that we could restrict the entries in the search help? Please help me with your expert advices and
    suggestions.
    Thanks
    Poornima

    Hi,
    Refer this link:
    http://help.sap.com/saphelp_45b/helpdata/en/cf/21ee2b446011d189700000e8322d00/content.htm
    Regards,
    Prashant

  • Removing the Search Helper Extension and Bing Bar

    The above question has been asked a number of times already, and some replies date back 8 months or more. Sadly, whilst the
    offers of help are much appreciated, they no longer seems to fix the problem, AFAICS.
    My setup details, if it assists:
    Dell Inspiron N5110 laptop
    Intel(R) Core(TM) i7-2630QM CPU @ 2,00GHz
    4.00GB RAM
    WDC [Western Digital) WD6400BPVT-75HXZT1 5400 6.5GB HDD
    NVIDIA GeForce GT 525M video card
    Intel(R) HD Graphics 3000 64meg onchip GPU
    Win 7 Home Premium 64bit SP1
    Mozilla Firefox v4.0.1
    Having bought the above laptop, I am in the process of changing from old to new. During a mass MS update session, Firefox was
    impregnated with a 'bing' search box and button [It is perfectly possible that I inadvertantly 'speed clicked' a sneaky 'install me'
    button on the way]. Anyhoo, I now have said search box/button and want rid asap. The Firefox help suggests following the
    advice in their item entitled 'Removing the Search Helper Extension and Bing Bar', but this shows as out of date. Furthermore, I
    have no 'bing' or 'search helper extension' entries in my 'Programs & Features' applet in Control Panel, neither do I have MS
    KB982217 installed to uninstall. There are no eponymous entries in Firefox's 'Tools/Addons' menu.
    Any ideas, please?

    Apologies for the formatting there. No idea what went wrong...

  • Search help with programming

    Hai,
    Can any one give example for search help with Programming?
    I hope we can create search help with help of coding.
    With Regards,Jaheer.

    yes u can create search help by using match code in programs
    for eq
    go with abap editor se 38
    provide the name of program
    parameters : vendor like lfa1-lifnr matchcode object yzob.
    double click on yzob
    provide description for search help
    provide selection method
    provide search help parameter
    enable check box for import and export
    provide lpos
               spos
    save check activate
    press f4 for check and import values i.e it will display a records list available in database table
    rewards points please

  • How to implement the search help exit to MM01 for Material by product hiera

    Hi,
    How to implement the search help exit to MM01 T-code for Material by product hierarchy,
    but system default it gives the data from MVKE table, my client wants from MARA table,
    i created the one Function Module, write this code in that FM.
    IF CALLCONTROL-STEP EQ 'DISP'.
    REFRESH RECORD_TAB.
    SELECT * FROM MARA INTO TABLE RECORD_TAB
    WHERE PRDHA = 
    ENDIF.
    I Face the problem what variable i have to pass in WHERE CONDITION, FROM THE MM01 T-code.
    is't require to IMPORT variable from MM01 program, what is that import variable, please give me the solution.
    thanks to all.

    Hi there..
    check my web blog on search help exit...
    [Search help exit code|https://wiki.sdn.sap.com/wiki/x/du0]

  • How to locate the Search Help?

    Hi,
    According to the following code the search help is “cram”, but when I went to the "crhd" Dictionary using SE11 could not find any search help for field "arbpl" such as “cram”. This means there is another way of finding the search help. 
    SELECT-OPTIONS zw_werks FOR crhd-arbpl MATCHCODE OBJECT cram
    Thanks,
    Kishan

    Hi Surjit,
    The Code works perfectly. I copied this code from another program and confused from where the "cram" search help come from. It's not in the Dictionary of "CRHD" and field "ARBPL".
    Thanks,
    Kishan

  • Search help freely programmed

    Hi all,
    is anyone able to explain me how to use Search Help freely programmed?
    thanks
    GN

    Hi Gabriele,
    Please go through the component DEMO_VALUE_HELP. This explains all the input help types. The freely programmed search help has been implemented for the CONNID input field of view V1. The Web Dynpro component FREE_VALUE_HELP in the same package is the component where the search help is coded.
    Also below are the steps to be followed for implementing the freely programmed search help.
    This kind of value help is implemented as a Web Dynpro component implementing the Web Dynpro
    component interface IWD_VALUE_HELP. To be able to use the value help for a certain input field, the following steps are necessary:
    1) A component usage of the value help component (HC) has to be declared
    by the consumer component (CC).
    2) A usage of the HC interface controller has to be declared in the CC view.
    3) The input help mode User-Defined Programming has to be chosen for the attribute that is bound to the input field under consideration. The HC usage must be related to this attribute. The component interface of the HC has only one method: set_value_help_listener( ). This method is called by the Web Dynpro runtime if the value help button of the input field under consideration is clicked. The HC has to be implemented as follows:
    1) The method set_value_help_listener( ) has an import parameter. This means that the reference to the listener, provided by the Web Dynpro runtime, is passed to the user-defined HC. This reference has to be saved as a user defined controller attribute.
    2)  To close the help value dialog box, the close_window( ) method of the listener has to be used.
    3)  All views have to be embedded into a window having the name WD_VALUE_HELP. This name is used by the Web Dynpro runtime.
    4) To exchange data between the CC and the HC, context mapping can be used.
    For implementing the component interface IWD_VALUE_HELP, you need to choose the Reimplement button in the HC. The implementation status changes to green and the events and the method of the component interface are visible in the HC controller.
    Regards,
    Uday

  • Adding elementry search help to SAP standard Collective Search help

    Hi,
    I had copied standard elementary search help to MAT0M to ZZ_MAT0M and added some more fields and activated to it.
    it got activated sucessfully.
    Now i have to attached the ZZ_MAT0M elementry search help to standard collective search help MAT1_A.
    How can i do that?
    can i add it directly to MAT1_A (sell --->search help <MAT1_A> changes --> in included search helpss tab using + (insert icon) )
    Thanks & regards

    I solved my problem :
    I had copied standard elementary search help to MAT0M to ZZ_MAT0M and added some more fields and copied Database View M_MAT1M to ZZ_M_MAT1M and addedd same fields and  activated both.
    both got activated sucessfully.
    Now i have to attached the ZZ_MAT0M elementry search help to standard collective search help MAT1_A and this Z-search help shd appear on the first tab.
    so I just went to collective search help MAT1_A in change mode --> click on "+" icon addedd my ZZ__ search help, save and activated it.
    If you dont really care in which tab your search help shd appear, then the best option is to use Append Search help.
    Note : if you are directly adding your search help in collective standard search help, then its better to remove hotkey form your custom elementry search help, as, if not remove will lead to warnings or make sure that you have unique hotkey in that collective search help.

  • Modifying result of the output of the search help

    Hello Experts,
    I am creating search help on field FUNCID in table EQUZ. Thing is I need to only display those values of FUNCID which has some values.. i.e if there is blank entry FUNCID in table EQUZ it should not be gettin displayed.
    Thanks in advance.
    Regards,
    saurabh chhatre

    Hi saurabh chhatre,
       If u want to hide some values or blank values in search help then try this one.
      create the search help and in the Dialpg type choose "dialog with value restriction". then use this in your program. when u execute it, it will ask u to give the condition based on which it will display the search help values.

  • Hiding the Birthday Column in the search help in transaction PA20

    Steps to generate the issue.
    1) Goto transaction PA20.
    2) Use the search help (Press F4) in the personnel number field.
    A search help pops up.
    3) In the 'Last Name - First Name' tab enter 'M*' in the 'Last Name' field and select the enter button.
    A list of employees is displayed. In my system along with the last name and first names the employees birthday is displayed.
    The business would like this field hidden as they have decided that this is sensitive information that they do not want everybody to have access to.
    Can this be hidden by making a change to configuration? How do I go about this?

    Dear Mark,
    After pressing F4, when the list will be shown, select the heading of the birthday coloumn, right click, then select personalize, then select Birth date, and click hide fields switch which is in the same screen, then click enter.
    See your problem is solved.
    Thanks & Regards
    Jasaswi

  • How to change the desription of a standard SAP field in the Search Help

    Hi All,
    In Table T023T there is a field WGBEZ60(Long text describing the material group) and the data element of the field is WGBEZ60.
    Requirement is to change the description of the field WGBEZ60.The desription of the  field is - Description 2 for the material group.
    But the user want as - Description for the material group. He dont want 2 in the description.
    we are using this field in the search help of Material group for the transaction ME21N and ME51N.
    So please tell me how can we change the description of the field in the Search help.
    Thanks.
    Regards,
    Peeyush

    As search help uses data element , it shows its keyword. So you have to do modification to that keyword.
    - Go to CMOD
    - from top menu GOTO -> Text enhancements -> Keywords -> Change -> type WGBEZ60 -> change the description -> Save and add it to transport
    - now use that data element either on the screen or search help. It will have the descripiton modified.
    Regards
    Marcin

Maybe you are looking for

  • How to move the data of a table from sqlplus to XML file

    Hi, Could you pls guide me how to move the data of a table from sqlplus to XML file. i want to do it from sqlplus rather than toad.pls help Thanks

  • Is there a way to list files that I am working on in a Panel?

    I am evaluating FM9 and MadCap Blaze. Blaze has a feature where I can view all folders and topics in a tree view on the left side of the workspace (they call it Content Explorer). It really helps me stay organized to see the entire tree and I really

  • Macbook Pro A1278 2010 very very slow

    Hi, Guys I got a macbook pro a1278 mid 2010. It's becoming extremly slow.  I have tried some solutions, nothing works. 1, Start from a known good hard drive ( newly installed OS, smart test okay) 2, reset smc 3, reset pram I've spent a couple of days

  • How to face time with another mac

    when i try to face time with another mac user I can't hear what she's saying but I can see her. Also, when she tries to call me, it doesn't go through

  • Editing Payment Proposal

    Hi Gurus, Can any one tell me how to change the bank details for all the vendors in one short(edit proposal) rather than going vendor by vendor(imagine i have 500 vendors) and changing the bank. The problem which I am facing is as follows. a. I have