Set a parameter value using Search help exit

Hi All,
I want a search help such as If I enter a warehouse number on my screen then search help for storage bins should have that warehouse number populated in selection dialog.
I guess i have to write some code in search help exit if CALLCONTROL-STEP = 'PRESEL'.
But I am not able to set the warehouse value to parameter.
Does any one have done something like this?
Thanks in Advance,
Shailly

Hi Shailly,
I don#t know if that will be the best option for you, but you can make use of the abap program event at value request for your parameter_id.
What you need is to insert a similar code like the one below:
at selection-screen on value-request for p_param
  select fielda fieldb from storage bin table into gi_warehouse_bin
             where  warehouse = warehouse parameter.
  delete adjacent duplicates from gi_zzdez comparing all fields.
  call function 'F4IF_INT_TABLE_VALUE_REQUEST'
    exporting
     retfield               = space
     dynpprog               = 'REPORT_NAME'
     dynpnr                 = '1000'
     dynprofield            = 'P_BIN'
     window_title           = 'Text'
     value_org              = 'S'
    tables
      value_tab              = gi_warehouse_bin
   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.
Cheers,
Florin

Similar Messages

  • Using SEARCH HELP exit in dependency of other parameters from my dynpro.

    Hello experts,
    how can I access the values of input fields (parameters or select-options) from my dynpro?
    I need to build a F4-help in dependencie of another field on the screen with help of the F4 - exit. I think this should be possible.
    If I do test the search help with SE11 it works fine. All parameters from screen are given in SHLP_TAB[1]-INTERFACE (the parameter of my f4-help-exit)
    The short example explains the problem more detailed.
    REPORT  test_dynpro_events_ck.
    PARAMETERS ea1 TYPE my_char_10_ck DEFAULT 'here I push F4' MATCHCODE OBJECT MY_F4_HELP_CK.
    PARAMETERS ea2 TYPE my_char_10_ck DEFAULT 'this is the value I need to generate the F4 help of field ea1'.
    MY_F4_HELP_CK:
    import: EA1 and EA2
    export EA1
    Many Thanks
    Christian

    Thank you so far.
    But how are these parameters passed to the search help without using global set/get parameters or DYNPRO_READ_VALUE? Why can I put these parameters to my search help as input parameters ... seems to be useless if I use search help on Selection-Dynpros?
    Is there not a better way to deal with search-helps which are dependent from other input fields? Btw. I need the value without passing PAI and PBO.
    In my Example:
    doing some text inputs in field EA2 -> hit search help on EA1 -> need a selection dialog in dependency of the input in EA2. This can not be that complicated?
    Many thanks
    Christian

  • Populate and display internal table results using search help exit...

    I have copied F4IF_SHLP_EXIT_EXAMPLE and made changes. I want this search help exit to populate and display contents related to 'FIELD1' when the user enters a specific value for it in the search help screen, meaning when the user restricts the search by that value.  For field2, field3, field4, field5, field6, field7, and field8 I am using a custom view.
    Following is the code:
    TYPES:  BEGIN OF t_search,
                   field2 TYPE field2,
                   field3 TYPE field3,
                   field4 TYPE field4,
                   field5 TYPE field5,
                   field6 TYPE field6,
                   field7 TYPE field7,
                   field8 TYPE field8,
                   field1 TYPE field1,
                END OF t_search.
      DATA: it_itab TYPE TABLE OF t_search,
            wa TYPE t_search,
         wa_selopt TYPE ddshselopt,
            wa_fielddescr TYPE dfies.
    ranges: r_field1 for std_table1-field1
    STEP SELECT    (Select values)
        FREE: r_field1.
    **Get the value entered for FIELD1 in search help
        LOOP AT shlp-selopt INTO wa_selopt.
          CASE wa_selopt-shlpfield.
            WHEN 'FIELD1'.
              r_field1-sign = wa_selopt-sign.
              r_field1-option = wa_selopt-option.
              r_field1-low = wa_selopt-low.
              r_field1-high = wa_selopt-high.
              APPEND r_field1.
              CLEAR: r_field1.
          ENDCASE.
        ENDLOOP.
    **Select 'ID' and 'FIELD1' from table into lt_itab
        SELECT id field1
              INTO TABLE lt_itab
                FROM std_table1
                  WHERE field1 IN r_field1.
        IF sy-subrc = 0.
    **Now, based on the particular IDs from lt_itab, I need to select other values
    from other tables which also have 'ID' as the key.
           SELECT std_table2~field2
                std_table2~field3
                std_table3~field4
                std_table3~field5
                std_table3~field6
                std_table4~field7
                std_table4~field8
                std_table1~field1
              INTO CORRESPONDING FIELDS OF TABLE it_itab
              FROM std_table2
                         INNER JOIN std_table3 ON
                                std_table3mandt = std_table2mandt AND
                                std_table3id = std_table2id
                         INNER JOIN std_table4 ON
                                std_table4mandt = std_table2mandt AND
                                std_table4id = std_table2id
                         INNER JOIN std_table1 ON
                                std_table1mandt = std_table2mandt AND                                           std_table1id = std_table2id
              WHERE
                    std_table1~field1 IN r_field1.
    'id' is common in all the std_tables --> std_table1, std_table2, std_table3, std_table4.
    STEP DISP     (Display values)
    **Then I need to gather all the results in my internal table it_itab and display
    in search help results for the value of FIELD1 entered by the user in the search help.
        CALL FUNCTION 'F4UT_PARAMETER_RESULTS_PUT'
          EXPORTING
            parameter   = 'FIELD1'
            fieldname   = 'FIELD1'                          
          TABLES
            shlp_tab    = shlp_tab                                   
            record_tab  = record_tab
            source_tab  = it_itab
          CHANGING
            shlp        = shlp
            callcontrol = callcontrol.
    I am not getting all the data in my internal table and wanted to know if there is anyting wrong in my select statement.
    Any guidance will be appreciated and awarded appropriate points.
    Thanks.

    the webdynpro fieldname and the search help input parameter name were made same.

  • Modify another field value in search help exit.

    While creating the Sales Order, the user does an f4 on ship to party to determine the sold to party ( search help exit ), now I have the values of both the Ship to customer and Sold to customer in the search help exit, but I can update only the ship to field of the sales order, do you know how I can modify the sold to value on the screen.
    I tried setting up the parameter id 'VAG' in the search help exit with the determined value, but this value is not getting copied in the Sold to party field once the search help is executed.
    The other option which is left is export to memory and import to memory in another user exit of VA01. Is there any other alternative? Also which program do I need to do the import of memory so that sold to party is displayed on the initial before saving the document ?
    Ajay

    Hi,
    Yes..Try calling from the search help exit..
    You have to pass the program name and screen number..
    In the internal table parameter DYNPFIELDS..
    Pass the fieldname and fieldvalue...
    Thanks,
    Naren

  • How to set two parameter value using one f4 help of 'F4IF_INT_TABLE_VALUE_REQUEST'

    I have two parameters on selection screen .
    P_QTR and P_YEAR
    I have concatenated the Quarter and Year Value to give same f4 on both paramatersto give f4 using 'F4IF_INT_TABLE_VALUE_REQUEST'
    for example Q1 2014
    now when user selects one value i want to set Q1 to P_QTR and 2014 to P_YEAR.
    but it is setting only one value for P_QTR correctly and the value for P_year is not coming on screen although the value is thier inside code in P_year
    i am using same f4 for both events
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_qtr.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_year.
    here is the code i am using
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
          EXPORTING
            retfield        = 'CHAR20'
            window_title    = text-026
            value_org       = 'S'
          TABLES
            value_tab       = mt_input_f4
            return_tab      = mt_return
          EXCEPTIONS
            parameter_error = 1
            no_values_found = 2
            OTHERS          = 3.
        IF sy-subrc <> 0.
          CLEAR mt_input_f4[].
        ENDIF.
        READ TABLE mt_return INTO ms_return INDEX 1.
        IF sy-subrc EQ 0.
          p_qtr = ms_return-fieldval+0(2).
          p_year = ms_return-fieldval+3(4) .
        ENDIF.
    plz chk  attached pics

    i am sorry for delayed update but i fixed it using following approach.
        READ TABLE mt_return INTO ms_return INDEX 1.
        IF sy-subrc EQ 0.
          ls_dynpread-fieldname = 'P_QTR'.
          ls_dynpread-fieldvalue = ms_return-fieldval+0(2).
          APPEND ls_dynpread TO lt_dynpread.
          ls_dynpread-fieldname = 'P_YEAR'.
          ls_dynpread-fieldvalue = ms_return-fieldval+3(4).
          APPEND ls_dynpread TO lt_dynpread.
    **setting the selection screen values
          CALL FUNCTION 'DYNP_VALUES_UPDATE'
            EXPORTING
              dyname               = sy-repid
              dynumb               = '1000'
            TABLES
              dynpfields           = lt_dynpread
            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.
            CLEAR lt_dynpread[].
          ENDIF.

  • Selection screen parameter validation using search help/check table

    Hi experts,
    I have a select-option that is tied to a search help and check table (type tq80-qmart). Is there a way to automatically validate the field based on what comes up in the F4 search help? What I mean is, when the user hits F4 on the parameter, the list pops up with several records that the user can choose. When the program is executed, I want the program to show an error if the value is NOT in that F4 list.
    I know this can be done in AT SELECTION SCREEN event with a select, but I was wondering if there was a way ABAP does it automatically. Any help will be greatly appreciated.
    Thanks,
    Juan

    Hello Juan,
    SAP does have a standard way of allowing the the user to select from the list via LISTBOX.
    But list box is restricted to parameters only, you cannot attach list boxes to select-options.
    I think the best place to do this validation would be th AT SELECTION-SCREEN event & from your original post it seems you know what code to write

  • Getting values from screen to search help exit

    Hi Experts,
    I have created a search help in which I am not using selection method but search help exit. Dialog type is 'Dialog with value restriction'. My requirement is to get the values entered in restriction screen into search help exit. Please suggest a parameter which will hold this value in search help exit function module.

    Hi M,
    As you know there are 5 steps in search help exit. For each step, the values in parameter of your search help exit is different.
    For your requirement, you need process in step 'DISP', and get the selection value from 'SHLP-SELOPT'.
    Example:
    *Build range for customer number 
    LOOP AT shlp-selopt INTO ls_selopt WHERE shlpfield = 'KUNNR'.   
      lr_kunnr-sign = ls_selopt-sign.   
      lr_kunnr-option = ls_selopt-option.   
      lr_kunnr-low = ls_selopt-low.   
      lr_kunnr-high = ls_selopt-high.   
    APPEND lr_kunnr.   
    CLEAR: lr_kunnr. 
    ENDLOOP.
    Then using the lr_kunnr range in your select statement.
    regards,
    Archer

  • Search Help exits using Web Dynpro abap

    Hi,
    Before returning the values selected by the user to the input field, i have to set a column of the F4 result list based on some computation. How can i do that?
    i.e to set a field value dynamically using search help exit
    plz reply.
    Thanks & Regards,
    Raji.

    Hi Raji,
    The blog mentioned by micheal is written by me.
    Go through the blog and let me know your queries.Lets see if i can help you

  • Passing two export parameter from search help exit

    hi gurus,
    i need your help
    i need  to import two field from search help exit into two screen field.
    eg.
    parameters : p1 type p1 matchcode id s1,
                        p2 type p2,
    on f4 for p1 i am displaying two field in search help output, p1 and p2.
    i am using search help exit FM to pass value from s1, not using any view or table infact extracting data using other function module. i am filling.
    what i want , when i make a selection on f4 for p1, p2 should also be filled from the same search help s1.
    i allready tried memory id-export option in my search help exit at RETURN event but that does not fits well.
    ASAP reply higly appreciated
    will reward point for sure

    thanks a lot it worked out by defining search help for structure which contain these two fields.
    what i was missing was interface link.
    mandy

  • Can somebody help me on how to create Search help exit?

    I have requirement where in i have to use search help exit in search help .Based on the value in the GET parameter id i have to extract the value in the search help can somebody help me in this.

    HI
    In order to offer a meaningful input help for as many screen fields as possible, the R/3 System uses a number of mechanisms. If there is more than one such mechanism available for a field, the one that is furthest left or at the top of the above hierarchy is used.
    In addition to the options described above for defining the input help of a field in the ABAP Dictionary, you can also define it in the screen field. The disadvantage, however, is that there is no automatic reuse.
    With the screen event POV, you can program the input help of a field by yourself. You can adjust the design of the help to the standard help using the function modules F4IF_FIELD_VALUE_REQUEST or F4IF_INT_TABLE_VALUE_REQUEST. However, you should check to see if the part of the input help that you programmed yourself should be implemented as a search help exit instead (see Appendix).
    You can also attach a search help to a screen field in the Screen Painter (Module Pool programming). There are some functional restrictions on this kind of attachment as compared with attachment in the Dictionary.
    You should no longer use the input checks defined directly in the flow logic of the screen, from which it is also possible to derive input helps.
    The function Technical info is offered in the hit list in the menu of the right mouse key. It can be used to find out which of the specified mechanisms is being used.
    Check these links
    Search Help Exits:
    Re: dynamic values for search help
    Re: 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
    check out this link, it gives step by step example of implementing search help exit.
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/implementing%2bsearch%2bhelp%2bexits

  • How to concatenate fields in Search help exit

    Hi,
    My requirement is i have to create a search help for a field in cj20n transaction.
    when i press f4 on that field i should get a popup of 4 fields from custom table,when user selects any 1 row,
    first 3 field values should be concatenated and appear in screen field . in search hlp i added 1 more field so that i can concatenate
    all 3 field values and place in it.I can use  search help exit so i can concatenate but there are steps like selone,presel etc i am not able to understand .
    I saw some examples in wiki, but not able to understand what to do for my requirement.
    regards.
    Edited by: vnamamala on May 27, 2010 12:22 PM

    You would use the step 'SELECT' to control the data selection into an internal table.  You would use the step 'DISP' to map the records in the internal table to the search help record table.  In your case, I would already have a field in the internal table with the values concatenated together prior to the hit list display (do this in SELECT step) which is not displayed in the hit list but is flagged as the EXPORT field in the search help definition; otherwise just put the field at the end of the hit list. 
    Map your results in DISP as follows:
    *   Map the internal table to RECORD_TAB
        CALL FUNCTION 'F4UT_RESULTS_MAP'
             TABLES
                  SHLP_TAB          = SHLP_TAB
                  RECORD_TAB        = RECORD_TAB
                  SOURCE_TAB        = GT_DOCUMENT
             CHANGING
                  SHLP              = SHLP
                  CALLCONTROL       = CALLCONTROL
             EXCEPTIONS
                  ILLEGAL_STRUCTURE = 1
                  OTHERS            = 2.
        CALL FUNCTION 'F4UT_OPTIMIZE_COLWIDTH'
             TABLES
                  SHLP_TAB    = SHLP_TAB
                  RECORD_TAB  = RECORD_TAB
             CHANGING
                  SHLP        = SHLP
                  CALLCONTROL = CALLCONTROL.

  • Steps for creation of search help exit for a search help

    Hi,
    I have created a search help. I need to create a search help exit for this search help.
    Please let me know how to create a search help exit as well as how to link it to my search help.

    1)Copy the FM F4IF_SHLP_EXIT_EXAMPLE to write your own FM. (check the documentation and coding of FM F4IF_SHLP_EXIT_EXAMPLE).
    2)write your code depending upon the functionality you want.
    3)attach the FM in search help through SE11 in "search help exit" field.
    A search help exit is a function module for making the input help process described by the search help more flexible than possible with the standard version.
    This function module must have the same interface as function module F4IF_SHLP_EXIT_EXAMPLE. The search help exit may also have further optional parameters (in particular any EXPORTING parameters).
    A search help exit is called at certain timepoints in the input help process.
    Note: The source text and long documentation of the above-specified function module (including the long documentation about the parameters) contain information about using search help exits.
    Function modules are provided in the function library for operations that are frequently executed in search help exits. The names of these function modules begin with the prefix F4UT_. These function modules can either be used directly as search help exits or used within other search help exits. You can find precise instructions for use in the long documentation for the corresponding function module.
    This module has been created as an example for the interface and design of Search help exits in Search help.
    All the interface parameters defined here are mandatory for a function module to be used as a search help exit, because the calling program does not know which parameters are actually used internally.
    A search help exit is called repeatedly in connection with several events during the F4 process. The relevant step of the process is passed on in the CALLCONTROL step. If the module is intended to perform only a few modifications before the step, CALLCONTROL-STEP should remain unchanged.
    However, if the step is performed completely by the module, the following step must be returned in CALLCONTROL-STEP.
    For more detailed information please refer to the documentation describing the concept of the search help exit.
    The module must react with an immediate EXIT to all steps that it does not know or does not want to handle.

  • Search help exit for field name: BANKL (bank number)

    Is there any search exit that can be used on field BANKL to display only some bank based on user defined criteria?
    Regards

    we can create the search help ..
    we dont need to use CMOD or SMOD for this .
    The search help exit are implemented as function module (newly created) . 
    The place for exit in search help is blank but we can assing our exit ( FM created ) into that . Take the F1 help of that in change mode of search help .
    A search help exit is a function module for making the input help process described by the search help more flexible than possible with the standard version.
    This function module must have the same interface as function module F4IF_SHLP_EXIT_EXAMPLE. The search help exit may also have further optional parameters (in particular any EXPORTING parameters).
    A search help exit is called at certain timepoints in the input help process.
    Note: The source text and long documentation of the above-specified function module (including the long documentation about the parameters) contain information about using search help exits.
    Function modules are provided in the function library for operations that are frequently executed in search help exits. The names of these function modules begin with the prefix F4UT_. These function modules can either be used directly as search help exits or used within other search help exits. You can find precise instructions for use in the long documentation for the corresponding function module.
    well  which search help you want to change. and what changes are needed .?

  • Use of search help exit

    use of search help exit with an example

    Hi,
    A search help describes the standard input help process. In exceptions it could be necessary to deviate in some points from this standard. Such a deviation from the standard can also be implemented with a search help exit.
    The input help process should look as much the same as possible throughout the entire system. Search help exits should therefore only be used for exceptions.
    A search help exit is a function module that has a predefined interface. A search help exit is called at certain times by the help processor. The administrative data of the help processor are passed to the search help exit using the interface.
    You can store your own program logic that manipulates this administrative data in the search help exit. Individual steps of the input help process can be skipped with a search help exit.
    for example
    Search help exit F4UT_OPTIMIZE_COLWIDTH adjusts the column width in the hit list to the contents of the column. It makes sense to use this search help exit when the columns of the hit list have to be made very wide for extreme cases (e.g. for name fields), but normally they will contain much smaller values.
    Each search help exit must have the same interface as function module F4IF_SHLP_EXIT_EXAMPLE (is used as pattern for all the search help exits to be created). You can find more information about the interface in the documentation for this function module.
    Calling the Search Help Exit
    If a search help exit is assigned to a search help, the help processor calls it at the following times:
    Before Displaying the Dialog Box for Selecting the Required Search Path.
    It is only called for collective search helps. Using the search help exit, the set of elementary search helps available can for example be restricted depending on the context.
    Before Starting the F4 Process for the Elementary Search Help
    The call is triggered independent of whether the dialog window for entering the search conditions appears or whether the selection is executed immediately (for example, because in the Hot key of the elementary search help Immediate value display is set).
    Before Displaying the Dialog Box for Entering Search Conditions.
    You can either influence the dialog for entering search conditions or skip it altogether here. You can also influence how the selection screen looks. The call is triggered only if there is no direct selection (that is, if in the Hot key of the elementary search help Immediate value display is not set).
    Before Selecting Data.
    The data selection can be partly or completely copied from the search help exit. This can become necessary if the data selection cannot be implemented with a SELECT statement for a table or a view.
    Before Displaying the Hit List.
    You can influence the display of the hit list in this step with the search help exit. You can reduce the number of values displayed here. For example, you can display only values for which the person calling the input help has authorization. You can also copy the complete hit list from the search help exit.
    Before Returning the Values Selected by the User to the Input Template.
    It could be advisable to intervene at this time if control of the further transaction flow should depend on the value selected. A typical example is setting set/get parameters.

  • SELECT-OPTIONS Values via DYNP_VALUES_READ in a Search Help Exit

    Hi all,
    I appended a standard search help of a standard report with a search help of my own. Now I am trying to retrieve the values the user has entered into the selection screen of the report using the FM DYNP_VALUES_READ in my search help exit FM. It works fine for single values defined by PARAMETERS and for low and high values of SELECT-OPTIONS (so_example-LOW and so_example-HIGH), but I need the entire SELECT-OPTIONS table. I cannot make any changes in the report, so do you have any solutions I could implement in my search help exit FM?
    Many thanks!
    Vladan
    P.S.
    I found several questions on this topic but they either just different enough not to be applicable in my case or the formatting has made the replies useless.

    Most of the time we just copy the standard FM F4IF_SHLP_EXIT_EXAMPLE to a new one and give our own name.
    You can see that on the 12th line there is the following code
    * EXIT immediately, if you do not want to handle this step
      IF CALLCONTROL-STEP &lt;&gt; 'SELONE' AND
         CALLCONTROL-STEP &lt;&gt; 'SELECT' AND
         " AND SO ON
         CALLCONTROL-STEP &lt;&gt; 'DISP'.
         EXIT.
      ENDIF.
    you should comment those line in order for the control to reach the PRESEL step (which is already defined in the SH Exit FM) which is on line 44.
    Most of the time, when someone says they don't hit PRESEL, this is the problem.
    Edited by: ajithkpunnoose on Jan 5, 2012 12:00 PM

Maybe you are looking for

  • How can I export a PDF photo portfolio with a clean cover page?

    Hello, I have compiled a photo portfolio in Bridge and wish to have a clean cover page that does not have the contact info, copyright, etc., that exists on the photo pages.  The cover page was created in Ps and imported into Bridge. From what I can s

  • Why can't i upload facebook on my ipad mini?.please help..thanks

    why can't i update facebook on my iphone 5 and can't upload facebook on my ipad mini?..please help..thanks 

  • No Images in Navigation Entries

    I see there are image attributes for navigation bar entries and I have set them, but only the text label shows up in my navigation bar. I've looked at the templates, but it only shows a #BODY# substitution string, so I can't see how the entries are c

  • Delete material view transaction MM06

    Hi gurus For error has been opened costing1 and costin2  material view for a material. Is there any way to delete only two material views? I have used transaction MM06 but deletes the material at plant level. Using transaction MM74 the modification s

  • Can't open downloaded files on library

    I downloaded some files about 3 months ago but tried to open but the option appears grey or disabled. I read somewhere in this forum that iif "Open" and "Open Containing Folder" in the right-click context menu in the Download Manager window are graye