Enter-Event on an "Input Field"

Hello Community...
i would like to trigger an event on an Input-Field in my Form. When I enter a value and press "Enter" the value should be given via an output signal to another iView. What kind of event do I have to choose to achieve that? I chose a Custom Action, but the value was passed to the output signal when I left the field.
Greetz, Jochen

Hi Jochen,
As per your requirement:
" When I enter a value and press "Enter" the value should be given via an output signal to another iView"
press Enter means u want to have a button in the form along with the input field. Am I correct?
If so then why to give action in the input field.
"I chose a Custom Action, but the value was passed to the output signal when I left the field"
Beacuse If you will give the event in input field then when you will fill the value in the input field that action will be triggered.
Better to give the action in the button if you want to press and then event has to be triggered.
Go to the Button property--give system action--as submit.
Then to pass data between the iviews you must have used signal out and signal in.
Regards,
Nutan

Similar Messages

  • Enter key in an input field

    Hi!
    How can I do that when the user press "enter" key click inside an input field (for example an inputText), that key press fires the action of a commandButton diferent than the fisrt i have placed in my form???
    Can anybody help me? =)

    Define your form with a on key press event:
    <h:form id="yourForm" onkeypress="if (event.keyCode == 13) {javascript:submitForm(); return false;}; return true;">The javascript function is:
    function submitForm(){
         if (event.keyCode == 13){
              document.getElementById('yourForm:submitButtonId').click();
              return false;
         return true;
    }submitButtonId is the id of the button that needs to be triggered when you press enter key. Hope this should solve your problem.
    SirG

  • Dynpro: event handling on input field in custom control?

    Hello,
    can I  put an input/output Field in Custom Control?
    I have seen this (DD_ADD_FORM_INPUT) but i dont need a Form.
    What i want to do is: Double Click Event handling on the input field in the custom control.
    Thank you?

    Hi Mohi,
    OK, you could reduce DD_ADD_FORM_INPUT to what you really need - but the DD elements (rarely if ever used in standard SAP) do not have a double-click event. Must stick to ENTER.
    An alternative is a text_edit or an editable grid_control with one line one field.
    The problem is: There is no way to put any selection-screen element on a control.
    I's go for the grid approach as you certainly may have some more fields of interest.
    Regards,
    Clemens.

  • Inability to enter value in an input field at first go.

    Hi All,
    I have an input field in a table where when I click first time to enter a value, the cursor is not getting placed and I am not able to enter any value.When I click for the second time, I am able to enter the value.This is a mandatory field and we should be able to enter the value at first go which is not happening.Please help on this.
    Thanks & Regards,
    Reinuka Paul.

    Hey thanks alot for the above reply.it was really helpful.
    After the patch level was applied, I am getting problems with double and big decimal.
    Like Double a = new Double(string);
    is giving me null value . wherewas if i print the string there is value in the string like 110.000.
    Please suggest what should i do with this problem.
    Thank you.

  • Need help to get the user entered value from a input field in Table in OA

    I have a table in my OA page.
    Here one column is there which should take in put from user.
    i.e an item quantity field text input is there which should take the updated value when the add to cart link which is next column in the table. On clicking of the link I am trying to get the updated value entered by user. for the respected row for which addto cart link get clicked.
    For that link I have defined some parameter through SPEL,( like this parameter name: item_quantity value : ${oa.MisibeItemSearchVO.ItemQuantity} ) which has fireaction. But when i am clicking the addto cart link I am not getting the current value entered by the user.
    Can any body guide me how to get that related value for which the add to cart link got clicked.
    for this when i am doing pageContext.getParameter("item_quantity"));
    I am not getting the value entered by user.
    please suggest me
    Thanks!
    Smarajeet

    The below is my Vo query for item quanity i am using a dummy query "(select null from dual) as ITEM_QUANTITY"
    in the below query and item type is number. and this is a messageTextINput in OA page and is maped to ItemQuantity vo attribute.
    SELECT idsi.section_item_id
    ,idsi.inventory_item_id
    ,(select concatenated_segments from mtl_system_items_kfv mstk
    where mstk.inventory_item_id = idsi.inventory_item_id
    and mstk.organization_id =idsi.organization_id) ITEM_NAME
    ,(select description from mtl_system_items_tl mtll
    where mtll.inventory_item_id = idsi.inventory_item_id
    and mtll.organization_id =idsi.organization_id
    and language = USERENV('LANG') ) ITEM_Description
    ,(SELECT CASE
    WHEN instr(msib.segment6,'NAMED USER') > 0 THEN 'NAMED_USER'
    WHEN instr(msib.segment6,'PROCESSOR')>0 THEN 'PROCESSOR'
    ELSE msib.segment6
    END
    FROM MTL_SYSTEM_ITEMS_B msib
    WHERE msib.INVENTORY_ITEM_ID = idsi.inventory_item_id
    AND msib.ORGANIZATION_ID = idsi.organization_id) LICENSE_TYPE
    ,(SELECT CASE
    WHEN instr(msib.segment6,'1 YR') > 0 THEN '1YR'
    WHEN instr(msib.segment6,'2 YR') > 0 THEN '2YR'
    WHEN instr(msib.segment6,'3 YR') > 0 THEN '3YR'
    WHEN instr(msib.segment6,'4 YR') > 0 THEN '4YR'
    WHEN instr(msib.segment6,'5 YR') > 0 THEN '5YR'
    WHEN instr(msib.DESCRIPTION,'Perpetual') > 0 THEN 'PERPETUAL'
    END TERM FROM MTL_SYSTEM_ITEMS_B msib
    WHERE msib.INVENTORY_ITEM_ID = idsi.inventory_item_id
    AND msib.ORGANIZATION_ID = idsi.organization_id) TERM
    ,(select qll.operand
    FROM qp_list_lines qll
    ,qp_pricing_attributes qpa
    WHERE qll.list_line_id = qpa.list_line_id
    AND qpa.product_attr_value = to_char(idsi.inventory_item_id)
    AND qll.list_header_id = 439381
    AND sysdate between NVL(qll.start_date_active, sysdate) and NVL(qll.end_date_active, sysdate+1)
    AND qpa.list_header_id = qll.list_header_id
    AND qpa.product_attribute = 'PRICING_ATTRIBUTE1'
    AND qpa.product_attribute_context = 'ITEM'
    AND NVL(qpa.pricing_attribute_context,'MIXED') = 'MIXED') ITEM_PRICE
    ,(select null from dual) as ITEM_QUANTITY
    ,(select currency_code from qp_list_headers_b where list_header_id =439381) currency_code
    ,(select segment1 from mtl_system_items_b msib
    where msib.inventory_item_id = idsi.inventory_item_id
    and msib.organization_id =idsi.organization_id) PART_NUMBER
    FROM ibe_dsp_section_items idsi
    ,ibe_dsp_msite_sct_items idmsi
    ,( select distinct child_section_id
    from IBE_DSP_MSITE_SCT_SECTS b
    connect by PRIOR child_section_id = parent_section_id
    start with parent_section_id =:1
    and mini_site_id =1
    UNION
    select distinct child_section_id
    from IBE_DSP_MSITE_SCT_SECTS b
    where child_section_id =:1
    and mini_site_id =1
    ) csi
    WHERE idsi.organization_id = 101
    AND idmsi.section_item_id = idsi.section_item_id
    AND idsi.section_id = csi.child_section_id
    AND idmsi.mini_site_id = 14409

  • Disabling one input field if i enter text in second inputfield

    Hi,
    I am new to WebDynpro. My problem is very simple. I have two input fields. When i enter text in one input field i want the second input field to be disabled & Vice versa. The idea is that i want to give the user the option to enter in only 1 input field of his choice. The second input field should automatically get disabled. He can choose any input field of his choice. The second one should get disabled.
    EG: Assume that there are two input fields "Item No" & "Material". The user wants do a search using any one of these parameters, but not both. So, when he chooses to do a search based on "Item No", the "Material" input field should be greyed out(disabled). And, vice versa. The user may decide to choose any one of these fields.
    Please advise.

    This is not possible because there is no "onFocus" event on the input field.
    But you could use two radio buttons R1, R2 to enable exactly one of the input fields F1, F2 at a time.
    In the view designer, set R1.keyToSelect = "1", R2.keyToSelect = "2".
    Bind R1.selectedKey and R2.selectedKey to a common context attribute A (type string).
    If (at runtime) A contains "1", radio button R1 is selected, if A contains "2", radio button R2 is selected.
    To enable input field F1 exactly if R1 is selected:
    Create a calculated boolean attribute E1 that returns the boolean value ("1".equals(A)), bind property F1.enabled to E1. Do the same for F2.
    Armin

  • Input Field in table - I need a OnClick Event

    Hello everybody,
    I have the following problem:
    I have created a table in my view which is filled at runtime. The table has 3 different rows and every row has TableSingleMarkableCells, these cells further have a input field as their celleditor.
    I now want to know which cell the user is editing. I have a AttributePointer through which I know that at the time the user presses the enter key. But I need to know whether the focus has changed. Because there is the possibility that the user switches between the differnt cells with the arrow key or the tab key. But the AttributePointer only gives me the first selected cell.
    Have anybody a suggestion to solve this problem -  it seemed to be something like definingb a OnClick event for a input field (additionaly to the default OnEnter event...)
    Best regards,
    Sebastian

    Hi,
    You can find out at which row the editing goes, by using
    onLeadSelect action of TableUIElement.
    in onLeadSelect action you can find row number using this statement
    int rownumber= wdContext.node<TableNode>().getLeadSelection();
    Regards
    LakshmiNarayana

  • How to enable/disable the input fields based on the data entered/user action in the web dynpro abap?

    How to enable/disable the input fields based on the data entered in the web dynpro application abap?  If the user enters data in one input field then only the next input field should be enabled else it should be in disabled state. Please guide.

    Hi,
    Try this code.
    First create a attribute with the name readonly of type wdy_boolean and bind it read_only property of input field of which is you want to enable or disable.
    Next go to Init method.
    Set the readonly value as 'X'.
    DATA lo_el_context TYPE REF TO if_wd_context_element.
         DATA ls_context TYPE wd_this->element_context.
         DATA lv_visible TYPE wd_this->element_context-visible.
    *   get element via lead selection
         lo_el_context = wd_context->get_element( ).
    *   @TODO handle not set lead selection
         IF lo_el_context IS INITIAL.
         ENDIF.
    *   @TODO fill attribute
    *   lv_visible = 1.
    *   set single attribute
         lo_el_context->set_attribute(
           name =  `READONLY`
           value = 'X').
    After that Go to the Action  ENTER.
    First read the input field ( first input field, which is value entered field) , next give a condition
    if input value is not initial  then set the readonly value is '  '.
    DATA lo_nd_input TYPE REF TO if_wd_context_node.
         DATA lo_el_input TYPE REF TO if_wd_context_element.
         DATA ls_input TYPE wd_this->element_input.
         DATA lv_vbeln TYPE wd_this->element_input-vbeln.
    *   navigate from <CONTEXT> to <INPUT> via lead selection
         lo_nd_input = wd_context->get_child_node( name = wd_this->wdctx_input ).
    *   @TODO handle non existant child
    *   IF lo_nd_input IS INITIAL.
    *   ENDIF.
    *   get element via lead selection
         lo_el_input = lo_nd_input->get_element( ).
    *   @TODO handle not set lead selection
         IF lo_el_input IS INITIAL.
         ENDIF.
    *   get single attribute
         lo_el_input->get_attribute(
           EXPORTING
             name =  `VBELN`
           IMPORTING
             value = lv_vbeln ).
    if lv_vbeln IS not INITIAL.
        DATA lo_el_context TYPE REF TO if_wd_context_element.
        DATA ls_context TYPE wd_this->element_context.
        DATA lv_visible TYPE wd_this->element_context-visible.
    *  get element via lead selection
        lo_el_context = wd_context->get_element( ).
    *  @TODO handle not set lead selection
        IF lo_el_context IS INITIAL.
        ENDIF.
    *  @TODO fill attribute
    *  lv_visible = 1.
    *  set single attribute
        lo_el_context->set_attribute(
          name =  `READONLY`
          value = ' ' ).

  • Validation of values in an input field.

    Hello togther,
    I've created an input field with a value-selector, so that the user can choose a value from help-list. But he can also enter a value directly into the input field. Is there any "STANDRAD" method to check whtether the value which is in the input field is valid against the values from the value-selector?
    I've found a standard method to check whether  mandatory fields are field and the method works fine. Is there anything like this also for checking values against values from the selector?
    Thanks in advance.
    Greetings,
    Florian

    Hello Florian,
                           You can create an event CHECK_DATA  for OnEnter event of  you input field.
    Then go to the Action tab and select the action type as Validation-Independent .
    Hope this will work for the input field with OVS help .
    Regards
    Vivek

  • How to save changed data from a input field to the source structure

    Hi,
    I have a small problem with the onChange event with HTML input fields.
    When changing a value of a input field or by creating a new value for a field the OnChange event is called by moving away the mouse pointer....
    get_form_field( 'field_name' ).
    But is it possible to write back the new value in the source field ls_screenstructure_field1 without using the OnInputProcessing?
    I ask because my application´s structures have a lot of fields that should be filled and changed by input fields.
    It´s not comfortable to request every new value with .. = request->get_form_field(... .
    Thanks for helping.
    Cheers,
    André

    you wanted a onchange for a htmlb:inputfield which would also trigger server event. try the following code.
    <htmlb:inputField id            = "test"
                                alignment     = "LEFT"
                                size          = "6"
                                required      = "TRUE"
                                doValidate    = "TRUE"
                                type          = "INTEGER"
                                 />
    <bsp:htmlbEvent id="myid" onClick="myonclick" name="ValueChanged" />
      <script for="test" event=onchange type="text/javascript">
    alert(this.value);
    ValueChanged();
    </SCRIPT>
    if the value in the inputfield is changed it would trigger a alert at the client side and also trigger a server event. now you can caputre the value in oninputprocessing.
    Hope this helps.
    do let us know if you need help in how to capture this value in oninputprocessing.
    Regards
    Raja

  • How to make the input field of an uplaod button to readonly

    Hi all,
              I have to upload an excel file using upload button.But the problem here is i want the user to use only browse button to upload a file..but he should not enter mannulally in the input field.Is it possible to gray out the input filed but the browse button should be in active state.
    Regards
    Padma N

    Hi,
    I dont think you can make the readonly only for the inputfield which is part of the FileUpload UI.
    I guess your issue is related with user entering invalid urls and system hangs.
    Regards
    Ayyapparaj

  • Upper Lower Case for Input Fields of ALV

    Hi,
    i have an ALV has some input fields columns. All values of input fields are upper case after entering something into that input fields (etc. airline -> AIRLINE).
    how to add upper lower case control to ALV? (etc. airline -> airline, AIRLINE -> AIRLINE)
    Thanks.

    Dear Narullah,
    The elements of your table consists of data types you can maintain in the SE11.
    The data type are based on a domain which you can maintain in SE11 as well.
    Just go to SE11 and check the domain which is behind the table field. On the tab "Definition" of the domain just checkmark "Lower Case". Afterwards the system does not translate your input to upper case automatically.
    If you use a SAP domain, you need to copy it to customer namespace, set the lower case flag, create a new data type based on your own domain and use it in the structure of your internal table.
    Does this help?
    Regards,
    Hendrik

  • Restricting to enter value in the OVS field

    Hi gurus,
    I've a requirement where i need to restrict the user from entering some value in an input field which has an OVS and should only select the F4 help to that input field.
    The user should be left with the only option of selecting the value help but not entering  manually in the input field.
    Is this possible.
    Please help me in achieving this.
    Thanks in Advance
    Shravan

    Hi Shravan,
    Do like this..
    Insted of input field take text view or input with readonly.
    create another input field and bind with same attribute
    place after first one, or use matrix layout. ( adjust two fields like input with f4 ) and make it width to 1 pix.
    so you only visible F4 for that field.
    Now, first input wont allow to enter any value, from F4 user can select values.
    Hope you understood.. any issues revert back.
    Cheers,
    Kris.

  • Webdynpro Development: On change of input field Event

    hi,
    Is there any event in Web Dynpro(Java), that chaught the event of change in an input field? ie, if I change the value of a perticular field, it will caught that event and populate another field accordingly.
    Thanks,
    Angshuman

    HI
    Use OnEnter property of the Input Field. Write the Event name you wanted to occur.
    As the user will enter into the field & press enter, the particular field, you wish to, will be filled automatically.
    Regards
    Chander Kararia

  • Event for value change of an input field

    Hello,
    I'm a newbie in WD4A.
    I've got a input field. Is there a event that's fired, if the value of an input field is changed?
    Regards Christian

    No.  There is only an event when the user presses enter.  You can check the online help for all events of all UI elements.
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/d7/ef8841e3af1609e10000000a155106/frameset.htm
    In 7.02 there is an AJAX based change event on the inputField, but it is not available as a normal WD Event. It instead triggers the attached SearchHelp without the WD Phase Model.  This is the new SuggestValues feature in 7.02.

Maybe you are looking for