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

MODULE POOL

Former Member
0 Likes
797

&----


*& Module USER_COMMAND_9000 INPUT

&----


  • text

----


MODULE USER_COMMAND_9000 INPUT.

data ok_code type sy-ucomm.

if ok_code = 'ENTER'.

message ' Ok code' type 'I'.

elseif ok_code = 'ABBR'.

message 'Cancel' type 'I'.

endif.

ENDMODULE. " USER_COMMAND_9000 INPUT

I WRITTEN THIS CODE BUT THE ENTER PUSH BUTTON IS NOT TRIGGERING

8 REPLIES 8
Read only

Former Member
0 Likes
769

Did you define the function code for the button you defined, in se51?

Read only

Former Member
0 Likes
769

Suresh,

check Function code is same or not...

debut and c module is triggering or not..

-Anu.

Read only

Former Member
0 Likes
769

Hi Suresh,

You have to use like this : MESSAGE ID 'SU' TYPE 'E' NUMBER '004' WITH 'Hugo'.

Regards,

Raghav

Read only

gopi_narendra
Active Contributor
0 Likes
769

Check either of the solutions givne below

&----


*& Module USER_COMMAND_9000 INPUT

&----


  • text

----


MODULE USER_COMMAND_9000 INPUT.

data ok_code type sy-ucomm.

<b>ok_code = sy-ucomm.

clear : sy-ucomm.</b>

if ok_code = 'ENTER'.

message ' Ok code' type 'I'.

elseif ok_code = 'ABBR'.

message 'Cancel' type 'I'.

endif.

ENDMODULE. " USER_COMMAND_9000 INPUT

<b>OR</b>

&----


*& Module USER_COMMAND_9000 INPUT

&----


  • text

----


MODULE USER_COMMAND_9000 INPUT.

case sy-ucomm

when 'ENTER'

message ' Ok code' type 'I'.

when 'ABBR'.

message 'Cancel' type 'I'.

endcase.

clear sy-ucomm.

ENDMODULE. " USER_COMMAND_9000 INPUT

Regards

- Gopi

Message was edited by:

Gopi Narendra

Read only

0 Likes
769

THANKS

AND IF I PRESS THE CANCEL BUTTON.

IT SHOULD LEAVE THE SCREEN AND COME TO THE ORIGINAL SCREEN.

Read only

0 Likes
769

MODULE USER_COMMAND_0100 INPUT.

CASE SY-UCOMM.

WHEN C_BACK OR C_CANCEL.

LEAVE TO SCREEN 0.

WHEN C_EXIT.

LEAVE PROGRAM.

ENDCASE.

ENDMODULE.

Read only

0 Likes
769

when 'CANCEL'.

leave program.

Regards

- Gopi

Read only

Former Member
0 Likes
769

Hi,

In se51 program go to <b>element list</b> and check whether name given to Type of screen element <b>(OK)</b> is given by you as ' <b>ok_code</b> '.

Madhavi.