Filtering the search help values

Hi all
  I need some help regarding search help that for a normal search help for a field we will get all the possible values for that but here i need to filter the field values based on the previous field entered value.
for example :
  two fields are there
    plant and work center,
for a normal search help work center may get 100 values from a defined table.
if we enter some value in plant field and then if we press search help for the work center field then the values of the work center should be filtered based on the above entered value.
      Please help me in this issue..tell me whether it is possible or not
Thanks in advance.
siva.

IF not <plant field> is initial
1. Copy F4IF_SHLP_EXIT_EXAMPLE to Z, call it from your programpass the plant data to it
2. Use the changing parameters SHLP and CALLCONTROL of that FM
3. Append your plant values into shlp-selopt[] table () like shown below
data begin of s_hselopt occurs 0.
        include structure ddshselopt.
data end of s_hselopt.
  CASE callcontrol-step.
    WHEN  'SELECT'.
  LOOP AT <plant table>
    s_hselopt-shlpname  = <SHelp Name>
    s_hselopt-shlpfield = <Field Name - Wrk Ctr>
    s_hselopt-sign      = <Constant ('I')>
    s_hselopt-option    = <Constant ('EQ')>
    s_hselopt-low = <plant table-plant>
    APPEND s_hselopt.
    CLEAR s_hselopt.
  ENDLOOP.
shlp-selopt[] = s_hselopt[].
ENDCASE.

Similar Messages

  • Transferring Search Help values from ECC 6.0 to SRM 7.0

    Hi SAP experts,
    I have a requirement to display the search help values for a data element in ECC 6.0 into the custom data element that I created on SRM 7.0.
    Is there a BAPI that I can use to retrieve the values for a search help element (for example SH_ANLKA) from the the ECC into SRM?
    Your advise would be greatly appreciated!
    Regards,
    Andrew

    Hi Andrew,
    I have got a similar requirement to fetch the PO details from ECC search help to a new SRM search help. Please help me with the procedure you used for the above scenario.
    Thanks,
    Santosh.

  • 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

  • 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.

  • 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

  • Filters on the search helps

    Hi,
    I would like to create filters in the search helps on input fields. Somehow i don't find a way to create filters in the search helps.
    Thanks
    Aman

    Hi Amandeep,
      I think you need to re do the whole results view of your search.
    1. You have a collection of objects/entities (result of your search).
    3. You need to display only those which match the filter set by user. Full list will be displayed for start.
    4. Create new input fields for every column you want users to filter and provide a filter button.
    5. Once user has entered the filter prompt them to click on filter button and display only those objects which match the criteria. How will you do it. you'll have to loop through teh collection of entities and check each one for matching the filter you know get_property..... methods. You can achive this by having two contect nodes of same type so that you can retain the orignal list incase user wants to revert or with one context object you'll have re run teh querry every time user wants to return to full list.
    Warm Regards,
    Anuj Nagpal

  • 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.

  • (Urgent) Sorting search help values in Web Report

    Hello Friends,
    We have a web report which uses a variable made on 0CALMONTH. The order of display of values for this variable search help is 02/2004, 03/2004, 01/2005, 07/2006, 08/2006, 05/2007. In this order we have the latest date (05/2007) displayed at the end of the list. What we want is that the values in the search help of 0CALMONTH should be displayed in the reverse order i.e. latest date first (05/2007, 08/2006, 07/2006... etc).
    Thanks in advance for your assistance.
    Regards,
    Prem.

    Hi Premanand,
    If u display the report in Internet Explorer there you can see differnet buttons like
    Save View, Book mark, Variable Screen etc...There click Save View give tech name and descryption. After Sorting use this in WAD instead selecting query , select this view and execute.
    Assign Points Pls...
    Best Regards,
    SG

  • Creating select option with the search help based on other select option

    Hi,
    I have displayed a selection screen with two select options S1 and S2.
    My requirement is that the values in the search help of S2 should get filled based on the values selected in S1.
    Note: User has option to select multiple values in S1.
    Does anybody know how to implement this?
    Thanks,
    Feroz

    >
    Sanjeeva wrote:
    > Hi,
    >
    > With standard f4 you cannot acheive this. You need to write customise with OVS or Simple value selector by reading S1 selected values.
    >
    > Thanks,
    > Sanjeev
    I'm getting fairly tired of seeing this completely incorrect information on this forum.  As stated before and already found out by this poster, you can map input and output values between multiple data dictionary search helps. You do NOT have to resort to using OVS for this option.

  • How to limit the search help in the selection screen?

    Hi All,
    I got a selection option in a selection screen,
    say SELECT-OPTIONS KSCHL FOR VAKE-KSCHL.
    I want to limit the output list of the search help of this field, e.g. 33 entries for a specific application and usage.
    What should I do ?
    Thz.

    Hi,
    U can check with these two
    <b>... NO-EXTENSION</b>
    Effect
    The user can only make an entry on one line. Calling the additional "Multiple Selection" screen is not supported and no pushbutton for this appears on the selection screen.
    Addition 12
    <b>... NO INTERVALS</b>
    Effect
    The selection option is displayed on the selection screen without a 'to' field. The pushbutton for calling the "Multiple Selection" screen appears immediately after the 'from' field.
    This addition thus allows you to generate a simplified display on the selection screen. This is particularly useful if you are not making any range selections for this selection option.
    Notes
    On the "Multiple Selection" screen, you can also enter ranges for selection options with "NO INTERVALS".
    By combining this addition with "NO-EXTENSION", you can restrict the user to entry of a single value for the selection option, but with the possibility of also choosing single value options like 'Greater than' or 'Less than or equal'.
    By using the addition " NO INTERVALS" with SELECTION-SCREEN BEGIN OF BLOCK, you can activate the simplified display for all selection options in a block.
    The function module SELECT_OPTIONS_RESTRICT allows you to restrict the set of selection options available for a SELECT-OPTION (for example, only single values and patterns, i.e. 'EQ' and 'CP' are allowed). You can also forbid the leading sign 'E' (= 'Exclude from selection'). This means that you can considerably restrict the selections which can be entered on the selection screen.
    Just now tried it out to limit the search help u have to use NO-EXTENSION.
    <b>Try this simple code.
    Tables: mara.
    SELECT-OPTIONS: s_matnr FOR MARA-matnr NO-EXTENSION.</b>
    Hope this helps.
    Kindly reward points and close the thraed if ur problem got solved.
    U havent rewarded any points?
    Message was edited by: Judith Jessie Selvi

  • Search Help values to Internal table

    Dear Friends,
    Is it possible to export Search Help values to Internal table?
    On screen, when user click on Search button, the SAP standard search help will call (Customer Search). After entering values, some result get displayed and this result need to export to the internal table.
    Thanks in stack
    Nilesh

    Hi:
    try this:
    DATA : wa_shlp TYPE shlp_descr,
               it_records LIKE ddshretval OCCURS 0 WITH HEADER LINE.
    wa_shlp-SHLPNAME = 'MAT0M'.   "one of elementary search help name from mara-matnr.
    wa_shlp-SHLPTYPE = 'SH'.
    CALL FUNCTION 'F4IF_SELECT_VALUES'
         EXPORTING
           shlp                   = wa_shlp
      MAXROWS                = 0
      SORT                   = ' '
      CALL_SHLP_EXIT         = ' '
    IMPORTING
      MAXROWS_EXCEEDED       =
        TABLES
      RECORD_TAB             =
      RECDESCR_TAB           =
          return_tab            = it_records
    LOOP AT it_records.
      WRITE:/ it_records.
    ENDLOOP.
    Follows is how to get the search help name:
    CALL FUNCTION 'DD_SHLP_GET_HELPMETHOD'
      EXPORTING
        tabname                 = 'MARA'
        fieldname               = 'MATNR'
        langu                   = sy-langu
      NO_CHKTAB_MAPPING       =
      GET_ENTITYTAB           = ' '
       CHANGING
         shlp                    = wa_shlp
      callcontrol             = callcontrol
      EXCEPTIONS
        field_not_found         = 1
        no_help_for_field       = 2
        OTHERS                  = 3
    CALL FUNCTION 'F4IF_EXPAND_SEARCHHELP'
       EXPORTING
         shlp_top = wa_shlp
       IMPORTING
         shlp_tab = shlps.
    好运,
    启明星

  • 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.

  • Is it possible to change the search help to have Scroll capability instea

    I am using ABAP Webdynpro.  is it possible to change the search help to have Scroll capability instead of Next Page/Next line/Last line.  We would rather use a search help to do this as the user wants to have their own personal value list.

    Found the answer on SDN

  • Search Help Value Not reflecting in WebUI

    Hello All, We have a requirement to create a standard F4 value help for PRODUCT_ID field and the selected value should be reflected in the WebUI field. This field is in a table view context node and the component is a stand alone WebUI component. Everything works fine till the Search help is called and the values is selected. But the selected value is not reflected in the Product_ID field. We have checked many forums and links and tried almost all the alternatives suggested. Here's is the code attached for reference.
    DATA:l_wa_map       TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping,
           l_i_inmap     TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping_tab,
           l_i_outmap    TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping_tab.
      DATA:  lv_str_index TYPE string.
    *  l_wa_map-context_attr = 'product_id'.
    *  l_wa_map-f4_attr      = 'PRODUCT_ID'.
    *  APPEND l_wa_map TO:l_i_inmap,l_i_outmap.
      lv_str_index = iv_index.
      CONCATENATE 'table[' lv_str_index '].PRODUCT_ID' INTO l_wa_map-context_attr.
      l_wa_map-f4_attr = 'KEY'. "'PRODUCT_ID'. "'
      APPEND l_wa_map TO: l_i_outmap.
      lv_str_index = iv_index.
      CONCATENATE 'table[' lv_str_index '].PRODUCT_ID' INTO l_wa_map-context_attr.
      l_wa_map-f4_attr = 'VALUE'. "'PRODUCT_ID'.   "
      APPEND l_wa_map TO: l_i_outmap.
      CREATE OBJECT rv_valuehelp_descriptor TYPE cl_bsp_wd_valuehelp_f4descr
         EXPORTING
          iv_help_id        = 'COM_PR_SHTEXT'      "#EC NOTEXT
          iv_help_id_kind   = if_bsp_wd_valuehelp_f4descr=>help_id_kind_name  "if_bsp_wd_valuehelp_f4descr=>help_id_kind_comp
          iv_input_mapping  = l_i_inmap
          iv_output_mapping = l_i_outmap
          iv_object_ref     = me
          iv_trigger_submit = abap_true.
    Is there any further code or event call required to reflect the value in the WebUI? or what exactly is required to be done here?
    Thanks in Advance.
    Prasad

    Hi Kamlesh,
    Check that you have checked for import and export in your search help for parameter ATBEZ
    Refer my reply in here  [F4 Help|HELP NEEDED....F4 VALUE HELP IN WEB UI;
    Regards
    Jignesh

  • Elementry search help (value of import parameter)

    hi friends..
    In my search help...when i pass value in WERKS as CV01 ..then no result is coming..as only CV0 value is passed to import parameter..
    and if put CV* then list is coming..
    Any IDEA to solve this problem...
    Message was edited by:
            Madan Gopal Sharma

    Hi
    Have you created the search help properly
    create by going through the doc and attach to the field werks and see,
    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.
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee38446011d189700000e8322d00/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee45446011d189700000e8322d00/content.htm
    pls go through this for search help creation
    http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm
    Search Help Exits:
    Re: dynamic values for search help
    Re: Dynamic search  help
    Reward points if useful
    Regards
    Anji

Maybe you are looking for

  • Failed to install windows xp with bootcamp - everything's gone

    Hi everyone, I'm a new mac user, and not very familiar with snow leopard.. Because of work I need to use windows once in a while, therefore I tried to install XP using bootcamp. I did the disk partitioning, and created a windows disk. During the inst

  • How do my husband and I receive the same messages on separate phones

    I have a iPhone 5s and my husband 4s. How can he receive all of the text messages I get to my phone?

  • In what QOS does the receiver SOAP adapter work BE or EO?

    Hi, In what QOS does the receiver SOAP adapter work BE or EO? My guess is that it is by default EO, if so how do i make it work like synchronous? There is no option to set it explicitly. Thanks] Shakthi

  • E2000 connection problems

    Hello, I am using an E2000 router with three components hard wired in my network system.  The problem is when I try and connect my dell laptop running windows vista to the E2000 wirelessly the network name does not even appear on my wireless networks

  • Scale precision - LabVIEW 8.5

    I seem to be having a problem related to keeping a scale precision to 0 digits of precision.  I have even specified advanced formatting using format string of %d and it does not work.  This problem seems to be related to the issue raised here: http:/