Hi Rajat,
sap help has given about enter as below
The ENTER key belongs to the icon in the standard toolbar, and is always active, even if no function is assigned to it in the GUI status, or there is no GUI status set at all. The PAI event is always triggered when the user chooses ENTER. The following function codes can be passed to SY-UCOMM or the OK_CODE field:
- Any entry in the command field when the user presses ENTER
- If there is no entry in the command field, any function code assigned to the ENTER key in the Menu Painter.
- If the command field does not contain an entry and no function code is assigned to the ENTER key in the Menu Painter, the function code is empty and therefore not passed to SY-UCOMM or the OK_CODE field.
So If user enter data in customer defined screen ,you can set the function code for ENTER key and query for SY_UCOMM.If it is standard screen Check for function code for ENTER key
Regards,
Sreenivas.