Freely Programmed search help - Accessing Alternative node

Hi Experts,
I am trying to use Freely Programmed search help for calling a custom WD component on pressing of F4 of an input field.
I have done everything required and the component is being called properly as well.
The issue here is that i need to pass two values to the the custom WD component on F4. As suggested in one of the threads I used F4_CONTEXT_ELEMENT to get the reference of the source context node and attributes. But the problem is that this gives reference to only that node which has the input field with F4 help (which is being used to call the custom component). The values which i need to pass are present in some other node.
Can you please suggest a way of accessing the other node to retrieve and use the values in the custom component called?
Regards,
Ritvik
Edited by: Ritvik Prasad on Mar 31, 2010 5:16 AM

Hi Manas,
Thanks for the suggestion. I had thought about it too. But the problem that i faced was that no event is triggered/Method called on pressing of F4 on that input field (its internally handled in the framework). In that case what should be the method/event where i should copy the values from the other node to the new attributes created so that it reflects in the Custom component?.
If you could just elaborate on that it would be really helpful.
Hi Chris,
Thanks a lot for this. That actually sounds like fun. I tried looking for options to do that. Although i can get to the node from the element using "GET_NODE" but there I could not find the method "GET_PARENT_ELEMENT" to get the parent element (context as you said). Is there any other method which could possibly return the parent element which i could eventually use to get to the other node.
It would be great if you could help out with this.
Thanks ,
Ritvik

Similar Messages

  • Freely Programmed Search Help

    Hi there,
    I have a WebDynpro application with two fields.  The first field has Dictionary search Help on it.
    The second field has a Freely Programmed input help.  The problem I am faced with is that the freely programmed search relies on the value of the first field to determine it's own values - i.e The first field is a contract, and the second field is an item on the contract.  So if the contract changes, so should the list of items provided in the Help.
    Now the way that this works is that the user selects a contract, then selects an item, then completes the fields in a PDF document.
    They press the button Save and Clear which saves the data, clears all the fields, and is then ready for the next lot of data.
    Although I can clear out all the fields, I don't know how to trigger the refresh of the Freely Programmed help.  The first time it is used it gets the right data, and after that it always shows the same data, - I just don't know how to trigger a refresh.  Basically I want it to refresh every time it is used!!
    Many thanks
    Jack

    Hello Jack,
    hmm... it should refresh itself, because you determine what goes in and out. Probably, you need to clean up some nodes in your freely programmed search help component as well i.e. upon leaving.
    Best regards,
    Thomas

  • Freely Programmed Search help in Std Comp

    hi,
    Is it possible to add freely programmed searh help in standard SAP Component.
    I have dynamically assigned Freely search help to Context attribute using  set_attribute_value_help method.
    Now new component to be used in seach help is made in different package and this component is used as Used Comp
    in Std Component.
    When I click on search help it gives error : Comp usage ZHelp doesnt exist.
    zhelp- My component name.

    You have to add the component usage to the Standard Component, just like you would add the Freely Programmed Search help component usage to any component that wanted to call the search help.
    Component usages can be added using the Enhancement Framework:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/46/233f2189f74f08e10000000a114a6b/frameset.htm

  • Freely programmed search help with external mapping

    Hi all.
    I have a freely programmed search help to search for physical inventory items.
    I map some data from the component where i use this search help to this search help via external mapping. This works fine.
    But in the search help I want to be able to change the mapped data to perform a new serach. When I change the data and start the action to search again (in the serach help component)  I still get the old field value from context so that the search returns the same result. When I close the search help afterwards the changes are suddenly visible in the using component. So my entered data are somehow transfered to the original context but not to the context of the used component.
    Any ideas?
    Thanks
    Sascha
    Message was edited by:
            Sascha Dingeldey

    Hi Sascha,
    I would suggest, that you do not work with the externally mapped attribute.
    Try to copy the value to a "local" attribute in the searchhelp context while WDDOINIT of the component.
    This is the attribute you should use for the search.
    When you change the searchvalue, it is only changed in the comnponent.
    To get the values back to the calling component you need to copy it back while you call the action submit or exit.
    Hope this helps
    Best regards, Matthias

  • Freely program Search Help

    hi,
    I am using a freely program search help. In this i have two buttons OK and Cancel.
    I have put these buttons in the view under the search table. But my requirement is that, buttons should come at the window level, not in the view, like in dictionary search help.
    Please suggest how can i achieve that.
    Regards,
    Pankaj Aggarwal

    Use a container and every element in Container.

  • Event Handler is not getting trigger for Freely Programmed search help

    Hi All,
       I am having a component comp1 defined for value help with one event. In component comp2 i want to call the comp1 but the event handler which i have created is not getting triggered. Any reasons for it.
    Thanks
    Raghavendra

    Hi Kumar,
    Please check these forum threads.
    Re: Help required on Freely Programmed Input help
    Re: Custom search help

  • How to add Freely programmed input help in FPM Search UIBB?

    Hi Experts!
    We have a requirement to create search UIBB in which the input field should have a freely programmed input help.
    I see that WD_VALUE_HELP parameter can be set to the component name and it displays the freely programmed help as well in the application.
    However, I am still digging to implement the search help open and close events of the component.
    I have used the Freely programed value help standard demo object  " FREE_VALUE_HELP "  which shows the value in the help popup however, the selected value is not returned in the input field.
    I am also unable to find any Interface as provided for implementing OVS in search UIBB as well...
    Please help.

    Hi Aliaksandr,
    Thanks for your response.
    I have checked this WDA application demo_value_help .... but it is a normal WDA application.
    However, I want use freely programmed search help in Search UIBB using FPM.
    I found that we can provide the component name used as freely programmed search help in the attribute WD_VALUE_HELP of Interface IF_FPM_GUIBB_SEARCH.
    https://help.sap.com/saphelp_nw74/helpdata/en/03/f2474b6d9a49f4b5a3ed6f04decf22/content.htm?frameset=/en/56/d151c3ba7b4b2e82068a084cb991f3/frameset.htm
    And it displays the search help as well when I do F4 on the field of Search UIBB. But, we need to provide event handler for events - VH_WINDOW_CLOSED and VH_WINDOW_OPENED of the search help component (Component which is provided in WD_VALUE_HELP) some where in the Feeder class, in order to get the selecteed data from the search help, which I am unable to do.
    Do you have any idea of such implementation?
    Appreciate your response!

  • Problem in Select Option Freely programmed F4 Help

    Hi All,
    I had a Component 'A'  where i used select option. I used Freely programmed search help for the select option field.
    If i click F4 in the select option field it will call one component in which i have one more select option in component B.
    In component B select option field if i manually entering value and search and click apply values button the values are comming in the select option field in component A.
    But if i pressing the F4 in Component B and search and click apply values the value are not comming in the Component 'A'.
    If i open again component B and closing it without any action the value is coming in component A.
    If i debugged and see the WDDOMODIFYVIEW of tHE WDR_SELECT_OPTION is not getting called for component A.In which it has Rendering delta method of CL_WDR_SELECT_OPTION.
    Any idea about this.
    Regards,
    Ganesh.

    hi Ganesh,
    i have read your post several time and i am still not able to get hold on your problem. Probably it is to do with your complex approach of nested select_option, i can not judge why you did this way. I would advice you to step back and see it for yourself
    1)if it is need to have nested select_option
    2)check component initialization and destroy
    2)check event subscriptions

  • Freely Progrramed Search Help The Window Is Blank

    Hi,
    I am using Freely Programmed Search help and I created a component for provision of F4 values.
    This Component works fine Individually.
    But when I am using this component in another component The pop up I am getting is a Blank.
    Please help me in this issue

    HI Thomas,
    How are you testing standalone?
    Yes I am testing by directly executing the Application in the component.
    I created the time component for providing Value help , I created a application for it and its working fine.
    but when I am using it in another its not working showing just a blank pop up.
    How is you data selection performed?
    I have a table which will be filled using select options for a Date range.
    In the table I have the Time field for which I have to provide the time Value Help.
    after providing the Values I have to Save to database
    Do you have the IWD_VALUE_HELP component interface implemented? Are you using the SET_VALUE_HELP_LISTENER method of the interface? What internal processing are you doing with the LISTENER object?
    I have done exactly the same as you described in the Document.
    code of my Set_value_help_listener Method
    wd_this->value_help_listener = listener.
      IF wd_this->value_help_listener->f4_attribute_info-rtti->type_kind NE 'T'.
        DATA: error TYPE string.
        error = wd_assist->if_wd_component_assistance~get_text(
        key = 'E01' ).
    * get message manager
        DATA: l_current_controller TYPE REF TO if_wd_controller,
        l_message_manager TYPE REF TO if_wd_message_manager.
        l_current_controller ?= wd_this->wd_get_api( ).
        l_message_manager =
        l_current_controller->get_message_manager( ).
    * report message
        l_message_manager->report_fatal_error_message( message_text = error ).
      ENDIF.
      DATA: item_time TYPE syuzeit.
      wd_this->value_help_listener->f4_context_element->get_attribute(
                                       EXPORTING name = wd_this->value_help_listener->f4_attribute_info-name
                                       IMPORTING value = item_time ).
      DATA: node_internal_node TYPE REF TO if_wd_context_node,
            elem_internal_node TYPE REF TO if_wd_context_element,
            stru_internal_node TYPE if_componentcontroller=>element_internal_node .
    * navigate from <CONTEXT> to <INTERNAL_NODE> via lead select
      node_internal_node = wd_context->get_child_node(
      name = if_componentcontroller=>wdctx_internal_node ).
    * get element via lead selection
      elem_internal_node = node_internal_node->get_element( ).
    * get all declared attributes
      elem_internal_node->get_static_attributes( IMPORTING static_attributes = stru_internal_node ).
      stru_internal_node-time = item_time.
    * set all declared attributes
      elem_internal_node->set_static_attributes( EXPORTING static_attributes = stru_internal_node ).
      me->set_ddlb_values( ).
    Basically what is your component supposed to be doing?
    My component has a Table and in one of columns I have a time field . I need to Provide value help for that field.
    Hope I am clear
    Regards
    Edited by: SAP LEARNER on Dec 14, 2009 2:28 PM

  • Help required on Freely Programmed Input help

    Dear all,
    I have developed a component, say comp1, in which i have implemented the interface IWD_VALUE_HELP.
    In the respective view(MAIN) of Comp1 i have a dropdown which contains a list of company codes fetched from T001 table.
    Apart from these two, I have also embedded the Main view into the window WD_VALUE_HELP.
    Now, I have created another component, say Comp2, in which i Used the dynpro component Comp1, and also in the MAIN view of my Comp2. Now in the MAIN view of Comp2 I have created a input field from the node T001 in the context which contains the single attribute BUKRS type String. In the properties of the BUKRS attribute I have also changed the Input help to "Freely Programmed" and linked to the component for the Input help.
    After this, I have created the application for my component Comp2. When i run the application and when i press F4 on the input field i am able to get the window from Comp1 component, and a dropdown with values.
    Now the question is, How can i pass the value selected in that window of Comp1 into the input field of Comp2? we do the same in OVS, when ever a value is selected from the Hitlist, it will be cascaded into the input field, just like that i want to do here.
    Please suggest me how to do this, and also please tell when to go for Freely programmed Input help and its advantages.
    Thank you,
    Shashi.

    You can do as suggested already and use interface nodes and cross component mapping; but that is all really not necessary.  It creates a situation where you calling application is too dependent upon the freely programmed input help.  You want to try to avoid the situation where the calling application needs code or mappings to communicate with the input help.
    That is easy to do because the framework passes all the information you need into the freely programmed input help via the value_help_listener object. 
    Part of the Freeley Programmed Input Help Component should be the component interface IWD_VALUE_HELP.  This comes with a component controller method called SET_VALUE_HELP_LISTENER.  This allows your freely programmed value help to capture this object called listener of type IF_WD_VALUE_HELP_LISTENER. I generally just store it awa into a component controller attribute.
    With this listerner object you have direct access to the context attribute in the calling component. You can query information about the calling UI element and of course set values directly back into it.  The listener is a hugely helpful object and should be the way you interact with the calling component whenever possible.  Here is small example:
      set single attribute
      wd_this->value_help_listener->f4_context_element->set_attribute(
      exporting
        name = wd_this->value_help_listener->f4_attribute_info-name
        value = l_time

  • Freely-programmed value help for a single ALV cell

    Greetings everyone,
    I have a freely-programmed value help that works beautifully when attached to the context element of a single field, but now I'm needing to use it in an ALV for a specific cell.  Is there a way to shut off the dropdown for all of the rows (cells) in the column where I don't need it?  Or, is there an appropriate workaround that can deliver the same results?
    I've found several posts that address similar issues, but nothing for this exact problem.
    Thanks,
    Jason Block

    I take it from reading your description what you want is a little more complicated than just controlling the read-only property on the input field. If I read you properly you still want to have all the cells in a column to be open for input, just on some of them you want to disable the value help.  Is that correct?  See these screen shots for clarification:
    If you focus on the the input field in the first row, you get the value help:
    http://www.flickr.com/photos/tjung/2714133068/
    However if you go to the second row and focus on the same input field in this column, you don't get the value help:
    http://www.flickr.com/photos/tjung/2714133094/
    If this is what you want, then buckel up because this was a challenging one.  The problem is that the value help specification is not done at the UI element level, but instead at the context attribute level.  Therefore it can't be as simple as controlling a property on the inputField itself.  What you will need to do is extend the context node that you have bound to the ALV.  You need to add a second version of the attribute that is bound to your input field.  In this second version you can set the value help specification to Disabled:
    http://www.flickr.com/photos/tjung/2713320505
    Notice from the screen shot that I also added another attirbute called CVAR (type STRING).  We will need that later.  It will be used to store which cell variant show be used on a particular row.
    Now we must go to the place in your code where you fill the context node with data.  You will need to copy the data from your primary attribute to your secondary one.  In my case I was copying the values from CARRID to CARRID2.  Of course for update, you would need to merge the data back together before saving it back to the database.  I also set a simple odd/even pattern of controller in the cell variant.  I assume you will have some actual business logic that controls this:
    data odd type boolean value abap_true.
       loop at lt_f_r_sflight[] assigning <ls_f_r_sflight>.
        clear ls_c_r_sflight.
        move-corresponding <ls_f_r_sflight> to ls_c_r_sflight.
        move <ls_f_r_sflight>-carrid to ls_c_r_sflight-carrid2.
        if odd = abap_true.
          odd = abap_false.
        else.
          odd = abap_true.
          ls_c_r_sflight-cvar = 'NOVH'.
        endif.
        insert ls_c_r_sflight into table lt_c_r_sflight[].
      endloop.
      lo_r_sflight->bind_table( lt_c_r_sflight[] ).
    Next is the logic in the initialization of the ALV.  We will need to create two input fields - each bound to the different context attributes. We will make the one the primary cell editor.  The other will become the cell editor of the cell variant.  We then tell the column where it can get its cell variant value from:
    DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
      lo_cmp_usage =   wd_this->wd_cpuse_alv( ).
      IF lo_cmp_usage->has_active_component( ) IS INITIAL.
        lo_cmp_usage->create_component( ).
      ENDIF.
      DATA l_salv_wd_table TYPE REF TO iwci_salv_wd_table.
      l_salv_wd_table = wd_this->wd_cpifc_alv( ).
      DATA l_table TYPE REF TO cl_salv_wd_config_table.
      l_table = l_salv_wd_table->get_model( ).
      l_table->if_salv_wd_table_settings~set_read_only( abap_false ).
      DATA input1 TYPE REF TO cl_salv_wd_uie_input_field.
      DATA l_column TYPE REF TO cl_salv_wd_column.
      l_column = l_table->if_salv_wd_column_settings~get_column( 'CARRID' ).
      CREATE OBJECT input1
        EXPORTING
          value_fieldname = 'CARRID'.
      l_column->set_cell_editor( input1 ).
      DATA input2 TYPE REF TO cl_salv_wd_uie_input_field.
      CREATE OBJECT input2
        EXPORTING
          value_fieldname = 'CARRID2'.
      DATA l_cv TYPE REF TO cl_salv_wd_cv_standard.
      CREATE OBJECT l_cv.
      l_cv->set_key( 'NOVH' ).
      l_cv->set_editor(  input2 ).
      l_column->add_cell_variant( l_cv ).
      l_column->set_sel_cell_variant_fieldname( 'CVAR' ).

  • Free Programmed Search Help Question

    I want to use the free programmed search help interface to make
    my own search help.
        But the problem is, I want to embed SAP's search help into my own
    search help.How can I do that?
        Thank you.

    Hi,
    I had the same requirement and so I used Dictionary search help.
    In this you have to attach dictionary search help as inpute mode for paricular
    context node.
    e.g. If you want to attach a F4 help for vendor number, then goto attribute of that particular node and search for your attribute. Now click on vendor and change the properties of the same attribute as input help mode will be changed as
    'Dictionary search help' and put your own created search help name in the
    'Dictionary search help' tab. Also you can use standard search help name if you know as 'Dictionary search help '.
    Also there is another way to handle the same.
    In this blog you can find a solution with select options and custom F4
    /people/koen.labie2/blog/2006/11/17/custom-f4-functionality-in-webdynpro-for-abap
    Hope I have solved your problem.
    Cheers,
    Darshna.

  • Integrate Freely Programmed Value Help in Select option WDR_SELECT_OPTION

    Hello All,
    I have created Freely Programmed Value Help name (ZVALUE_HELP) by using IWD_VALUE_HELP.I have develop an application(ZSELECT_OPTION) which uses the resubale component WDR_SELECT_OPTION for select option.i want search help for one of my select option input field .
    i wrote the following code.
    *initalise the used component
    data lo_cmp_usage type ref to if_wd_component_usage.
    lo_cmp_usage =   wd_this->wd_cpuse_ci_serach_help( ).
    if lo_cmp_usage->has_active_component( ) is initial.
      lo_cmp_usage->create_component( ).
    endif.
    * add a new field to the selection
      WD_THIS->M_HANDLER->ADD_SELECTION_FIELD(
      I_ID = 'ZCI_STATUS'
      IT_RESULT = LT_RANGE_TABLE
      I_READ_ONLY = READ_ONLY
      I_OBLIGATORY = ABAP_FALSE
      I_VALUE_HELP_TYPE = IF_WD_VALUE_HELP_HANDLER=>CO_PREFIX_APPLDEV
      I_VALUE_HELP_ID   = 'ZVALUE_HELP'
    when i execute the select option application n click on search help button i got error "Component usage ZVALUE_HELP does not exist.
    Edited by: Abhilasha Dahare on Aug 3, 2011 11:10 AM

    hi Abhsilasha,
    I think your code is some thing wrong.
    you have to assign free value help like below method.
    in the attribute( the select option field ) properties, you will find input help mode property, in that select 'freely  programmed'.
    then you willl get some more fields, there you have to provide ZVALUE_HELP
    of follow reema suggestion in below link
    How to integrate a Search Help in a dynamically created Select-Option?
    Regards
    Srinivas
    Edited by: sanasrinivas on Aug 3, 2011 12:06 PM
    Edited by: sanasrinivas on Aug 3, 2011 12:10 PM

  • Freely programed F4 help

    Hello Experts,
    i want to create a freely programed F4 help for one of the attribute in my context.
    can anyone tell me how to go about it step by step.
    Thanks,
    gunjan

    Hi Gunjan,
    Below are the important points which you need to keep in mind while designing this 2nd component ( say COMP2) :
    1) Your component which gets displayed as the search help must implement the Interface IWD_VALUE_HELP. (For this double click on your Web Dynpro Component & go to the "Implemented Interfaces" tab. Just specify IWD_VALUE_HELP under the "Name" column & press on enter. The "implementation State" would then display a green traffic light for you signifying that the interface has been successfully implemented.)
    2) A window by name WD_VALUE_HELP would have been automatically added to this component when you implement the IWD_VALUE_HELP interface. You need to embed the view which you would like to appear on F4 help under this particular window. (Normally if you had created a MAIN view you would embed this view under the window with the same name as your component. But in this case you need to embed your main view under the window WD_VALUE_HELP )
    Now below are the steps to be followed within your main component (say COMP1) in which you have your input field & up on pressing which you want the Freely Programmed Help to Appear.
    1) You need to declare a component usage of your help component (COMP2) within your main component. (COMP1)
    2) Specify a "Controller Usage" of the Used component within your components view. (Go to the "Properties" tab of your view & click on "Create Controller Usage" button & select the INTERFACECONTROLLER of COMP2)
    3) Now change the "Input Help Mode" of your desired context attribute to "Freely Programmed".
    Regards,
    Uday

  • POWL: Freely Programmed Input help for Selection Criteria possible

    Hi,
    is it possible to add a freely programmed value help to a POWL-selection field? In this case the use of OVS is unsufficient from the user perspective.
    Can anybody guide me?
    Thanks, Elke.

    I dont intend to create another search help component for my 2nd input field because if let say i have 20 input fields that requires search help, does that means I need to create 20 search help components and embed 20 of them into my parent component?
    NO need of creating 20 more search helps if you have these 20 attributes in the result table of the value help.
    just check in the help from where the help is getting called and then pass the value accordingly.
    here is a sample code where i am checking whether the search help is called from ID field or Location field and then passing
    the required info back.
    lo_listener = wd_comp_controller->value_help_listener.
    lv_attrib_name = lo_listener->f4_attribute_info-name.
    IF lv_attrib_name EQ 'ID'.
    lo_listener->f4_context_element->set_attribute( value = lv_id
    name = lv_attrib_name ).
    ENDIF.
    IF lv_attrib_name EQ 'LOCATION'.
    lo_listener->f4_context_element->set_attribute( value = LOC
    name = lv_attrib_name ).
    ENDIF.
    wd_comp_controller->fire_vh_data_selected_evt( ).
    thanks
    sarbjeet singh

Maybe you are looking for

  • Set size and location of  a component

    Hello, Does anyone familiar with this org.netbeans.lib.awtexttra.AbsoluteConstraints(). I want to set the size and location of the component, and I know this org netbeans can provide this function. getContentPane().add(chkTausta, new org.netbeans.lib

  • Can be fixed in next firmwares?

    I have and iPod Classic 80GB, is my first iPod, and i got very disappointed. Like don't know if this problems can be fixed with firmwares i write this post. I suppose the coverflow bugs, like it mix albums with same title, and the drain battery can b

  • The front camera of my iphone5 is not working if im going to take selfies. Its only working on facetime. So idont think the front camera itself is defected. Confusing

    its really confusing. I can only use the front camera of my iphone5 for facetime. But if im going to use the camera or third party camera apps like camera 360, wechat,skype etc. the front camera is not working. coz if the front camera is totally defe

  • XML is slow

    Hi there, we have a lot of customers that provide us with data via XML. Actually we are building a kind of central data store. When validating the XML and storing it in relational tables it takes a lot of time. 1 XML-message may contain about 50 mill

  • MAC/PC version of elements 11

    Hi - I bought a retail boxed version of photoshop elements 11. The one with 2 discs, A MAC and a PC version. I use both a mac and a PC. Can I install it on both machines. Thanks