Trigger PAI after pressing enter key

Hi all,
How to trigger the PAI event after pressing the enter key on the keyboard. i have a input field and a button on the screen. after entering the value into the field and pressing buttot will take to next screen. But if I press enter key the value is getting cleared. How to trigger the PAI event after pressing the enter key?
Thanks in advance,
Dev.

Hi,
The keyboard event 'Enter' does not have a default sy-ucomm or a Function code associated with it.
So, whenever you press Enter, it triggers the PAI (sy-ucomm would be blank) and somewhere in your code the value is being refreshed. You can debug thoroughly to find where the problem is.
You can assign a Function code for Enter. Go to the GUI Status of the Screen -> Function Keys -> You will find a icon Enter (the one with the tick mark in a green circular background) -> Assign Function code like 'ENTER'.
Now in your PAI, restrict your code saying
if sy-ucomm = 'ENTER'.
"Logic
endif.

Similar Messages

  • Screen dissappers after pressing Enter Key

    Hello all,
    I have an OO ALV Design. On the ALV toolbar I have a custom button on the ALV toolbar. when I click on that button I will get a pop screen.
    This pop up screen has got 2 buttons, one is Execute and the second one is Cancel. until the user clicks on any button the popup screen should be visible. but somehow if i press enter the screen is getting disappeared.
    Can any one help me.
    Regards
    Ravi

    Hi Friend,
    if u dont have anything in PAI how could you expect to get any other thing.....
    see do one thing in the pf-status of ur dialog box u have to declare a pf-status not for screen but for a dialog box.
    in that under the Reserved function key define a function code for cancel icon and save and activate the pf-status, u can create the buttons in dialog box in the screen painter but for a dialog box u have to at least define a pf-status with a cancel icon and its function code.
    for example if u enter function code CANCEL for the cancel ICON then capture the same in pai, alog with that u have also declared 2 buttons on the dialog box for eg. with name edit and send u can then create PAI as follows  -
    >>>
    data lv_ucomm type sy-ucomm.
           lv_ucomm = sy-ucomm.
      CASE lv_ucomm.
        WHEN CANCEL'.
         set screen '0'.
         leave screen.
        when 'EDIT'.
          "BREAK-POINT.
          PERFORM EMAIL.
          CALL METHOD OF APPITEM 'Display'.
          FREE: ATTACHS, APPITEM, NAMESPACE, APPOUTLOOK."free ole objects.
         PERFORM pres_del.
          set screen '0'.
          leave screen.
        WHEN 'SEND'.
          "BREAK-POINT.
          PERFORM EMAIL.
          CALL METHOD OF APPITEM 'Send'.
          FREE: ATTACHS, APPITEM, NAMESPACE, APPOUTLOOK."free ole objects.
         PERFORM pres_del.
          set screen '0'.
          leave screen.

  • Object disappears after pressing enter key

    I need to attach the transaction J1B3N to keep the connection objects.
    Perform the steps as the help of SAP:
    Object links to other SAP objects
    You can make an object link to SAP objects that are not shown in the possible entries list. To do this, proceed as follows:
    In the standard system, there are already two special screens for the module pools SAPLCV130 and SAPLCV140 for the linked SAP object.
    You must create two new screens with the same number for the module pools SAPLCV130 and SAPLCV140 .
    The processing logic must follow that of screen 1204 in program SAPLVC130.
    Create function module OBJECT_CHECK_XXXX (XXXX = object name)
    If the object can be classified, this function module already exists .
    Otherwise copy the function module for linking equipment DOCUMENT_CHECK_EQUI and change it as required for the new object.
    After performing these steps can see the screen with the number of document tab Link Object, but I am having the following problem: I inform the document number field and press Enter this number some of the screen.
    Already remade several times but can not find the point I'm failing.
    Thank you,

    Hi Michely,
    could you please check if the necessary object is correctly mainatined in structure MCDOKOB too. Here the following coding part could be useful to analyse why the value disappears after hitting enter:
    Main Program     SAPLCVOB
    Source code of   LCVOBU02
    FUNCTION         KEY_ZU_OBJEKT
    SELECT SINGLE * FROM TCLO
           WHERE OBTAB EQ OBJEKT.
    IF SY-SUBRC NE 0.
      RAISE NO_OBJEKT.
    ENDIF.
    NAME = 'MCDOKOB'.
    IF NAME CP '*# '. ENDIF.
    WRITE '-' TO NAME+SY-FDPOS.
    IF NAME CP '*# '. ENDIF.
    IF NOT TCLO-KEYF0 IS INITIAL.
      WRITE TCLO-KEYF0 TO NAME+SY-FDPOS.
      ASSIGN TABLE FIELD (NAME) TO <KEYF1>.
      DESCRIBE FIELD <KEYF1> LENGTH LEN1  IN CHARACTER MODE.
      KEY1 = NAME.
    ENDIF.
    IF TCLO-KEYF0 EQ SPACE.
      KEY1 = ' '.
      LEN1 = 0.
    ENDIF.
    Here the keyfield is read from table TCLO and then the length is read from structure MCDOKOB for example. So it is necessary that the same data is maintained in table TCLO and structure MCDOKOB to grant the correct working for new individual objects.
    Best regards,
    Christoph

  • How to prevent key sound after pressing Enter

    I don't want to hear "beep" sound after pressing enter in TextBox object.
    Is it possible to prevent this?
    Private Sub TextBox1_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
    If e.KeyChar = Convert.ToChar(13) Then
    MsgBox("You will hear "beep" after you press it")
    End If
    End Sub

    Hi,
     I am guessing this is a single line TextBox.  You can use the KeyDown event to detect the Enter key being pressed and Suppress the Key.  If you are using the Enter Key to do something when it is pressed in the TextBox then put it in here
    instead of the KeyPress event.
    Private Sub TextBox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
    If e.KeyCode = Keys.Enter Then
    e.SuppressKeyPress = True
    'Do something here if you need to when Enter is pressed
    End If
    End Sub
    If you say it can`t be done then i`ll try it

  • In the address bar where type the address of the web site at the top. after entering the address i press enter key from the keyboard but it does'nt work there . Means the page is not navigating towards the address. Kindly solve the problem

    In the address bar where type the address of the web site at the top. after entering the address i press enter key from the keyboard but it doesn't work there . Means the page is not navigating towards the address. Kindly solve the problem

    This issue can be caused by an extension that isn't working properly.
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    * Don't make any changes on the Safe mode start window.
    * https://support.mozilla.com/kb/Safe+Mode
    * [[Troubleshooting extensions and themes]]
    In Firefox 4 you can use one of these to start in <u>[[Safe mode]]</u>:
    * Help > Restart with Add-ons Disabled
    * Hold down the Shift key while double clicking the Firefox desktop shortcut (Windows)

  • Pressing ENTER key in clickToEdit af:table

    Hi,
    In our application, we have a click-to-edit table. We are experiencing the following problem.
    - Suppose one of the rows are selected, and focus is in an editable field.
    - Press the ENTER (or RETURN) key
    - The previously selected row is still selected (colored dark blue), but the fields of the row below are editable.
    This did not happen in 11.1.1.6 (after pressing enter, the same field of the second row was editable and focussed), but it does in 11.1.1.7
    Is this a known problem? Workaround??
    Screenshots:
    - before pressing enter: http://awesomescreenshot.com/0c416xvp94
    - after pressing enter :http://awesomescreenshot.com/0fa16xw841
    Table:
    <af:table value="#{bindings.DepartmentsView1.collectionModel}"
                            var="row"
                            rows="#{bindings.DepartmentsView1.rangeSize}"
                            emptyText="#{bindings.DepartmentsView1.viewable ? 'No data to display.' : 'Access Denied.'}"
                            fetchSize="#{bindings.DepartmentsView1.rangeSize}"
                            rowBandingInterval="0"
                            selectionListener="#{bindings.DepartmentsView1.collectionModel.makeCurrent}"
                            editingMode="clickToEdit"
                            id="tDep"
                            summary="Departments table"
                            rowSelection="single">Edited by: Fortega on 22-apr-2013 8:51

    Hi,
    I don't think this is intentional and thus should be filed as a bug. If you have a customer support contract or if you are from Oracle, please file a service request with support or file a bug directly. If none of the too applies, please send me a test case based on the HR schema in a ZIP file you rename to "unzip". My mail contact is in my OTN profile you find by clicking on my name next to this reply.
    Frank

  • The webpage does not load after pressing enter or CTRL+ENTER. My OS is Windows 7 Ultimate

    I have tried installing the older version Firefox 3.6. After entering the URL on address bar it does not load after pressing enter or CTRL+ENTER

    This issue can be caused by an extension (AVG Safe Search can cause this) that isn't working properly.
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    * Don't make any changes on the Safe mode start window.
    * https://support.mozilla.com/kb/Safe+Mode
    * [[Troubleshooting extensions and themes]]
    In Firefox 4 you can use one of these to start in <u>[[Safe mode]]</u>:
    * Help > Restart with Add-ons Disabled
    * Hold down the Shift key while double clicking the Firefox desktop shortcut (Windows)

  • Document addition on pressing Enter Key

    Dear all,
    I want to know whether it is possible to restrict document addition by pressing Enter Key at first time.
    What i want is if user press enter key for first time to add document the system should generate message as generated in Invoice  so that document is added after message.
    This is because many users are use to legacy system where they regularly press enter which creats error in new system.
    Is it possible ..??
    swap

    There is an add-on called B1UP.
    It has so many cool features.
    When you press enter it takes you to the line level and does not add the document.
    Thanks,
    Joel

  • Pressing Enter key twice should submit the form

    I am trying to enter the chinese characters in the text box, chinese chracters will become a whole word only when we press the Enter key. But after entering a chinese character , if I press the enter key then the form got submitted. Instead the form should get submitted only when we press Enter key for the second time.
    Is it possible with Javascript?

    karthi23 wrote:
    I am trying to enter the chinese characters in the text box ...Where? An Java application? Your browser?
    Is it possible with Javascript?This is a Java forum. JavaScript and Java are two completely different things. You better find a JavaScript forum to ask this question.

  • Can I execute a code on pressing Enter key?

    Hi
    I want to execute a piece of code on pressing Enter key, while in a datablock in Query mode
    I tried KEY-ENTER trigger but nothing happens.
    Is that possible?
    Am I asking a nonsense thing?
    Thanks in advance
    Oscar

    no meaning to press enter in query mode. u can use buttons for directly running some other codes instead
    Thanks & Best Regards
    HuaMin
    Please remember to always mark the reply if it's helpful or related to your issue!

  • Nokia 5610 new phone hang when press enter key; it...

    Anyone facing this problem? I just brought couple of days only, I found the phone hang when i switch ON it and press Enter key after the PIN code. It looks no response and keep displaying on that screen.
    Solved!
    Go to Solution.

    15-Sep-2008 09:25 AM
    merceleong wrote:
    I sent it to reinstalled the software and it looks ok now but, anyone know for new phone, how long the battery will last? My unit found only two days without playing music all the time.
    Just an advise
    On it's first time fully charge and discharge - vice versa for three times. After that don’t drain your battery every day to 10-20% of its charge. You can actually expect battery problems by draining the battery frequently.
    Roughly every 30 charges, deliberately discharge your battery to 10-15%, and fully charge to 100% afterwards.
    This will help maintain the accuracy of the “fuel gauge” on the device (your battery meter or scale). It has nothing to do with the battery memory but helps maintain the accuracy of the device’s percentage of battery charge left.
    Good luck

  • How to get input values till pressing enter key

    hi!!!
    i need to enter values thru keyboard using bufer reader etc etc
    but i need to stop entering when i press enter key
    how to do this??

    First off I would take a look at this link because it gives quite a few good examples if you've never used scanner.
    You can find all this on the link.-> http://java.sun.com/j2se/1.5.0/docs/api/java/util/Scanner.html
    in order to use scanner you have to import it.
    import java.util.Scanner;then inside your main method you need to create a scanner wrapped around the keyboard inputstream.
    Scanner userIn = new Scanner(System.in);take a look at the api to decide which method you want. For this I would suggest nextLine().
    also I would specify that you want the numbers separated by spaces or comma's or something so you can use the String.split(" "); method which returns an array of Strings;
    then traverse through the array of strings and convert them to ints
    http://www.rgagnon.com/javadetails/java-0004.html

  • How can i select the next column instead of next row when press enter key

    I need to know how can i select the next column instead of next row when i press the enter key.By default ,when i press enter key the next row is selected and the column remain unchanged but I wants opposite that is the row should remain unchanged but column index will changed.
    Thanks to all.

    Well, the right arrow key will already move you to the next column, so the easiest way to do this is to modify the InputMap to have the Enter key invoke the same Action as the right arrow key.
    You can search the forum for my "Table Actions" (without the space) example that will show you how to do this.

  • How to submit a form by pressing enter key

    Hi,
    I'm having a problem..............i have a form having text field and a button created using struts html tags..........when user enters the value and presses the button then the value is being taken...........
    but if the user enters the data and just presses enter key the form refreshaes but value is not submitted.............
    the button is created using <html:submit >tag.............can any one pls help me out with this???????????

    <script language="JavaScript">
    <!--
    var isNav, isIE
    if (parseInt(navigator.appVersion) >= 4) {
    if (navigator.appName == "Netscape")
    isNav = true
    else
    isIE = true
    function showKeyValue(evt) {
    var keyValue
    if (isNav)
    keyValue = evt.which
    else
    keyValue = window.event.keyCode
    /*status = keyValue*/
    if (keyValue == 13) {
    javascript:validateForm();
    return false
    </script>
    in the field call this method
    onKeyPress="showKeyValue(event)"

  • Upon Pressing Enter Key in an InputField

    Hi,
    I have an InputField where i have to enter AirlineId and followed by search button
    But my requirement here is <b>
    We have to press Enter key in INputField.Then all the AirLineIds which are there in the database has to be popuped and in that the one which selects has to be placed in the InputField</b>
    Regards
    Padma

    Hi Padma,
                      Create a onEnter event for the input field & inside that create a modal window. For that window u have to create a view also.
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/wd%20java/wd%20tutorials/dialog%20boxes%20in%20web%20dynpro%20applications.pdf">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/wd%20java/wd%20tutorials/dialog%20boxes%20in%20web%20dynpro%20applications.pdf</a>
    In this tutorial check the code for AddressBook(not for external window) .U can use this code
    IWDWindowInfo myWinInfo = wdComponentAPI.getComponentInfo().findInWindows("<window name>");
    myPopupWindow = wdComponentAPI.getWindowManager().createWindow(myWinInfo,true);
    myPopupWindow.setWindowPosition(300,150);
    myPopupWindow.open();
    regards
    Sumit

Maybe you are looking for

  • How to get count of last 30 days and total of count of rows in a single query

    Hi All, My requirement is to write a sql query with the following requirement I have a table TEST which has 6500 rows out of which the created date > 30 which means records from last 30 days are like 60.So if i write a query like this  Select Count(*

  • Calling Stored Procedure with table type as In parameter from Java

    Hi Everyone, Can anyone help me with the sample code to call a stored procedure having input parameter of Table type (consisting of multiple fields) from Java. This job is currently being done by a BPEL process. We want to implement the same using Ja

  • My 3D And Analysis menus have gone missing in my PS CS4 Extended

    Hopefully this is the correct place to post this. I have PS CS4 Extended version, and I had the 3D and Analysis menus like it's supposed to have, and now for some reason, they have gone missing, they are not there in my top menu items anymore, there

  • Opening a PDF file redemption code

    I have recently purchased Lion, and I have been sent a PDF file via email, which contains the redemption code to download the software through the App Store. However, I am unable to open the PDF file, even though I have a password to open the PDF (wh

  • OWB and OEM Version ERROR (Urgent)

    Hi All, I am using OracleWarehouse builder version 9.2.0.2.0.8 and OEM version 9.2.0.2.0.10 and i am getting error while creating cubes in OEM. Is it due to different versions of OWB and OEM. Please Let me know, if anyone knows about it. with regards