Skip to Content
author's profile photo Former Member
Former Member

hi, tell me abt creation of search helps in detail

hi, tell me abt creation of search helps in detail

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 21, 2007 at 08:10 AM

    Hi

    Search helps

    Standard search help

    Types of search helps

    Concept of search help

    Search Help Interface

    Dialog behavior of search helps

    Selection method for search helps

    Performance of search helps

    Attaching search helps

    Hierarchy of search helps

    Standard Search Help

    The input help (F4 help) is a standard function of the R/3 System. It permits the user to display a list of possible values for a screen field. A value can be directly copied to an input field by list selection.

    The fields having an input help are shown in the R/3 System by the input help key to the right of the field. This key appears as soon as the cursor is positioned on the corresponding screen field. The help can be started either by clicking on this screen element or with function key F4.

    If the number of possible entries for a field is very large, you can limit the set of displayed values by entering further restrictions.

    Further meaningful information about the displayed values is included in the display of possible entries, especially if the field requires that a formal key be entered.

    TYPES OF SEARCH HELPS

    Elementary search helps

    Describe a search path. The elementary search help must define where the data of the hit list should be read from (selection method), how the exchange of values between the screen template and selection method is implemented (interface of the search help) and how the online input help should be defined (online behavior of the search help).

    Collective search help

    Combine several elementary search helps. A collective search help thus can offer several alternative search paths.

    Context data: You first have to define the context data to be used in the input help process. The context contains the information obtained in previous dialog steps and the entries already made by the user in the current input mask. This information is normally used to restrict the possible values for the current input field.

    Dialog behavior: It describes the order of the dialog windows to be displayed during the input help and what they should look like.

    Data collection method: It defines where the values offered to the user for selection come from.

    Return values: When a value is selected from the list of possible entries, it is stored in the search field. This often results in the contents of further screen fields, such as explanatory text, being updated. You therefore should define which values can be returned to the screen.

    In addition to describing an input help, you must define the fields for which it should be used. This is part of the field definition (of the search fields).

    In Release 4.0, the search help was introduced in the ABAP Dictionary as a new object type. A search help is an object that describes the input help process. The individual components of such a description can be defined with attributes of the search help.

    Search helps are subject to the same rules concerning their maintenance, activation and transport as all other objects of the ABAP Dictionary.

    Search helps provide greater flexibility and functionality for defining input helps than the matchcode and help view object types offered up to Release 3.x.

    Search Help Interface

    Search help interface determines how the exchange of values between the screen template and the selection method is implemented.

    The search help interface defines the context data that can be used in the input help and the data that can be returned to the input mask. Analogously to the interface of a function module, the search help interface comprises interface parameters.

    When you define an interface parameter of a search help, you must also define whether it should be used to copy data to the input help (IMPORT parameter) or whether it should be used to return data from the input help (EXPORT parameter). A parameter of a search help can also have both attributes at the same time.

    The location from which the IMPORT parameters of a search help get their values and the screen fields in which the contents of the EXPORT parameters of the search help are returned are defined in the search help attachment. The search help itself should always be attached to an EXPORT parameter of the search help. If this parameter is also the IMPORT parameter, its contents are only used in the input help if it is a search string (that is, if it contains a ´*´ or a ´+´).

    You must define the parameter types of a search help. You can do this by assigning them data elements.

    Value Transport for Input Helps

    NOTE:In the above example, screen fields A, B and C are linked with parameters of the search help. As a result, values can only be transported between the screen and the search help for these three fields. Existing contents of screen fields A and B can be used for selecting the hit list since they are linked with an import parameter of the search help. The values of parameters A and C can be returned to the screen from the hit list since these parameters are declared as export parameters of the search help.

    creation of Elementary Search Help

    Enter the search help name and click on create.

    Choose elementary search help radio button option as the search help type.

    Enter the search help parameters, the selection method and activate the search help.

    Collective Search Help steps

    Enter the search help name and click on create.

    Choose Collective search help radio button option as the search help type.

    Enter the search help parameters.

    Note that there is no selection method to be entered for a collective search help.

    Instead of the selection method, we enter the included

    search helps for the collective search help.

    We need to assign parameters for each of the included

    search helps.

    Complete the parameter assignment by clicking on the push button

    Collective search help offers the user to obtain F4 help

    using any of the included search helps.

    Attaching a search help to a field

    A search help can influence the behavior of a field when the input help is called. The search help must be assigned to the field in order to do this. You have the following options for this assignment:

    Attach search help to a data element / table or structure field / screen field / check table.

    Conventionally search helps are attached to table fields or data elements. We shall see the same.

    Attaching a search help to a screen element

    A search help can be directly assigned to a screen field in two ways.

    The name of the search help must be entered in the Screen Painter in the Attributes for the field in the field Search help.

    The name of the search help can be defined for selection screens in ABAP reports in the PARAMETERS or SELECT-OPTIONS statement directly following the supplement MATCHCODE OBJECT.

    However, input help is only available for this particular screen.

    In this case, the search help is only available for this screen.

    OR by useing FM

    refer this code

    TYPES : BEGIN OF ST_OBJID_SH,

    OTYPE TYPE HRP1000-OTYPE,

    OBJID TYPE HRP1000-OBJID,

    END OF ST_OBJID_SH.

    DATA : IT_OBJID_SH TYPE STANDARD TABLE OF ST_OBJID_SH.

    DATA : WA_OBJID_SH TYPE ST_OBJID_SH.

    ***********SELECTION SCREEN DESIGN***********************

    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.

    *SELECT-OPTIONS : S_OTYPE FOR HRP1001-OTYPE NO INTERVALS .

    SELECT-OPTIONS : S_OBJID FOR HRP1001-OBJID NO INTERVALS .

    SELECT-OPTIONS : DATE FOR SY-DATUM NO-EXTENSION OBLIGATORY.

    SELECTION-SCREEN END OF BLOCK B1.

    **********END OF SELECTION SCREEN DESIGN*****************

    *********VALIDATION FOR SCREEN FIELDS********************

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_OBJID-LOW.

    • IF S_OBJID IS NOT INITIAL.

    SELECT OTYPE OBJID FROM HRP1000

    INTO TABLE IT_OBJID_SH

    WHERE OTYPE = 'D'.

    IF SY-SUBRC EQ 0.

    • SEARCH HELP FOR QUALIFICATION.

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

    • DDIC_STRUCTURE = ' '

    RETFIELD = 'OBJID'

    • PVALKEY = ' '

    DYNPPROG = SY-REPID

    DYNPNR = SY-DYNNR

    DYNPROFIELD = 'S_OBJID'

    • STEPL = 0

    • WINDOW_TITLE =

    • VALUE = ' '

    VALUE_ORG = 'S'

    • MULTIPLE_CHOICE = ' '

    • DISPLAY = ' '

    • CALLBACK_PROGRAM = ' '

    • CALLBACK_FORM = ' '

    • MARK_TAB =

    • IMPORTING

    • USER_RESET =

    TABLES

    VALUE_TAB = IT_OBJID_SH

    • FIELD_TAB =

    • RETURN_TAB = RETURN_TAB

    • DYNPFLD_MAPPING =

    • EXCEPTIONS

    • PARAMETER_ERROR = 1

    • NO_VALUES_FOUND = 2

    • OTHERS = 3

    .

    IF SY-SUBRC <> 0.

    • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    ENDIF.

    .

    Elementary search helps Describe a search path. The elementary search help must define where the data of the hit list should be read from (selection method), how the exchange of values between the screen template and selection method is implemented (interface of the search help) and how the online input help should be defined (online behavior of the search help).

    Collective search help Combine several elementary search helps. A collective search help thus can offer several alternative search paths.

    steps

    Elementary Search Help

    1) Goto SE11

    Enter the search help name and click on create.

    2)Choose elementary search help radio button option as the search help type.

    3)Enter the search help parameters, the selection method and activate the search help.

    Collective Search Help

    1)Enter the search help name and click on create.

    2)Choose Collective search help radio button option as the search help type.

    3)Enter the search help parameters.

    Note that there is no selection method to be entered for a collective search help.

    4)Instead of the selection method, we enter the included

    search helps for the collective search help.

    5)We need to assign parameters for each of the included

    search helps.

    6)Complete the parameter assignment by clicking on the push button

    7)Collective search help offers the user to obtain F4 help

    using any of the included search helps.

    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee2b446011d189700000e8322d00/content.htm

    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee5f446011d189700000e8322d00/content.htm

    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee86446011d189700000e8322d00/content.htm

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 21, 2007 at 08:10 AM

    Hi

    You can create a search for that field with more than one fields and yu can add the search help for that field

    see the doc

    1) Elementary search helps describe a search path. The elementary search help must define where the data of the hit list should be read from (selection method), how the exchange of values between the screen template and selection method is implemented (interface of the search help) and how the online input help should be defined (online behavior of the search help).

    2) Collective search helps combine several elementary search helps. A collective search help thus can offer several alternative search paths.

    3)An elementary search help defines the standard flow of an input help.

    4) A collective search help combines several elementary search helps. The user can thus choose one of several alternative search paths with a collective search help.

    5)A collective search help comprises several elementary search helps. It combines all the search paths that are meaningful for a field.

    6)Both elementary search helps and other search helps can be included in a collective search help. If other collective search helps are contained in a collective search help, they are expanded to the level of the elementary search helps when the input help is called.

    CREATION:

    Go to SE11 Tcode

    select search help

    give the 'z' search help name and create

    select the selection method ur table name eg : 'mara'

    dialog module 'display value immediately'.

    add the field whatever u want and lpos = 1 and spos = 1 and check import and export parameter.

    where left position when displaying and spos = search position

    and then save and activate ..

    See the links:

    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee38446011d189700000e8322d00/content.htm

    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee45446011d189700000e8322d00/content.htm

    https://forums.sdn.sap.com/click.jspa?searchID=3173469&messageID=2176485

    https://forums.sdn.sap.com/click.jspa?searchID=3173469&messageID=3601619

    pls go through this for search help creation

    http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm

    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee2b446011d189700000e8322d00/content.htm

    Search Help Exits:

    dynamic-values-for-search-help

    dynamic-search-help

    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee52446011d189700000e8322d00/content.htm

    http://www.sapdevelopment.co.uk/dictionary/shelp/shelp_exit.htm

    https://forums.sdn.sap.com/click.jspa?searchID=4390517&messageID=1712818

    You can add F4 values for that field using the following

    See the following ex:

    TYPES: BEGIN OF TY_MBLNR,

    MBLNR LIKE MKPF-MBLNR,

    END OF TY_MBLNR.

    DATA: IT_MBLNR TYPE STANDARD TABLE OF TY_MBLNR WITH HEADER LINE.

    data: it_ret like ddshretval occurs 0 with header line.

    At selection-screen on value-request for s_mat-low.

    Select MBLNR from mkpf into table it_mblnr.

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

    • DDIC_STRUCTURE = ' '

    RETFIELD = 'MBLNR'

    • PVALKEY = ' '

    • DYNPPROG = ' '

    • DYNPNR = ' '

    • DYNPROFIELD = ' '

    • STEPL = 0

    • WINDOW_TITLE =

    • VALUE = ' '

    VALUE_ORG = 'S'

    • MULTIPLE_CHOICE = ' '

    • DISPLAY = ' '

    • CALLBACK_PROGRAM = ' '

    • CALLBACK_FORM = ' '

    • MARK_TAB =

    • IMPORTING

    • USER_RESET =

    TABLES

    VALUE_TAB = IT_MBLNR

    • FIELD_TAB =

    RETURN_TAB = IT_RET

    • DYNPFLD_MAPPING =

    • EXCEPTIONS

    • PARAMETER_ERROR = 1

    • NO_VALUES_FOUND = 2

    • OTHERS = 3

    .

    IF SY-SUBRC <> 0.

    • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    IF SY-SUBRC = 0.

    read table it_ret index 1.

    move it_ret-fieldval to S_mat-low.

    ENDIF.

    Go through the test program.

    REPORT Ztest_HELP .

    TABLES : MARA.

    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.

    PARAMETERS : P_MATNR(10) TYPE C.

    SELECTION-SCREEN END OF BLOCK B1.

    DATA : BEGIN OF ITAB OCCURS 0,

    MATNR TYPE MATNR,

    END OF ITAB.

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_MATNR.

    SELECT MATNR

    FROM MARA

    INTO TABLE ITAB

    UP TO 10 ROWS.

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

    RETFIELD = 'MATERIAL NUMBER'

    DYNPPROG = SY-REPID

    DYNPNR = SY-DYNNR

    DYNPROFIELD = 'P_MATNR'

    VALUE_ORG = 'S'

    TABLES

    VALUE_TAB = ITAB

    EXCEPTIONS

    PARAMETER_ERROR = 1

    NO_VALUES_FOUND = 2

    OTHERS = 3.

    null

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 21, 2007 at 09:15 AM

    Hi veerandra,

    i have a develop a small code for u.i have create a search help for the user defined field.

    i will create a search help and after getting the value into that field and i will print that field.

    i check,below code is executed successfully..

    If u are satisfy with my code plz give me REWARD POINTS.

    code:

    ----


    • Global Data (MATNR = 18 IN LENGTH)

    ----


    DATA: var(18). "It Must Be Character bcz MATNR field is a char type

    ----


    • Parameters for Input the Data

    ----


    PARAMETERS: p_matnr(18).

    ----


    • Global data

    ----


    DATA: t_ret_table LIKE STANDARD TABLE OF ddshretval,

    fs_ret_table TYPE ddshretval,

    t_dynp_fields LIKE STANDARD TABLE OF dynpread,

    fs_dynp_fields TYPE dynpread.

    ----


    • Selection screen

    ----


    AT SELECTION-SCREEN OUTPUT.

    ----


    • PLACE BELOW STATEMENT COMPULSORY

    ----


    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_matnr.

    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'

    EXPORTING

    tabname = 'MARA'

    fieldname = 'MATNR'

    searchhelp = 'MAT1' "ANY NAME U WANT TO GIVE

    • SHLPPARAM = ' '

    • DYNPPROG = ' '

    • DYNPNR = ' '

    • DYNPROFIELD = ' '

    • STEPL = 0

    • VALUE = ' '

    • MULTIPLE_CHOICE = ' '

    • DISPLAY = ' '

    • SUPPRESS_RECORDLIST = ' '

    • CALLBACK_PROGRAM = ' '

    • CALLBACK_FORM = ' '

    • SELECTION_SCREEN = ' '

    TABLES

    return_tab = t_ret_table

    EXCEPTIONS

    field_not_found = 1

    no_help_for_field = 2

    inconsistent_help = 3

    no_values_found = 4

    OTHERS = 5

    .

    IF sy-subrc <> 0.

    • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    READ TABLE t_ret_table INTO fs_ret_table INDEX 1.

    CLEAR t_dynp_fields.

    fs_dynp_fields-fieldname = 'P_MATNR'.

    fs_dynp_fields-fieldvalue = fs_ret_table-fieldval.

    APPEND fs_dynp_fields TO t_dynp_fields.

    CLEAR fs_dynp_fields.

    SELECT SINGLE matnr FROM mara INTO fs_dynp_fields-fieldvalue WHERE matnr

    EQ fs_ret_table-fieldval.

    APPEND fs_dynp_fields TO t_dynp_fields.

    CALL FUNCTION 'DYNP_VALUES_UPDATE'

    EXPORTING

    dyname = sy-repid

    dynumb = sy-dynnr

    TABLES

    dynpfields = t_dynp_fields

    EXCEPTIONS

    invalid_abapworkarea = 1

    invalid_dynprofield = 2

    invalid_dynproname = 3

    invalid_dynpronummer = 4

    invalid_request = 5

    no_fielddescription = 6

    undefind_error = 7

    OTHERS = 8.

    IF sy-subrc <> 0.

    • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    ----


    • Just Display the value

    ----


    START-OF-SELECTION.

    var = p_matnr.

    WRITE:/ var.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.