Search help that populates two fields on a WEB dynpro page

Hi there,
I have created a search help based on a single table ( QPCD ) with two exporting parameters CODEGRUPPE and CODE. When the user selects a their desired entry i would like it to poulate the relevant two fields on the web dynpro screen. I know in a normal dialog screen you could get this to happen automatically, but when implementing it into a web dynpro from abap screen it only returns the first value into the field that the search help was called from. Anyone know how i could get both fields populated?
Thanks in advance
Regards
Mart

check http://help.sap.com/saphelp_nw04s/helpdata/en/5d/395e4254139041e10000000a1550b0/frameset.htm
It is not that hard.
Create a new webdynpro component and implement IWD_VALUE_HELP in this component.
go to the component controller of you new component and add a new attribute:
listener type ref to IF_WD_VALUE_HELP_LISTENER.
in the method set_value_help_listener add the line:
wd_this->listener = listener.
then you can create as much views and things you need for your search help.
To set a selected value just add a method to your component controller which takes the values as import parameters. if you only want to set the value for the attribute it was requested for:
  wd_this->listener->F4_CONTEXT_ELEMENT->set_attribute(
    name = wd_this->listener->F4_ATTRIBUTE_INFO-name
    value = <value>
This is the save way
But you can also call
  wd_this->listener->F4_CONTEXT_ELEMENT->set_attribute(
    name = 'CODEGRUPPE'
    value = <value_codegruppe>
  wd_this->listener->F4_CONTEXT_ELEMENT->set_attribute(
    name = 'CODE'
    value = <value_code>
But keep in mind that if the structure of the element changes, this could lead to short dump if the name of the attribute changes or the attribute was deleted.
if you want to close the search help window call wd_this->listener->close( ).
Hope this helps.
Cheers,
Sascha

Similar Messages

  • Search help to populate mutiple fields

    Hi All,
    I have a problem with standard collective search-help CLCITYNAME which I added parameter POST_CODE1 type IMPORT and EXPORT. I then create elementary search-help Z_CITY_NAME, which is included into collective search-help CLCITYNAME, which has parameter POST_CODE1 type IMPORT and EXPORT.
    This collective search-help CLCITYNAME is called in transaction XD02 on F4 of the CITY field. The added search field POST CODE is showing but selected post code value is not passed to the screen. WHat can I do to pass the selected post code to screen.
    Pls help.
    POints will be rewarded.
    Thanks.

    Hi,
    For the data to flow from search help attached to screen,the search help and the screen field should be created with same dataelement.And the parameter "EXPORT" should be checked while creating the search help.
    Regards,
    Ajith

  • Use search help to populate two screen fields

    I've done a search on this and see that plenty of people ask this question but none get answers, hopefully you'll be able to help me out.
    I have a selection screen with two fields:
    data: s_house LIKE t012k-hbkid,
            s_account LIKE t012k-bankn.
    I've created my own search help Z99FI_BANKN and attached it to field s_account.  The search help has two fields:
    BANKN - IMP, EXP
    HBKID - IMP, EXP
    If I click on F4 in field s_account and select an account, it populates s_account but not s_house.  Can someone tell me where I'm going wrong?  I'd like the one search help, when I select an account on field s_account to populate s_house too.
    Thanks,
    Gill

    Gill,
    Try the following.
    First of all in your top include define your structure:
    TABLES: Z99FI_T012K.
    Second, open your structure, select BANKN, select the tab Entry help/check
    and press the button Search Help. There you must match the fields from your structure with your search help parameters.
    In my case it was:
    ZLOAD_DESCR     ZZLOAD     ZLOAD_DESCR
    ZLOAD_ID                     ZZLOAD     ZLOAD_ID
    Also make sure that in your search help the field you are selecting on is checked as import and export and the field where the data must come along is checked as Export.
    Now open up the graphical screen painter, and put on your screen
    the fields from your structure. You can do this by opening the window Dictionnary / Program Fields window -> give in the name of your structure and press "Get from dictionary".
    Place your fields on your screen, activate it and try again.
    Thanks for your feedback on this.
    Reward points if helpfull.
    Best regards,
    Tom.

  • FM : to call collective Search help and update two fields in SSCR

    Hi Experts,
         I have problem while using collective serach help.
        My scenario is using Collective Search help thru that i want to update 2 fields in my selection screen.
    Thru this function module F4IF_INT_TABLE_VALUE_REQUEST  i can mapping and update two fields using DYNP_VALUE_UPDATE but using this function module i can't able to call my Collective Search help
    in other way
    Thru F4IF_FIELD_VALUE_REQUEST  i can able to call the collective search help but _i can't mapping field and can't updated the
    selection screen field_
    Is any otherway to do it, Please help me ASAP.
    Regards,
    Florian.

    Hi Friends,
    I have the similar kind of requirement. Upon click on a Button on screen i need to call a search help, and collect one or more selected material numbers.
    The search help is working fine and i am getting the entries with the following code.
    The problem is i am finding extra popup on screen.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
    EXPORTING
    tabname         =  space
    fieldname       =  space
    SEARCHHELP      =  'MAT1'
    MULTIPLE_CHOICE =  'X'
    STEPL           =  0
    value           = 'MATNR'
    *dynpprog        =  progname
    *dynpnr          =  dynnum
    *dynprofield     = 'CARRIER'
    CALLBACK_PROGRAM          = 'ZTEST_1_PRA'
    CALLBACK_FORM             = 'F4CALLBACK'
    TABLES
    RETURN_TAB                = RETURN_TAB
    EXCEPTIONS
    FIELD_NOT_FOUND           = 1
    NO_HELP_FOR_FIELD         = 2
    INCONSISTENT_HELP         = 3
    NO_VALUES_FOUND           = 4
    OTHERS                    = 5.

  • SEARCH HELP TO AN INPUT FIELD

    HOW TO APPLY SEARCH HELP TO AN INPUT FIELD FOR FOLLOWING EXAMPLE:
    FOR THE FIELDS LOCATIONS, AND CONFERENCE ROOM NO.
    LOCATIONS ARE A, B, C, D, G AND CONFERENCE ROOMS OF THESE LOCATIONS ARE,
    A1, A2 ,A3,, LIKE WISE FOR REST OF THEM.
    HERE IS THE PROBLEM,
    hi,
    this is a realtime implementation scenario pls provide full coding and answers with screen programming of it.
    it is as follows:
    Business Scenario u2013 conference room booking for the company
    Business Scenario
    You will build a computerized system to automate the process of Conference room booking for a company .
    Xi Infotech, a software company, is having 5 locations at Bangalore. Each location has 3 conference rooms available
    Masters
    Maintain Employee Details
    Maintaining Conference room Details.
    Maintaining booking details
    Transactions
    Maintaining Date and timing of Meeting
    The conference room in any of these locations have to be Pre-booked for the meeting indicating the purpose of meeting & no. Of attendees, date and time for which required.
    Booking Confirmation has to be sent to the employee who blocks the room. If any other person tries to book the same room, he should be able to see that this room is blocked and the details regarding the employee who has blocked and the purpose & time for which the room is blocked
    Reports
    Datewise report on the conference rooms of all locations.
    Month wise reports of conference room booked.

    Hi,
    For a given field if you have more number of possible values then go for the Value table or check table.
    If you have a few values for a given field, then go for Value ranges. These can be maintained at Domain level for a field.
    For each field create a correspondign data element(DE)
    In this DE, we can have the FURTHER CHARACTERISTICS tab we can create a search help Or directly from SE11 we can create a SH then attach this to the DE Or we can directly maintian Or At the DOMAIN level we can  .
    Ex:
    LOCATIONS ARE A, B, C, D, G AND CONFERENCE ROOMS OF THESE LOCATIONS ARE,
    A1, A2 ,A3,, LIKE WISE FOR REST OF THEM.
    Ex:
    SE11->
    DE and Domain names is LOC.
    In SE11->DOMAIN->LOC->
    Here as you have a few values we can maintain it in VALUE RANGES tab->
    like
    A (Description to be given) ie Loc A for Hyderabad
    B Bangalore
    C
    D
    G
    Room Numbers-> here can createa value table with serial numbers at the Domain level.
    Attach the same to the  respective DE in the SE11.
    Similary we can maitain for Conference room numbers or
    We can create a Search help using the two field LOC and RoomNos and create a Elementary search help.
    Like this we can do.
    Get back if you still have queries on this.
    Please refer to this link  for more info-
    SEARCH help
    Regards,
    Chandralekha

  • Dynamic Search Helps In An Input Field

    Hi Experts,
              I need to populate an input field with different search helps based on the user action i.e when user selects "Audit"  i hav to show the audit search help for my input field, when he selects  "Audit Plan" i would hav to show audit plan search help.
    My Questions >
    1> i intend to use the method set_attribute_value_help of the interface if_wd_context_info and do the coding as :-
    data lo_nd_info  type if_wd_context_node_info.
      lo_nd_info = lo_nd->get_node_info( ).
    CALL METHOD lo_nd_info->set_attribute_value_help
            EXPORTING
              name            = 'identification' (attribute Name)
              value_help_mode = '121'
              value_help      = 'plm_auditplan'.(Help Name)
    Is this the correct way to go if not plz suggest a more appropriate method.
    2> in the context for that attribute ,what should i specify for the property input field
        Input Help Mode
        i.e should it be deactivated , automatic or should i give the dictionary serach help and specify  one of the search helps by giving its name.
    Your responses will be greatly appreciated,
    Chaitanya.

    Hi Ebru,
    Yes, it is possible using OVS, freely programmed and dictionary help.
    For OVS, refer this blog: /people/shruti.rathour/blog/2008/05/05/ovs-help-in-web-dynpro-abap
    For Dictionary Search Help, refer http://help.sap.com/saphelp_nw70/helpdata/EN/47/9f724642314aabe10000000a42189b/frameset.htm
    For freely programmed, refer:
    http://help.sap.com/saphelp_nw70/helpdata/EN/47/9ef8cc9b5e3c5ce10000000a421937/content.htm
    I hope it helps.
    Regards
    Arjun

  • Search help at a structure field does not appear

    Hi there,
    i have created a customer own search help and for a first try i have assigned it to a screen field. This worked propperly but i receive values for three fields (document number, company code and fiscal year) from that search help - what has been succesfully testet in SE11 and worked ok.
    To assign all exporting fields to my screen I deleted the search help at the screen field and I created a copy of RF05L structure and assigned my search help to the document number there. My screen fields belong now to a structure and the type of that structure is my version of RF05L, at first with type, later changed to like.
    So my screen field must have the search help from that structure, but it has no search help at all.
    After some trials I deleted my field from the screen and added it again based on my structure and changed the name to my internal structure name for the document field. This was the only trial where the search help appeared afterwards but as I did the same to the two other fields it disappeared again and I could not make it visible until now.
    What shall I do?
    Thank you in advance for any hints.

    Hi Axel,
    When you are adding the screen fields - are you sourcing them from the Program OR Data dictionary.
    You should source it from the Data Dictionary and ensure the screen fields attribute "From Dict." checkbox is marked in the "Dict" tab.
    Hope this helps.
    Regards,
    Aditya

  • Need some help in creating Search Help for standard screen/field

    I need some help in adding a search-help to a standard screen-field.
    Transaction Code - PP01,
    Plan Version - Current Plan (PLVAR = '01'),
    Object Type - Position ( OTYPE = 'S'),
    Click on Infotype Name - Object ( Infotype 1000) and Create.
    I need to add search help to fields Object Abbr (P1000-SHORT) / Object Name (P1000-STEXT).
    I want to create one custom table with fields, Position Abb, Position Name, Job. Position Abb should be Primary Key. And when object type is Position (S), I should be able to press F4 for Object Abb/Object Name fields and should return Position Abbr and Position Name.
    I specify again, I have to add a new search help to standard screen/field and not to enhance it.
    This is HR specific transaction. If someone has done similar thing with some other transation, please let me know.
    There is no existing search help for these fields. If sm1 ever tried or has an idea how to add new search help to a standard screen/field.
    It's urgent.
    Thanks in advace. Suitable answers will be rewarded

    Hi Pradeep,
    Please have a look into the below site which might be useful
    Enhancing a Standard Search Help
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/daeda0d7-0701-0010-8caa-
    edc983384237
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee93446011d189700000e8322d00/frameset.htm
    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.
    During the input help process, a number of timepoints are defined that each define the beginning of an important operation of the input help process.
    If the input help process is defined with a search help having a search help exit, this search help exit is called at each of these timepoints. If required, the search help exit can also influence the process and even determine that the process should be continued at a different timepoint.
    timepoints
    The following timepoints are defined:
    1. SELONE
    Call before selecting an elementary search help. The possible elementary search helps are already in SHLP_TAB. This timepoint can be used in a search help exit of a collective search help to restrict the selection possibilities for the elementary search helps.
    Entries that are deleted from SHLP_TAB in this step are not offered in the elementary search help selection. If there is only one entry remaining in SHLP_TAB, the dialog box for selecting elementary search helps is skipped. You may not change the next timepoint.
    The timepoint is not accessed again if another elementary search help is to be selected during the dialog.
    2. PRESEL1
    After selecting an elementary search help. Table INTERFACE has not yet been copied to table SELOPT at this timepoint in the definition of the search help (type SHLP_DESCR_T). This means that you can still influence the attachment of the search help to the screen here. (Table INTERFACE contains the information about how the search help parameters are related to the screen fields).
    3. PRESEL
    Before sending the dialog box for restricting values. This timepoint is suitable for predefining the value restriction or for completely suppressing or copying the dialog.
    4. SELECT
    Before selecting the values. If you do not want the default selection, you should copy this timepoint with a search help exit. DISP should be set as the next timepoint.
    5. DISP
    Before displaying the hit list. This timepoint is suitable for restricting the values to be displayed, e.g. depending on authorizations.
    6. RETURN (usually as return value for the next timepoint)
    The RETURN timepoint should be returned as the next step if a single hit was selected in a search help exit.
    It can make sense to change the F4 flow at this timepoint if control of the process sequence of the Transaction should depend on the selected value (typical example: setting SET/GET parameters). However, you should note that the process will then depend on whether a value was entered manually or with an input help.
    7. RETTOP
    You only go to this timepoint if the input help is controlled by a collective search help. It directly follows the timepoint RETURN. The search help exit of the collective search help, however, is called at timepoint RETTOP.
    8. EXIT (only for return as next timepoint)
    The EXIT timepoint should be returned as the next step if the user had the opportunity to terminate the dialog within the search help exit.
    9. CREATE
    The CREATE timepoint is only accessed if the user selects the function "Create new values". This function is only available if field CUSTTAB of the control string CALLCONTROL was given a value not equal to SPACE earlier on.
    The name of the (customizing) table to be maintained is normally entered there. The next step returned after CREATE should be SELECT so that the newly entered value can be selected and then displayed.
    10. APP1, APP2, APP3
    If further pushbuttons are introduced in the hit list with function module F4UT_LIST_EXIT, these timepoints are introduced. They are accessed when the user presses the corresponding pushbutton.
    Note: If the F4 help is controlled by a collective search help, the search help exit of the collective search help is called at timepoints SELONE and RETTOP. (RETTOP only if the user selects a value.) At all other timepoints the search help exit of the selected elementary search help is called.
    If the F4 help is controlled by an elementary search help, timepoint RETTOP is not executed. The search help exit of the elementary search help is called at timepoint SELONE (at the
    F4IF_SHLP_EXIT_EXAMPLE
    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.
    The module must react with an immediate EXIT to all steps that it does not know or does not want to handle.
    Hope this info will help you.
    ***Reward points if found useful
    Regards,
    Naresh

  • Search Help for Infotype Custom Field

    Hi,
    I have created a search help for a custom field in an infotype. What would be the best way of filtering the help selection based on infotype values such as molga, begda, endda?
    Thanks in advance.
    /Elvez

    Hi Nishanth,
    thanks for your reply, perhaps I should clarify my question:
    1) I have a custom field in an infotype
    2) I have a table containing the search help information
    3) I assigned a search help to the custom field
    4) I have activated a search help exit
    The problem is that the information that I get from the custom field is not sufficient for making the selection. Therefore, I would like to somehow get hold of the addition information, such as BEGDA, ENNDA, MOLGA, to do a proper selection in the search help exit. How can I achieve that?
    I read something about function module DYNP_VALUES_READ -would it be possible to call this function module from my search help exit and thereby reach my goal?
    /Elvez
    Message was edited by: Elvez

  • How to attach search help in a particular field in se80 screen

    Hi All,
    Can any one tell me how to attach a search help in a particular field in a screen.
    Wat search help is used to display material no and description
    Thanks in Advance
    Regards,
    Priya

    Hi Priya,
    In the Screen Layout, Double click on the field on which you wish to attach the search help.
    In the properties window you can specify the search help for that field.
    Search help for Material No. is MAT1.
    You can find it in the Table structure (SE11) , "Entry help/check" tab.
    Regards,
    Himanshu

  • SRM Portal - Search help for a custom field

    Hi,
    I have added a custom field to the SRM Portal (5.0) shopping cart, by adding the field to structures INCL_EEW_PD_ITEM_CSF INCL_EEW_PD_ITEM_CSF_SC.
    However, I need to filter the search help for that custom field, based on values & relationships stored in a Z table.
    Is this possible? How? Please help.
    Thank You.

    Currently, my idea would be to create a search help for the custom field & filter the values in a search help exit. However, would I be able to get other field values (standard) from SRM into my search help exit?

  • FM to find Search help for a table field

    Hello Colleagues,
    is there any function module which would return the search help associated with a table field ?
    I tried with the FM F4IF_DETERMINE_SEARCHHELP but it returns search help that is associated with either to table field DE or search helps associated with the value table fields. I need to find only
    the search helps that are associated with a table field but not the value tables or fixed values.
    For ex. If i pass table_name = 'SFLIGHT' and field_name='CARRID' then it should return me S_CARRIER_ID. but if i pass field_name='CONNID'  then it should return nothing..
    Best Regards, JVR

    Hi Kishore,
    Use the Function Modulein the F4 help associated with a table field ...
    CALL FUNCTION ' HELP_VALUE_GET"
    EXPORTING
      fieldname =  'CARRID'  "field name in the table you refer
      tabname = 'SFLIGHT'   "Table name
    IMPORTING
    select_value = S_CARRIER_ID.  "Selected field
    Regards,
    Prabhudas

  • Adding search help to standard SAP field

    Hi Experts,
    I need to add search help to field ZUONR i.e assignment field in various tcode like fb70,fb60,f-02.etc which will select data from
    Z tables . I have found out serach help exit F4IF_SHLP_EXIT_EXAMPLE but as per my knowledge that is to change existing standard search help.But to field ZUONR there is no search help attached.How can new Z search help be added to field ZUONR without use of access key.
    Please suggest.
    Regards,
    Kaustubh Kabre.

    Hi,
    I don't know how to change "Value table" field on domain without access key, but if nothing else work, you can add new fixed values. From menu Goto->fixed value append.
    Other possibility is to use GuiXT -> write script that will call your FM that will get data from your table and show them.
    Best regards
    Marcin Cholewczuk

  • Applying search help on the screen fields of a module pool program

    hi all
    i am creating a sales order against a purchase order i am stuck at applying the search helps
    i have header data (only mandatory fields),items data,partner data(all mandatory fields)
    i want to have input search help as if i select sales document type then corresponding sales organizations should appear and when i select all the header data the search help that is on the material number and partners role and number should appear corresponding to that header data
    i found following search helps as:-
    h_vakz and h_mvke
    not able to apply please guide someone
    thanks
    varun

    i want to have input search help as if i select sales document type then corresponding sales organizations should appear
    This would be quite opposite of what h_vakz does. h_vakz gives Sales document based on Sales org..and you want vice versa. Create a simple SH with
    selection method : TVAKZ
    AUART as importing only
    VKORG as exporting only. So when you enter an AUART you get all VKORG it is defined in. I'm not aware of a standard search help which matches the requirement. If anybody does please help me.
    i have header data (only mandatory fields),items data,partner data(all mandatory fields)
    and when i select all the header data the search help that is on the material number and partners role and number should appear corresponding to that header data
    You will have to be more specific sir..
    not able to apply please guide someone
    As for that just mention them in SCREEN->ELEMENT LIST->REFERENCES

  • Search help for Standard SAP field

    Hi,
    I need to add a search help to Group key (KONZS) field in XK01 transaction. How can i add our own search help to a field in standard transaction?? This is some what urgent, please give me the solution .
    Thanks in Adavance,
    Moghani.

    You can APPEND your own search help to an SAP field that has search help defined.  This is similar to APPENDing fields to an SAP table.  But since field KONZS does NOT have any search help assigned, this option is not available to you. 
    You can also attach the search help to a field on a screen, i.e. limit the scope to that single screen, but this would still require a modification to the system, and hence, an access key.  If you want to follow that route, the program name is SAPMF02K, screen 120, element list tab, references tab, search help column.
    If you find another way to do this without an access key, please let us know.

Maybe you are looking for