Editable ALV - handling Enter key  when pressing enter on keyboard

Hi folks.
Now I have searched - and found a lot of threads - in this forum about my little problem.
I'm using the <b>Function Module: REUSE_ALV_GRID_DISPLAY - NOT THE OO-version</b>!!!!!
I have a editable list as result of finding some data. My problem is.
When I change the value in one of the cells, and press the Enter key (not a click with the mouse on the Green button with the checkmark!) nothing happens!
I have
    i_callback_pf_status_set  = 'SET_PF_STATUS'
    i_callback_user_command   = 'USER_COMMAND'
And when I put a breakpoint in the USER_COMMAND form nothing happens - <b>ONLY IF I CLIKS WITH MY MOUSE ON THE Green button with the checkmark</b>!!
Hope U have some idea!
Best regards
Carsten :o)

Hi,
Following the sample program for EDITABLE BLOCK ALV report.
REPORT  YMS_EDITBLOCKALV.
TABLES : rmmg1,MCHB, mkpf.
DATA: BEGIN OF t_mseg OCCURS 0,
        zeile LIKE mseg-zeile,
        menge LIKE mseg-menge,
        meins LIKE mseg-meins,
        matnr LIKE mseg-matnr,
        werks LIKE mseg-werks,
        charg LIKE mseg-charg,
        bwart LIKE mseg-bwart,
END OF t_mseg.
DATA:BEGIN OF t_mchb OCCURS 0.
INCLUDE STRUCTURE mchb.
data flag type c.
matnr LIKE mchb-matnr,
charg LIKE mchb-charg,
werks LIKE mchb-werks,
clabs LIKE mchb-clabs,
DATA END OF t_mchb.
TYPE-POOLS slis.
data: progname like sy-repid,
fieldcattab TYPE slis_t_fieldcat_alv WITH HEADER LINE.
data tabindex type i.
data wa_matnr LIKE mchb-matnr.
progname = sy-repid.
SELECTION-SCREEN BEGIN OF BLOCK b_b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS s_docno FOR mkpf-mblnr OBLIGATORY.
PARAMETERS p_docyr LIKE mkpf-mjahr OBLIGATORY.
SELECTION-SCREEN END OF BLOCK b_b1.
START-OF-SELECTION.
SELECT zeile
menge
meins
matnr
werks
charg
bwart
FROM mseg
INTO TABLE t_mseg
WHERE mblnr IN s_docno AND mjahr = p_docyr.
CLEAR fieldcattab.
fieldcattab-col_pos = 1.
fieldcattab-fieldname = 'ZEILE'.
fieldcattab-tabname = 'T_MSEG'.
fieldcattab-fix_column = 'X'.
fieldcattab-seltext_l = 'Item'.
APPEND fieldcattab.
CLEAR fieldcattab.
fieldcattab-col_pos = 2.
fieldcattab-fieldname = 'MENGE'.
fieldcattab-tabname = 'T_MSEG'.
fieldcattab-seltext_l = 'Quantity'.
APPEND fieldcattab.
CLEAR fieldcattab.
fieldcattab-col_pos = 3.
fieldcattab-fieldname = 'MEINS'.
fieldcattab-tabname = 'T_MSEG'.
fieldcattab-seltext_l = 'Unit'.
APPEND fieldcattab.
CLEAR fieldcattab.
fieldcattab-col_pos = 4.
fieldcattab-fieldname = 'MATNR'.
fieldcattab-tabname = 'T_MSEG'.
fieldcattab-seltext_l = 'Material'.
APPEND fieldcattab.
CLEAR fieldcattab.
fieldcattab-col_pos = 5.
fieldcattab-fieldname = 'WERKS'.
fieldcattab-tabname = 'T_MSEG'.
fieldcattab-seltext_l = 'Plant'.
APPEND fieldcattab.
CLEAR fieldcattab.
fieldcattab-col_pos = 6.
fieldcattab-fieldname = 'CHARG'.
fieldcattab-tabname = 'T_MSEG'.
fieldcattab-seltext_l = 'Batch No'.
APPEND fieldcattab.
CLEAR fieldcattab.
fieldcattab-col_pos = 7.
fieldcattab-fieldname = 'BWART'.
fieldcattab-tabname = 'T_MSEG'.
fieldcattab-seltext_l = 'Inventory'.
fieldcattab-hotspot = 'X'.
APPEND fieldcattab.
end-of-selection.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = PROGNAME
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = 'USERCOMMAND1'
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT =
IT_FIELDCAT = fieldcattab[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IT_ALV_GRAPHICS =
IT_ADD_FIELDCAT = fieldcattab
IT_HYPERLINK =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = t_mseg
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
FORM usercommand1 USING r_ucomm LIKE sy-ucomm rs_selfield TYPE
slis_selfield.
CASE r_ucomm.
WHEN '&IC1'.
tabindex = rs_selfield-tabindex.
read table t_mseg INDEX tabindex.
select * from mchb into table t_mchb where matnr = t_mseg-matnr.
clear fieldcattab.
CLEAR fieldcattab[].
fieldcattab-col_pos = 1.
fieldcattab-fieldname = 'FLAG'.
fieldcattab-tabname = 'T_MCHB'.
fieldcattab-fix_column = 'X'.
fieldcattab-seltext_l = 'Check Box'.
fieldcattab-input = 'X'.
fieldcattab-edit = 'X'.
fieldcattab-checkbox = 'X'.
APPEND fieldcattab.
clear fieldcattab.
fieldcattab-col_pos = 2.
fieldcattab-fieldname = 'MATNR'.
fieldcattab-tabname = 'T_MCHB'.
fieldcattab-fix_column = 'X'.
fieldcattab-seltext_l = 'Material'.
fieldcattab-emphasize = 'C1'.
fieldcattab-input = 'X'.
fieldcattab-edit = 'X'.
fieldcattab-checkbox = 'X'.
APPEND fieldcattab.
clear fieldcattab.
fieldcattab-col_pos = 3.
fieldcattab-fieldname = 'CHARG'.
fieldcattab-tabname = 'T_MCHB'.
fieldcattab-seltext_l = 'Batch No'.
fieldcattab-emphasize = 'C2'.
fieldcattab-input = 'X'.
fieldcattab-edit = 'X'.
APPEND fieldcattab.
clear fieldcattab.
fieldcattab-col_pos = 4.
fieldcattab-fieldname = 'WERKS'.
fieldcattab-tabname = 'T_MCHB'.
fieldcattab-seltext_l = 'Plant'.
fieldcattab-emphasize = 'C30'.
fieldcattab-input = 'X'.
fieldcattab-edit = 'X'.
APPEND fieldcattab.
clear fieldcattab.
fieldcattab-col_pos = 5.
fieldcattab-fieldname = 'CLABS'.
fieldcattab-tabname = 'T_MCHB'.
fieldcattab-seltext_l = 'Stock'.
fieldcattab-emphasize = 'C601'.
fieldcattab-input = 'X'.
fieldcattab-edit = 'X'.
APPEND fieldcattab.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = PROGNAME
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = 'USERCOMMAND2'
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT =
IT_FIELDCAT = FIELDCATTAB[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IT_ALV_GRAPHICS =
IT_ADD_FIELDCAT =
IT_HYPERLINK =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = t_mchb
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endcase.
endform.
FORM usercommand2 USING r_ucomm LIKE sy-ucomm rs_selfield TYPE
slis_selfield.
CASE r_ucomm.
WHEN '&IC1'.
IF rs_selfield-sel_tab_field = 'T_MCHB-MATNR'.
CALL FUNCTION 'ZALV2'
EXPORTING
CTU = 'X'
MODE = 'E'
UPDATE = 'A'
GROUP =
USER =
KEEP =
HOLDDATE =
NODATA = '/'
MATNR_001 = '200-200'
KZSEL_01_002 = 'X'
IMPORTING
SUBRC =
TABLES
MESSTAB =
SET PARAMETER ID 'RID' FIELD RMMG1-MATNR.
CALL TRANSACTION 'MM03' and skip first screen.
ENDIF.
ENDCASE.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = progname
i_callback_user_command = 'USERCOMMAND3'
it_fieldcat = fieldcattab[]
TABLES
t_outtab = t_mchb
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
endcase.
ENDFORM.
Thanks,
Sankar M

Similar Messages

  • Both my iPad and iPhone have ios8 On either device in Calendars edit shared with add person when I enter an email address and press add nothing happens - just goes back to edit screen and what I have entered has gone. No error message or any clue

    Both my iPad and iPhone have ios8
    On either device in Calendars> edit >shared with> add person when I enter an email address and press add nothing happens - just goes back to edit screen and what I have entered has gone. No error message or any clue about why I cant share my calendar. Please help.

    UDPATE:
    Spoke with Express lane, and issue was escalated.  Kudos to the support guys that handled this one (Brian and Yi).  Went through everything in detail and took all the crash dumps off the iphones and ipads to send to engineering.
    After backing up the contacts, the recommendation was to delete all contacts in  iCloud.  Doing that caused my iCloud to crash (in the browser), so more crash dumps were sent to apple.
    Eventually got all contacts deleted, then did a resync.  Looks like IOS devices are coming back to life and syncing again.
    Also, Outlook iCloud connector has just been updated to ver 1.0.1 so i installed that on their recommendation.
    BOTTOM LINE workaround:
    1. Backup contacts
    2. Delete contacts in iCloud
    3. Delete accounts on IOS devices
    4. Recreate accounts on IOS devices.
    Hoping a real root cause can be found and real fix implemented.  This has caused me to doubt the stability of iCloud, so i will procees with caution.

  • Default button being clicked multiple times when enter key is pressed

    Hello,
    There seems to be a strange difference in how the default button behaves in JRE 1.4.X versus 1.3.X.
    In 1.3.X, when the enter key was pressed, the default button would be "pressed down" when the key was pressed, but wouldn't be fully clicked until the enter key was released. This means that only one event would be fired, even if the enter key was held down for a long time.
    In 1.4.X however, if the enter key is pressed and held for more than a second, then the default button is clicked multiple times until the enter key is released.
    Consider the following code (which is just a dialog with a button on it):
    public class SimpleDialog extends JDialog implements java.awt.event.ActionListener
    private JButton jButton1 = new JButton("button");
    public SimpleDialog()
    this.getContentPane().add(jButton1);
    this.getRootPane().setDefaultButton(jButton1);
    jButton1.addActionListener(this);
    this.pack();
    public void actionPerformed(ActionEvent e)
    if (e.getSource() == jButton1)
    System.out.println("button pressed");
    public static void main(String[] args)
    new SimpleDialog().show();
    When you compile and run this code under 1.3.1, and hold the enter key down for 10 seconds, you will only see one print line statement.
    However, if you compile and run this code under 1.4.1, and then hold the enter key down for 10 seconds, you will see about 100 print line statements.
    Is this a bug in 1.4.X or was this desired functionality (e.g. was it fixing some other bug)?
    Does anyone know how I can make it behave the "old way" (when the default button was only clicked once)?
    Thanks in advance if you have any advice.
    Dave

    Hello all,
    I think I have found a solution. The behaviour of the how the default button is triggered is contained withing the RootPaneUI. So, if I override the default RootPaneUI used by the UIDefaults with my own RootPaneUI, I can define that behaviour for myself.
    Here is my simple dialog with a button and a textfield (when the focus is NOT on the button, and the enter key is pressed, I don't want the actionPerformed method to be called until the enter key is released):
    package focustests;
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.util.*;
    public class SimpleDialog extends JDialog implements java.awt.event.ActionListener
    private JButton jButton1 = new JButton("button");
    public SimpleDialog()
    this.getContentPane().add(new JTextField("a text field"), BorderLayout.NORTH);
    this.getContentPane().add(jButton1, BorderLayout.SOUTH);
    this.getRootPane().setDefaultButton(jButton1);
    jButton1.addActionListener(this);
    this.pack();
    public void actionPerformed(ActionEvent e)
    if (e.getSource() == jButton1)
    System.out.println("button pressed");
    public static void main(String[] args)
    javax.swing.UIManager.getDefaults().put("RootPaneUI", "focustests.MyRootPaneUI");
    new SimpleDialog().show();
    and the MyRootPaneUI class controls the behaviour for how the default button is handled:
    package focustests;
    import javax.swing.*;
    * Since we are using the Windows look and feel in our product, we should extend from the
    * Windows laf RootPaneUI
    public class MyRootPaneUI extends com.sun.java.swing.plaf.windows.WindowsRootPaneUI
    private final static MyRootPaneUI myRootPaneUI = new MyRootPaneUI();
    public static javax.swing.plaf.ComponentUI createUI(JComponent c) {
    return myRootPaneUI;
    protected void installKeyboardActions(JRootPane root) {
    super.installKeyboardActions(root);
    InputMap km = SwingUtilities.getUIInputMap(root,
    JComponent.WHEN_IN_FOCUSED_WINDOW);
    if (km == null) {
    km = new javax.swing.plaf.InputMapUIResource();
    SwingUtilities.replaceUIInputMap(root,
    JComponent.WHEN_IN_FOCUSED_WINDOW, km);
    //when the Enter key is pressed (with no modifiers), trigger a "pressed" event
    km.put(KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_ENTER,
    0, false), "pressed");
    //when the Enter key is released (with no modifiers), trigger a "release" event
    km.put(KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_ENTER,
    0, true), "released");
    ActionMap am = SwingUtilities.getUIActionMap(root);
    if (am == null) {
    am = new javax.swing.plaf.ActionMapUIResource();
    SwingUtilities.replaceUIActionMap(root, am);
    am.put("press", new HoldDefaultButtonAction(root, true));
    am.put("release", new HoldDefaultButtonAction(root, false));
    * This is a copy of the static nested class DefaultAction which was
    * contained in the JRootPane class in Java 1.3.1. Since we are
    * using Java 1.4.1, and we don't like the way the new JRE handles
    * the default button, we will replace it with the old (1.3.1) way of
    * doing things.
    static class HoldDefaultButtonAction extends AbstractAction {
    JRootPane root;
    boolean press;
    HoldDefaultButtonAction(JRootPane root, boolean press) {
    this.root = root;
    this.press = press;
    public void actionPerformed(java.awt.event.ActionEvent e) {
    JButton owner = root.getDefaultButton();
    if (owner != null && SwingUtilities.getRootPane(owner) == root) {
    ButtonModel model = owner.getModel();
    if (press) {
    model.setArmed(true);
    model.setPressed(true);
    } else {
    model.setPressed(false);
    public boolean isEnabled() {
    JButton owner = root.getDefaultButton();
    return (owner != null && owner.getModel().isEnabled());
    This seems to work. Does anyone have any comments on this solution?
    Tjacobs, I still don't see how adding a key listeners or overriding the processKeyEvent method on my button would help. The button won't receive the key event unless the focus is on the button. There is no method "enableEvents(...)" in the AWTEventMulticaster. Perhaps you have some code examples? Thanks anyway for your help.
    Dave

  • OneNote 2013: Font changes when pressing Enter / Return key

    I have the same problem as this guy (who didn't get a relevant answer): http://social.technet.microsoft.com/Forums/office/en-US/233833f7-dde8-414d-bdca-604ed8d57667/onenote-2013-font-changes-when-pressing-enter-return-key?forum=officeitpro
    I set my default to Calibri 14, but every time I press enter (I make a lot of bullet lists) the font changes to Calibri 11. 

    Hi,
    Did you change the default font after you typed a few words in a note container?
    Setting the default font in Microsoft Office OneNote affects text that you type in new note containers only. It does not affect existing text or text that you add to existing note containers.
    If you want to change the font in an existing note container, you need to change it manually under
    Home tab > Basic Text.
    Thanks,
    Steve Fan
    TechNet Community Support

  • When pressing Enter/Return to commit  a marquee selection the Feather box turns white for input!?

    When pressing Enter/Return to commit a marquee selection the Feather box turns white for input (and I'm not trying to chage the feather values)!? 
    Pressing Enter/Return should commit the selection but it doesn't why? I have not changed any short-cut preferences in PS CS6.
    When I use the Marquee or Lasso tool and make a selection and I'm happy with the selection, I press the Enter (PC)/Return(Mac) and the the "marching ants" should disappear...
    this has always worked until today!?
    Now, when I press the Enter key, the Feather box (next to the Anti-alias) on the upper left corner goes from grey to white and wants me to change the value?

    I was not able to reproduce the behavior you mentioned, though I don't normally make a practice of using the Enter key for that function (I tend to double-click to close the selection).
    Nor could I reproduce the behavior by holding down a modifier key.
    Have you tried restarting Photoshop?
    Rebooting?
    Resetting Photoshop's preferences to defaults?
    -Noel

  • When pressing enter the values are converted to upper case in module pool

    hi
    tehre are three fields for maintanece in module pool
    wheni press enter the fields are converted to upper case i want to avoid this as i dont want to have the upper case
    i need to save in table as waht user has inputed not in upper case
    so i dont want the fields to be automatically converted to upper case whne pressing enter on screen
    regards
    Nishant

    hi Nishant ,
    <b>The solution to ur problem is breifly explained with a sample module pool program .</b>check it below :
    IN the TOP INCLUDE**********************
    DATA :
           wempid TYPE z7684dp-empid ,   " same name as in the screen declaration
           wname TYPE  z7684dp-name,
           wacc TYPE  z7684dp-account,
           wdesg TYPE  z7684dp-designation,
           ok_code TYPE sy-ucomm ,
           wa_z7684dp TYPE z7684dp,
           t_z7684dp TYPE STANDARD TABLE OF z7684dp,
    *****IN THE PAI OF THE SCREEN 100(for example)***********
    MODULE user_command_0100 INPUT.
      CASE ok_code .
        WHEN 'CRE' .                 " function code for the pushbotton to insert the values
    TRANSLATE wdesg TO LOWER CASE.
    TRANSLATE wempid TO LOWER CASE.
    TRANSLATE wname TO LOWER CASE.
    TRANSLATE wacc TO LOWER CASE.
          wa_z7684dp-empid = wempid .
          wa_z7684dp-name = wname .
          wa_z7684dp-account = wacc .
          wa_z7684dp-designation = wdesg .
          INSERT INTO z7684dp VALUES wa_z7684dp .
          IF sy-subrc EQ 0 .
            MESSAGE 'SUCCESSFUL INSERTION TO TABLE' TYPE 'I' .
          ELSE .
            MESSAGE 'UNSUCCESSFUL INSERTION TO TABLE' TYPE 'I' .
          ENDIF.
          CLEAR: wa_z7684dp , wempid , wname , wacc , wdesg.
    REVERT BACK WITH ANY FURTHUR QUERIES
    <b>DO REWARD WITRH POINTS IF USEFUL :)</b>

  • Problem when pressing ENTER for InputText object text

    Hi,
    I encountered a very strane anomly when pressing ENTER for
    InputText object text.
    1) I set the InputText object for having maxium 2 characters.
    2) I set the InputText object for getting only numbers using
    .restrict= "0-9";
    Now, say the InputText is now empty.
    1) Say I press the number "7" - the text line is now
    containing - "7".
    2) Now, I press ENTER - the "7" is cleared from the text
    line.
    Now, while the text box is clear, we think that we can insert
    2 numbers.. but not!
    3) I press a number, say "9" - the line contains "9"
    4) I try to insert another number... but I can't!!
    In order to be able to insert two numbers, I have to press
    twice the Backspace in order to clear the "9" , and another ghost
    note (the ENTER?).
    How can I solve this anomaly?
    Thanks
    Yossi

    Thank you very much! it works.
    (Those tiny anomalies are so annoying, that it is so great
    feeling to have them solved, thanks)

  • Thinkpad keyboard problem - some keys generate multiple keys when pressed

    thinkpad keyboard problem - some keys generate multiple keys when pressed
    For example, "t" generates "tr", "y" generates "yu", "backspace" generates "backspace" plus "IBM access connections", "m" generates "mn" and "n" generates "mn".  Not all keys are wrong. 
    For what it's worth, the odd behaviour started shortly after a trip to Miami in which I had a meeting at a cafe in which we were undercover but it was pouring cats and dogs - it was like having a meeting in a sauna - so I am wondering if the high humidity could have caused the behaviour.
    I tried replacing the keyboard but the new keyboard has the same problem.  
    The machine in question is a Thinkpad T23 running Windows XP Pro
    Any help would be appreciated as I am now in Los Angeles using a borrowed Mac! :-) 

    i have something along the lines of the same problem.
    http://bbs.archlinux.org/viewtopic.php?id=56777
    my conclusion is something in the last system update screwed it up.

  • How can i distingush Enter key from Numpad-Enter(Enter key on numpad)?

    How can i distingush Enter key from Numpad-Enter key(Enter key on numpad)?
    Enter KeyEvent information is identical with Numpad-Enter key(Enter key on numpad) KeyEvent.
    ( keyChar, keyCode, ..etc)
    But i must differentiate these two Enter keys.
    How can i make it?
    Thank you for your answer ahead.

    The keyCode for 1 in the numeric pad is 97 the other 1 is 49, the same with 2 98/50. The same with all other numeric keypad.
    Noah

  • Code to call a function when enter key is pressed

    hi all,
    In a table control program i need to call a function when i press enter key...
    but im not able to do that since the function is always called when i press a push button on the screen.... can any one help me in this.. please....

    Hi John,
          You are not getting any value in SY-UCOMM when you press "Enter",because the function code is not set for 'Enter" key in "Function Key" of the GUI-STATUS..
    First define some fucntion code say 'ENT' for the Enter button available in "Fucntion key" of the GUI status.Once you done and activate the program and test it.The function code which u defined will be coming to SY-UCOMM field when you press 'ENTER" button and you can handle the various fucntionality whichevcer you want on "ENTER" .
    Eg:
    case sy-ucomm.
    When 'ENT'.
    Endcase.
    Regards,
    Vigneswaran S

  • 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.

  • Process PBO and PAI when Enter key is pressed

    Hello everyone,
    I am making a program where there is a I/O Box component. When the user enters data in this field and hits the 'ENTER' key I want to process the PBO and the PAI of that screen.
    The problem is what should i assign in the ok_code for this?
    Please advise.
    Thanks in advance,
    Karan

    >
    Karan Kappal wrote:
    > Hello everyone,
    > I am making a program where there is a I/O Box component. When the user enters data in this field and hits the 'ENTER' key I want to process the PBO and the PAI of that screen.
    > The problem is what should i assign in the ok_code for this?
    >
    > Please advise.
    >
    > Thanks in advance,
    > Karan
    You want to Go when user Press enter.
    In PBO we will set the status,
    SET PF-STATUS 'STATUS'. " double click on it or Go to SE41
    here activate the Function code for the ENTER button.
    in the FUnction keys you can see in the Beginning First Function (Green Tick mark) Give the Function code say ENTER , and give all necessary details and Activate .
    Now Test your application.
    When your enter the data and press enter, First it Goes to PAI
    here you do what ever required based on the action code...
    in PAI
    case ok_code.
    when 'ENTER'.
    "your code here...
    endcase.
    and once it is done, Control backs to PBO ..

  • Address not completed when pressing enter key (address field)

    In older versions of TB you could type the beginning (two or thress chars) of an email address and then enter. TB would autocomplete this our with the help of your address book.
    Nowadays (31.4.0) there is no auto completion when you press enter. Instead you have to type some chars and wait till Thunderbird makes a suggestion and then you can press enter. That means an annoying delay.
    I would be glad if there would be a fix that enables the enter key again so that it forces an autocomplete action in the address bar.

    Hi,
    I am not sure what after submit processes you have for this page, but if the page was generated with the forms wizard you will have Process Row of <table> process conditional on a SAVE request and a unconditional branch to take you to the previous page.
    What is happening is that the page processing skips the Process Row because it is not a SAVE request and then branches to the previous page.
    I would try creating another after submit process creating a "auto row processing" data manipulation process to update the row conditional on Request=Expression 1 where expression1 is the name of your page item.
    If you do not want the page to branch to the previous page create another page branch to the current page before the unconditional branch using the same condition.

  • 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

  • Problem in custom jsp page when pressing enter button

    Hi to all,
    <pre>
    I am created a cutom jsp page. When i am clicking on a button it working fine, but if i am pressing
    Enter key it redirecting to home page and showing an exception in cosole.
    <b>Exception is </b>
    18:00:50,718 ERROR [WEBAPP] Class/Method: tcActionBase/execute encounter some problems: {1}
    java.lang.NullPointerException
    at com.thortech.xl.webclient.actions.tcLookupDispatchAction.execute(Unknown Source)
    at com.thortech.xl.webclient.actions.tcActionBase.execute(Unknown Source)
    at com.thortech.xl.webclient.actions.tcAction.execute(Unknown Source)
    at org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:110)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.thortech.xl.webclient.security.SecurityFilter.doFilter(Unknown Source)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
    at java.lang.Thread.run(Thread.java:619)
    18:00:50,718 ERROR [WEBAPP] Class/Method: tcAction/execute encounter some problems: {1}
    java.lang.NullPointerException
    at com.thortech.xl.webclient.actions.tcActionBase.execute(Unknown Source)
    at com.thortech.xl.webclient.actions.tcAction.execute(Unknown Source)
    at org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:110)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.thortech.xl.webclient.security.SecurityFilter.doFilter(Unknown Source)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
    at java.lang.Thread.run(Thread.java:619)
    18:00:50,718 WARN [RequestProcessor] Unhandled Exception thrown: class java.lang.NullPointerException
    18:00:50,718 ERROR [[action]] Servlet.service() for servlet action threw exception
    java.lang.NullPointerException
    at com.thortech.xl.webclient.actions.tcAction.execute(Unknown Source)
    at org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:110)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.thortech.xl.webclient.security.SecurityFilter.doFilter(Unknown Source)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
    at java.lang.Thread.run(Thread.java:619)
    </pre>
    Edited by: iceman513 on Aug 11, 2010 7:14 PM
    Edited by: iceman513 on Aug 24, 2010 10:32 AM
    Edited by: iceman513 on Aug 24, 2010 10:33 AM

    once you click a button, say, "Draw Rectangle", it should draw a rectangleYes, but you need to repaint() the component (in your case panel) to see the change.
    The error is: The method paintComponent(Grpahics) is undefined for the type ObjectThe compiler never lies. As far as your code goes, you have added a method paintComponent(...) to a class that implicitly extends Object. Perhaps you wanted to create an anonymous subclass of JPanel.JPanel panel = new JPanel() {
      public void paintComponent(Graphics g) {
        super.paintComponent(g);
        myPaint(g);
    };Note the changes in brace and semicolon placement.
    Also:
    1. You're setting a FlowLayout to a JPanel, which is anyhow the default layout manager. And when using a layout manager, setSize calls are redundant and effectively ignored.
    2. For a JFrame to be centered on the screen, setLocationRelativeTo(null) after setting the size, not before.
    3. To void visual artifacts, setVisible(true) after all other properties are set.
    It looks to me like you've been throwing together bits of code from here and there without adequate understanding. I recommend you go through the Swing tutorials linked from the topic listing page for this forum.
    db

Maybe you are looking for

  • Credit card from store to store?

    Hello, I was using the Croatian App store for over 5 years. Now i want to chande it to the German (To shop music, movies...). I changed the coutry and inserted the Master Card details but it wont accept it ? It says that this payment method is not ac

  • Error at runtime for adobe interactive form

    Hi i am gettign this error when testing the applciation having interactive form. what could be the reason. The following error text was processed in the system <SID>: WebDynpro Exception: The ADS call has failed. You can find information about the ca

  • Remove Video Controls and add Replay button on page

    Hello, I am trying to create a page in Adobe Edge that loads a video without any controls (play, slider bar, volume, full screen) and then displays a replay button after the video finishes which will start it from the beginning. Currently I am able t

  • Posts edited by host and removed

    Is there some reason my postings are being edited by host and removed from the discussions? Today I posted the following, and it was removed from the discussions. I have since added it back as it and all other posts I write are pertinent and directly

  • Glassfish appication server + application client onj ipad.

    Hello All! I'm not sure my topic is proper here. I have written an enterprise application on glassfish v2 application server with java application client. This application client is running on PCs with windows/linux OS. On server side I'm using EJBs.