Application Development 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: 

Issue with 'Enter'

Former Member
0 Kudos
97

Hello Experts,

I am developing a dialogue program which have a table control in it. It have custom buttons like 'Create', 'Save', 'Delete'. When ever i press enter key after performing any of the three operations, the last operation is getting performed again ( last sy-ucomm action is performed).

How can we solve this?

Regards,

Viswanath A

3 REPLIES 3

GauthamV
Active Contributor
0 Kudos
67

You have to clear the sy-ucomm field.

Other alternative would be to handle enter command.When press Enter dont do anything.

nabheetscn
Active Contributor
0 Kudos
67

Declare a global variable of type SY-UCOMM normally it is called GV_OKCODE and after that assign sy-ucomm toGV_OKCODE.

Perform all the operation based on ok code and clear it after the operation.

Nabheet

Former Member
0 Kudos
67

Hi,

define the okcode in the element list of flow logic for the TYPE OF SCREEN.

define this in global

DATA : ok_code TYPE sy-ucomm,

okcode TYPE sy-ucomm.

define this in PAI user command

ok_code = okcode.

clear okcode

CASE ok_code.

WHEN 'CREAT'.

ENDCASE.

Regards,

Madhukar Shetty