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

Issue with 'Enter'

Former Member
0 Likes
633

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
Read only

GauthamV
Active Contributor
0 Likes
603

You have to clear the sy-ucomm field.

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

Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
603

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

Read only

Former Member
0 Likes
603

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