Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Validation for ENTER

Former Member
0 Likes
1,257

Hi Guru,

I am displaying one ALV using class.

I have one INSERT button if user clicks on that it will insert one row.

But when the user press ENTER thro keyboard it sud do some validation.

I tried as sy-ucomm as ENTE, '/00' but its not working.

Cud u pls suggest.

Answer will be highly apperciated.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
978

Hi Sandeep,

'ENTE' is a bc_okcode.

Sy_ucomm's Value for enter is SPACE.

Try using this.It ll work.

Hope it helps!

Much Regards,

Amuktha.

8 REPLIES 8
Read only

Former Member
0 Likes
978

Hi,

Some time the enter sy-ucomm value is different...try out with debugging..

try out this value 'AB' or 'AF' instead of /00

Regards

Kiran

Edited by: Kiran Saka on Feb 10, 2009 2:11 PM

Read only

Former Member
0 Likes
978

Hi,

try with

if sy-ucomm eq ' '.

message...

endif.

OR

Try with sscrfields structure sy-ucomm.

Read only

0 Likes
978

See what is the problem that when I enter the values then I start debugging. Then I press ENTER.

But it is not going in debugging so I am not able to get the SY-UCOMM.

Is there any event or sth like that.

Read only

0 Likes
978

Hi,

Try with 'ENTR'. This should work. If not put a break point (/H) before pressing enter and then check.

Hope ENTR would work.

Thanks,

Prashanth

Read only

0 Likes
978
Sandeep Wrote:
See what is the problem that when I enter the values then I start debugging. Then I press ENTER.

But it is not going in debugging so I am not able to get the SY-UCOMM.

Is there any event or sth like that.

If you put /h in the command line and hit enter, still not go'g.

then define the GUI Status for that sceen and give one one item in the Application Toolbar and for that item write the code for disabling so that it will not show in the output.

with the GUI status the status will be set and it will go to Debugging when you hit the enter for the /h

disabling the PF status code

set pf-status 'STATUS_400' excluding z_dummy_toolbar.

its solves your problem

Regards!

Edited by: Prasanth M on Feb 10, 2009 6:59 PM

Edited by: Prasanth M on Feb 10, 2009 7:07 PM

Read only

Former Member
0 Likes
978

Hello Sandeep,

Same [Question |; was asked in the morning.

i am not understanding why ?

Regards!

Read only

Former Member
0 Likes
979

Hi Sandeep,

'ENTE' is a bc_okcode.

Sy_ucomm's Value for enter is SPACE.

Try using this.It ll work.

Hope it helps!

Much Regards,

Amuktha.

Read only

Former Member
0 Likes
978
DATA:
  text(22) TYPE c.

START-OF-SELECTION.
  CALL SCREEN 100.
*&---------------------------------------------------------------------*
*&      Module  STATUS_0100  OUTPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE status_0100 OUTPUT.
  SET PF-STATUS 'TEST'.
*  SET TITLEBAR 'xxx'.

ENDMODULE.                 " STATUS_0100  OUTPUT
*&---------------------------------------------------------------------*
*&      Module  USER_COMMAND_0100  INPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE user_command_0100 INPUT.
  CASE sy-ucomm.
    WHEN ' '.
      IF text IS INITIAL.
        MESSAGE 'Enter a value in field' TYPE 'S'.
      ENDIF.
      CALL SCREEN 100.
    WHEN 'ENT'.
      WRITE:/ text.
      LEAVE TO LIST-PROCESSING.
    WHEN 'BACK'.
      LEAVE TO SCREEN 0.
  ENDCASE.
ENDMODULE.                 " USER_COMMAND_0100  INPUT

This will definetly work.

thanks

sarves