Problem in Value help

I created a custom component 'ZTEST23' it act sas pop-up screen in my component for the field LAST NAME when I click the F4 the pop-up is generated but when i double click on the value,it is not coming back to to last name and pop-up is not closing automatically? <<text removed>>
Thanks & Regards,
Chetan Agali.
Edited by: Matt on Oct 5, 2011 9:35 AM

Thanks for your suggestion,
To Add value help I reffered cpgas_advsearch field empl resp, I am sending my code please check it and if you found any error let me know.
method: get_dquery_defination.
FIELD-SYMBOLS: <rs_result> LIKE LINE OF rt_result.
  CALL METHOD super->get_dquery_definitions
    RECEIVING
      rt_result = rt_result.
  LOOP AT rt_result ASSIGNING <rs_result>.
    CASE <rs_result>-field.
      WHEN 'CPLASTNAME'.
        <rs_result>-server_event = 'LAST_NAME_F4_OPEN'.
         WHEN OTHERS.
    ENDCASE.
  ENDLOOP.
endmethod
method EH_ONLAST_NAME_F4_OPEN.
   cl_thtmlb_util=>get_event_info(
    EXPORTING
      iv_event = htmlb_event_ex
    IMPORTING
      ev_index  = mv_vh_index ).
  IF lastname_valuehelp_popup IS NOT BOUND.
    DATA lv_title TYPE string.
   lv_title = cl_bsp_runtime=>get_otr_text( 'CRM_UIU_BP/SEARCHEMPLOYEETITLE' ).
    lv_title = 'SearchLastName'.
    lastname_valuehelp_popup = comp_controller->window_manager->create_popup(
     iv_interface_view_name = 'ZTEST23/MainWindow '
     iv_usage_name = 'Value_help'
     iv_title =  lv_title ).
  ENDIF.
  lastname_valuehelp_popup->set_on_close_event( iv_view = me iv_event_name = 'LAST_NAME_F4_CLOS' ).
  lastname_valuehelp_popup->set_display_mode( if_bsp_wd_popup=>c_display_mode_surrounded ).
  lastname_valuehelp_popup->open( iv_inbound_plug = 'CLEAR_ALL' ).
endmethod.
method EH_ONLAST_NAME_F4_CLOS.
  DATA:   lv_col_wrapper TYPE REF TO cl_bsp_wd_collection_wrapper,
           lv_current TYPE REF TO if_bol_bo_property_access,
          lv_last_name TYPE REF TO data,
           lv_sold_to TYPE REF TO if_bol_bo_property_access,
           lv_outbound_plug TYPE seocmpname,
           lv_context_node TYPE REF TO cl_bsp_wd_context_node,
           lr_qs            TYPE REF TO cl_crm_bol_dquery_service,
           lr_col           TYPE REF TO if_bol_bo_col,
           lv_bo            TYPE REF TO cl_crm_bol_abstr_bo,
           lv_value         TYPE REF TO data,
           lv_fired_plug    TYPE  seocmpname,
           lr_iterator      TYPE REF TO if_bol_bo_col_iterator.
  FIELD-SYMBOLS: <lv_last_name> TYPE ANY,
              <lv_value>         TYPE ANY.
  lv_fired_plug = lastname_valuehelp_popup->get_fired_outbound_plug( ).
  CHECK lv_fired_plug IS NOT INITIAL.
  lv_context_node = lastname_valuehelp_popup->get_context_node( iv_cnode_name = 'RESULT' ).
  lv_col_wrapper = lv_context_node->collection_wrapper.
  lv_current ?= lv_col_wrapper->get_current( ).
  IF lv_current IS BOUND.
   lv_last_name ?= lv_current->get_property( iv_attr_name = 'CPLASTNAME' ).
    ASSIGN lv_last_name->* TO <lv_last_name>.
    lr_qs ?= me->typed_context->search->collection_wrapper->get_current( ).
    lr_col = lr_qs->get_selection_params( ).
  Get the line where the value help has been called from
    lv_bo ?= lr_col->find( iv_index = mv_vh_index ).
    IF lv_bo IS BOUND.
      lv_bo->if_bol_bo_property_access~set_property( iv_attr_name = 'LOW' iv_value = <lv_last_name> ).
    ENDIF.
  ENDIF.
endmethod.

Similar Messages

  • Facing problem with Value Help

    Hi Friends,
    I am trying to use Value helps for 4 different variables.
    When I click on any Value help for a range of that variable, it gives list of 1st variable only.
    Please help..
    Jatin

    Hi,
    What is "We need all the variables with value help in a single form".
    For this creat all variables with single form and then add value helps there.
    You are getting same list means you are creating (using same design parameters) for both fields:
    comp_code and Emp_code .
    I think u did mistake in fields mapping while creating value help i.e step no 2
    Can u check this once and if this is not correct just send ur gml file i will check and let u know the problem
    Regards,
    Govindu

  • Problem into Value Help

    Hello,
    We are facing Problemon Value Help is  that while Clicked on the u201CValue Helpu201D button we
    are getting Popup with all the values. If I Passed value with search
    field then also we are getting all the value.(Search Option is not
    working)
    Waiting for your response.
    Thanks
    Chittya Bej

    Hi Chittya
    Are you using BI - BEx query for creating value Help? If yes then you need to first select variable type as 'Multiple Single values'.
    Then while creating 'Value Help', there is one tab for 'Get Data From' here select 'Diamension Table'. & then try with search options. IN search options you need to select ' Between, Greater than etc' & then give From & To values. IT will work.
    If you have any issues then do let me know.
    Regards
    Sandeep

  • Value Help in WD Table

    Hi to all!
    I have a problem with value help in a Web dynpro Table.
    In my WD I have a Table with a field that had a free Value help, if I press F4 the Value help is opening
    If I select an item the value of the Help, the popup is closing but the selected value is not in the table cell.
    Have someone an idea, how I can solve this problem?
    Thanks for the answers
    greetings
    Hermann

    Hi Herrmann,
    for free value help you have to implement the data setting by your own.
    Though the following thread covers ALV, Regina's answers will cover you request, I guess:
    Value Help for ALV
    Cheers,
    Sascha

  • Value Help in online Adobe Interactive Form

    Hi All,
    One of our clients needs value help in Adobe Interactive form for Java Webdynpro.
    But I got a problem in value help. For the first time when I click the button its working fine but the next time itu2019s not working.
    The whole screen is locked and no event is triggered for the next time.
    I am using Adobe Lifecycle Designer 8.0, Netweaver Studio 7.13  and the display type is ZCI(native).

    Hi Syed,
    I am using Adobe Lifecycle Designer 8.0, Netweaver Studio 7.0  and the display type is ZCI(native), but i am getting dump on click on valuehelp button. Can please provide me steps to resolve this? What are things need to be done.

  • Problems with F4 Value Help in NW2004s Portal

    Hello,
    we are having some troubles with the F4 ValueHelp Extension from the Advanced BSP Programming book (and the blogs of course).
    We've implemented the solution on a 4.7 backend and portal 6.0. No problems there, everything was working fine.
    We now moved to erp2005 (WebAS 700) and NW2004s Portal (7.0).
    The popup shows and I can select entries from the list. But when clicking the ok icon a javascript error is thrown stating that 'parent.document.getElementById(...)' is null or no object.
    I think the problem is, that by making a call to 'parent' we are searching in the portal frame and not the BSP. There (in the portal frame) the element is not known so the error is thrown.
    I allready changed from the dialog_ie6.js provided on the BookCD to the one delivered by SAP. Did nothing regarding the error.
    I also tried changing ZCL_BSP_M_INPUT_HELP->BUILD_ACCEPT_SELECTION_SCRIPT. I changed all the "parent.document.get..." "to document.get...". The error message was still the same, 'parent.document.getElementById(...)' is null or no object.
    So now I'm kind of stuck. If I try the example outside the portal everything works as expected. So this clearly seems to be a problem with the portal integration. All involved BSP-Apps are marked as "supports portal integration".
    Any ideas on this topic?
    Thanks and kind regards,
    Alexander Sperling

    I have a working solution to the problem.  It isn't the nicest solution because it will probably require some modifications to the application that hosts the value help, but we will get to that in a second.
    I tried many different ways to come up with a solution that would still work via JavaScript. The portal is now loading the popup javascript in the master frame.  It registers event handlers so that if any application triggers a popup internally it "hi-jacks" the event.  So regardless of what I change in the BSP javascript library, it gets overriden by the portal one. The portal also now even enforeces its theme on the inner page in the popup.  Truly the portal takes complete control over the inner html of the popup.
    To make things worse the popop has not path to reach the source that triggered it.  The source objects are tracked in the javascript, but because the master frame takes over; the popup window only has access and visibility to the master frame and the navigation frame.  In essence in the DOM it is now higher in the stack than the object that actually triggered it. 
    Web Dynpro gets around this because it doesn't use any client side mechanisms to communicate it results back to the source frame. Web Dynpro has the luxury of always being stateful and therefore can make certain assumptions that would never work in BSP.  The hi-jacking is an excellent solution for Web Dynpro.  The portal can then override the functionality of Web Dynpro - providing the new functionality of floating the dialog box over the entire portal - without having to make any changes to the Web Dynpro Framework.  However they never had our little BSP solution in bind obviously.
    It might be possible to completely rewrite the popup_ie.js and popup_ns.js to use all different event, method and variable names.  This separate version could then provide complete separation from the portal script. However this is just a theory. I'm afraid that I wouldn't have the bandwidth to rewrite the entire script right now so I focused on a quicker solution.
    The only approach that I could come up was to follow the Web Dynpro approach and return to the server with the value. To do that I used Portal Eventing.  Portal Eventing allows us to pass a value to the source frame regaurdless of our relative positions in the DOM. 
    In my inner BSP application for the value help (ZES_VALUEHELP), I made the following change in the model method BUILD_ACCEPT_SEL_SCRIPT_V2.  At line 141 I changed the logic.  Instead of using JavaScript to write the selected value back into the source element, we will just trigger a Portal Event:
    ****With an InputField we write the contents directly back into the element
          ELSE.
            CONCATENATE me->js_close1
            `portalFireEvent('com.sap','`
            me->element_id
            `',"`
            key
            `");`
             INTO me->js_close1.
            EXIT.
    The other change is within the Element handler class for inputHelpV2 - ZCL_ES_BSP_ELMNT_INPUT_HELP_V2.  We need to register the listener for the Portal Event. Therefore in DO_AT_BEGINNING we will add the follwing at line 23 (right after we place the Element Id into the URL Parameters Table.
      data: portal_event type ref to cl_portal_event.
      portal_event = cl_portal_event=>factory(
        name = <wa_params>-value
        namespace = 'com.sap' ).
      while m_page_context->element_process( element = portal_event ) = co_element_continue.
      endwhile. "End portalEvent Render
    Overally using the portal eventing actually is an intersting approach.  There is only one drawback, now we have a server side event.  That being the case, our application now needs some event logic to process this event and populate the value. Depending upon if you are using MVC, Data Binding, or Flow Logic this could vary - and would have to handled by each application. The nice thing about the old approach was that it all happened via JavaScript on the Frontend and didn't require the application programmer to do anything - that was obviously its weakness as well.

  • Custom Error Message in Value Help

    Hi,
    In my application i have a Inputfield called "CLASS", for which i have added a value help..it has these values
    B    Business
    E    Economy
    F    First Class
    When the user enters a value(say "X") other than B, E, and F, it displays a message
    <b>String "X" does not match the enumeration</b>
    I want to put my own message like " Please enter a valid value" instead of the above message.
    Please let me know how to do this ?
    Thanks
    Senthil

    Senthil,
    First, "looping through the list and checking the user entered value with values in the list" is possible only with non-validating actions. Using non-validating actions is a tricky task in real life.
    Second, workarounds are possible, but they involves calculated attributes (like here: /people/valery.silaev/blog/2005/11/29/800format-your-way). Solving this problem generically (45 attributes is a good number to start with a generic solution) will result in solution with complexity comparable to this: https://weblogs.sdn.sap.com/pub/wlg/3309. [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] Do you need such thing just to alter error message?
    Valery Silaev
    EPAM Systems
    http://www.NetWeaverTeam.com

  • Date format is not working properly for Calender value help

    Hi Experts,
    We have two problems.
    1. We want to change the format of date displayed. We want format of dd-MMM-yy. For that we have created one Simple
    Type Dictionary Object with Displaying format dd-MMM-yy. It is working
    fine for the non editable UI. But once I apply the dictionary type
    object as data type for an input field, probem happens. Once the user
    choose a date from calender value help the value in the input field is
    coming like 01-011-12 not like 01-Jan-12.
    The date format is not changing from the calender. But if we set the
    display format of the dictionary object to MM-dd-yy or MM/dd/yy or
    dd/MM/yy or dd-MM-yy the format conversion from calender to input field
    is happening properly.
    The only problem once we put MMM in place of MM for the input field
    where user is selecting from a calender value help.
    2. We want to restrict users from entering the value manually for date input field. The user
    should be able only to enter value by selecting from calender value
    help.
    Please give suitable solution for these problems
    Thanks
    Shankha

    Hi Sankha,
    Please refer the links below:
    http://scn.sap.com/thread/1659463
    http://scn.sap.com/thread/1533443
    Regards,
    Manoj

  • Value help dropdown list not showing up other values

    Dear all,
    I'm new to Adobe and Java WD. I managed to go through all the tutorials and developed a WDJ and embedded an interactive form in the view. I also used an RFC Model to pull some values from n R/3 table and populate in a context node element.
    These values are appearing perfectly fine in the WDJ if I'm using a table or a drop down list index field.
    But in the Adobe form, when i bind this context node to a WebDynpro native Value help drop down list box, only the first value of the table appears. On clicking on it, nothing happens. I'm not sure what is the problem.
    Can anyone please help me in this? Should i write some code to bring the other values too? (the tutorial doesn't say this!)
    If so, then please give some sample java codings and step by step process for populating the field values with the table values.
    My node structure is like below
    Context
         Ysam_Get_Values_Input(Node-RFC)
              Output (Node-RFC O/P)
                   Values(Node-table from the RFC)
                       Slno (attribute that has the values to be populated with)
    Any help is greatly appreciated.
    Thanks,
    Sam

    Hi Raja,
    In the view:
    <htmlb:gridLayoutCell id                  = "AddedProfileNameIF"
                                        columnIndex         = "2"
                                        rowIndex            = "2"
                                        horizontalAlignment = "LEFT"
                                        verticalAlignment   = "MIDDLE" >
                    <htmlb:dropdownListBox id         = "added_profile1"
                                           helpValues = "//model/ust10st.profn"
                                          />
                  </htmlb:gridLayoutCell>
    In the Model:
    method MODEL_INIT .
    select profn from ust10s into  table UST10ss.
    read table UST10ss index 1 into UST10st.
    endmethod.
    In controller:
    METHOD do_init .
      m_model ?= create_model( model_id = 'm'
                               class_name = 'zcl_model_zsox1' ).
    m_model->model_init( ).
    ENDMETHOD.

  • Want to read Field value set by Value help

    Hello,
    I have BSP View which is using Value help extensions for one of the input. The search help is based on the Elementary Search Help which is further based on Z-Table. In my BSP view [IE] I am able to popup the Search help and able to select the Value from list of choice. The selected value gets reflected in the Input field of browser. The problem is I am not able to capture the selected value in Event handler. I need to capture this value and get the related data in other input fields [which are display only]. How to do this?
    I even tried getting the value in the Javascript, but unable to assign the Javascript variable to my BSP View attribute or Controller attribute.
    Thanks in advance.

    >Do I have to trap it in DO_HANDLE_Event by doing Get_Form_Fields??
    If you are using MVC and data binding you don't have to do anything.  The field values will be brought in automatically for you.
    However in any MVC application, the highest level controller should always contain a small block of code in the redefinition of the DO_REQUEST method.  It is:
    if input is available, dispatch this input to subcomponent.
    * this call is only necessary for toplevel controllers.
    * ( if this is not a toplevel controller or no input is present,
    *   this call returns without any action)
      dispatch_input( ).
    * if any of the controllers has requested a navigation,
    * do not try to display, but leave current processing
      IF is_navigation_requested( ) IS NOT INITIAL.
        RETURN.
      ENDIF.
    This code is critical for properly dispatching events through the controllers.  It is also the code that triggers the MVC runtime to restore input values into the model.
    Also to eliminate the possibility with a problem in the implementation of the value help, why don't you temporarily switch out this element with just a plain htmlb:inputField.  This way you test to make sure that data binding works correctly with the standard field.

  • Error in Flex at the time of Value Help

    Dear All,
    While I am creating Value Help then this error shows if deployed.
    "Error in compiling swf for Flex 2 application. Consult log file for details."
    What should I do?
    Regards,
    Santanu

    Hi Santanu,
    Which version of Visual Composer are you using?
    From the description of the problem it sounds like 7.0 (04s) version and not CE (7.1 and above).
    If that is the case, you should try to ask about this in the [VC 7.0|SAP NetWeaver Visual Composer; forum.
    Best regards,
    Tal.

  • F4 / Value Help on a Read-Only Field in a WD app

    Hi friends,
    I am struggling to put up a F4 help on an input field which has been set up as read-only. The idea is to have the field as read-only, and allow the user to select any value from the predefined values using F4/value help.
    Now, I get the F4 help working if the field is NOT in a read only mode, However, the moment I set it to READ ONLY , the F4 help vanishes.
    Is there a way to have the F4 help associated with the field even when the field is a read-only ?
    Thanks.

    Great Solution ! This works.
    However, there is a small problem with the usage of browsers. If you use Mozilaa/ Chrome, then even the 1 px width of dummy field show up. However with IE the 1 px does now not show up, so the F4 help comes up right next to the original field. But that is not something significant !

  • Dynamic value help for a table field to fill two fields, how to?

    Hi all gurus,
    In SRM 7 I defined a dynamic value help for a single field (ZZ_PROLE_R3) of my header custom table.
    That's the code from WDDOMODIFYVIEW in the webdynpro /SAPSRM/WDC_DODC_CT, view V_DODC_CT:
    DATA: lo_tabnode        TYPE REF TO IF_WD_CONTEXT_NODE.
          DATA: lo_tabnode_info   TYPE REF TO IF_WD_CONTEXT_NODE_INFO.
          DATA: tab_value         TYPE WDR_CONTEXT_ATTR_VALUE_LIST,
                wa_value          TYPE WDR_CONTEXT_ATTR_VALUE.
          lo_tabnode = wd_context->GET_CHILD_NODE( name = 'THCUS' ). "the custom table node
          lo_tabnode_info = lo_tabnode->get_node_info( ).
          wd_this->GET_VALHELP_ZZ_PROLE_R3( EXPORTING iv_guid = lv_guid
                                            IMPORTING ZZ_PROLE_R3_VALHELP = tab_value ). "this method returns the dyn value table
          lo_tabnode_info->set_attribute_value_set( name = 'ZZ_PROLE_R3'
                                                     value_set = tab_value ).
    The method GET_VALHELP_ZZ_PROLE_R3 dynamically builds the value help table tab_value; such table is made up by two fields:
    value : contains the value of the field
    text   : contains a description of the value
    The above solution works; now I'd like to enhance it. The custom table THCUS contains also a field called ZZ_PROLE_R3_DESC, which represents the description of ZZ_PROLE_R3. It is, exactly, the TEXT field in tab_value.
    So I'd like to do as follows:
    - the user clicks on the search help for ZZ_PROLE_R3 field of the table;
    - the above described value help appears;
    - after the selection, both ZZ_PROLE_R3 and ZZ_PROLE_R3_DESC are filled with the selected couple value - text chosen from the value help.
    Could anyone help me achieving such a behaviour?
    Again, a little request... when I open the above value help dialog box, the window itself has a label "Floorplan Manager application for OIF.." that obviously I'd like to redefine (e.g. "Role selection value help"). Is there any way to do that?
    Thanks in advance

    Chris Paine wrote:
    It seems to me - given that your code is in wddomodifyview that you are trying to have different dropdowns per row
    - I'm not sure where you are populating lv_guid - but I'd guess it is an attribute of the row selected? If it isn't then I can't see any reason that you would do this code in wddomodifyview and not wddoinit.
    Hi Chris and thanks for your help,
    lv_guid is the GUID of the document's header; I need to pass it to the method that populates my value help table because the values in it are derived from some fields on the document. (the situation actually is more complex; there's an RFC call on the backend for which the document is intended for to retrieve the data that populate the value help...).
    I'm quite unexperienced on webdynpro and terminology; if dropdown menus are fixed selection option that appears on a field, I guess this is not my case. I did a pair of screenshot to provide an idea of what the solution by now is, and what "I would like to have":
    [Pre-selection (F4 icon on the field in table)|http://imagebin.ca/view/npIsaqF.html]
    [Value Help popup for the field ZZ_PROLE_R3|http://imagebin.ca/view/8fZUh3T.html]
    [Result by now |http://imagebin.ca/view/3PaqdvE.html]
    [Result I'd like to have.|http://imagebin.ca/view/dExR0J.html]
    Chris Paine wrote:
    However - by your comment on the "value help dialog box" I am guessing you are using an input field? If this is the case then I would strongly suggest that you change/enhance the structure of the context node THCUS (btw, better coding practise to refer to it as wd_this->wdctx_thcus when using the get child node construct) so that you refer to an actual SAP ddic search help, if you then associate in the structure the value and text fields then populating the text field should happen automatically. Also you'd have the nice side effect that your value help dialog would be named after the associated ddic search help.
    Thanks for the code suggestion, I'll apply that. For what concerns the context node THCUS... It is, by standard, a node which I can't explictly find in the context for the view V_DODC_CT. The problem is that ZZ_PROLE_R3 and the corresponding description field ZZ_PROLE_R3_DESC of the table must be filled with data retrieved dynamically @ runtime from the backend. So I guess I can't populate a val help referring to a dictionary table/field; I'd rather do as follows:
    - retrieve what's the target backend for the document (to do so, I have to process the document .. that's why the header guid passed to my method);
    - RFC call to a custom method that extracts possible values for the specific backend;
    - bind the ammissible values to the value help.
    Chris Paine wrote:
    I realise that this is rather a lot - so if you have any specific question please do respond - hopefully I or someone else will be able to clarify.
    Thanks again for your help; additional info as well as code examples would be highly appreciated

  • Using Wildcards in Value Help

    Hi,
    I have a input filed ZPERNR and i have assigend PREMN search help on this field.
    I am able to search people in the organisation and it all works great until I use wildcards
    When I enter SMITH in the last name in the value help it comes back with the list of people whose last name is SMITH
    Problem:
    When I enter SMITH* in the last name I get no results
    In the SQL trace I noticed it changed my SMITH* to smith%
    Not sure if there is any sap note to this issue
    Any ideas?

    Hi Jörg,
    Yes the icon (Pattern) does appear after I enter, however I still don't get any results.
    The weird thing is the value help works perfectly alright in r/3
    Not sure why it is not working for me in the portal.
    Thanks for your reply
    Kal

  • Value Help in Interactive Adobe Form in Web Dynpro

    I have to provide a value help for certain Fields in Interactive Adobe Form using Web Dynpro ABAP. I have managed to get the Value Help Popup for the fields using Java Script in Adobe, but the problem is that whenever I select the Value from the Value Help, the selected value in not getting populated in the field....
       Please let me know the solution in case any one of you come across such kind of requirement.

    Priyanka:
    Can you let me know the steps on how to provide value help in interactive forms?
    Thanks
    Vijai

Maybe you are looking for

  • Appraisal Workflow in SAP R/3

    My clients me show them a Appraisal Workflow in SAP R/3 by using four User id's just for testing purpose. Is it possible. If yes, then how to do it. Can anyone explain me detail. In my client place, workflow is: Appraisee->Appraiser->Reviewer->HR Sam

  • Rule group in sap bi

    hai to all. can any one give senario for creation of rule group in transformation.

  • No content Repository Found in OAOR

    Hello Gurus, I am using OAOR transaction for uploading documents in Content Server. After I upload the documents, In my program when I try to read the corresponding URL of the document, It could retreive it in my development system. But I am having a

  • Time outs

    I have suddenly found that I am being asked to "Re-Sign In" after a period of time on iCloud when using my Mac.  I have never encountered this in the past and am wondering why, all of a sudden, this has begun to occur?  Also, is there a setting that

  • Table cells merging or splitting

    The whole application is nice. But I found few things need some improvements. While creating table, merging or splitting of column cells or row cells are not possible now.