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

regarding module pool

Former Member
0 Likes
703

hi experts,

i have developed a module program in which with the help of push button 'DISPLAY' im displaying the data i.e final output...what user wants if he press 'ENTER' button then this button will work same as 'DISPLAY' works ,,kindly let me know what fct code sud i write ..plz help me...

7 REPLIES 7
Read only

Former Member
0 Likes
659

Hi,

For enter also specify the ok code.

Based on ok code trigger the required functionality.

Reward if helpful,

Regards,

Umasankar.

Read only

former_member491305
Active Contributor
0 Likes
659

Hi,

You have to set the Fun.Code for Enter button in Function keys of GUI_status for that screen.And then just change the code as below.

Case ok_code.

When 'DISPLAY' or 'ENTER'.

<Logic for Displaing Values>

Endcase.

Read only

Former Member
0 Likes
659

Hi

Change the name of the button as ENTER instead of DISPLAY and use the same code

I hope for ENTER the Fun CODE is 'ENTE',whose BDC_Code is '/00'.

Reward points for useful Answers

Regards

Anji

Read only

Former Member
0 Likes
659

Hello,

Check the sy-ucomm in the debug mode.

ANd do the change like this.

<b>

IF SY-UCOMM = 'DISPLAY' or SY-UCOMM = 'ENTER'.

</b>

Vasanth

Read only

Former Member
0 Likes
659

Hi,

if yours is a screen write sy-ucomm = 'function code of display button' any one of the PAI module before checking the sy-ucomm.

TABLES:SSCRFIELDS.

SELECTION-SCREEN PUSHBUTTON /10(4) MYBUTTON USER-COMMAND ABCD.

INITIALIZATION.

MYBUTTON = 'BACK'.

AT SELECTION-SCREEN.

SSCRFIELDS-UCOMM = 'ABCD'.

IF SSCRFIELDS-UCOMM = 'ABCD'.

SET SCREEN 0.

ENDIF.

<b>reward if helpful.</b>

rgds,

bharat.

Read only

Former Member
0 Likes
659

This message was moderated.

Read only

Former Member
0 Likes
659

Hi Rajat,

Use ENTR as Function code.... it's the function code for pressing Enter...

Now whatever code you have written under DISPLAY Just copy it and paste it for ENTR Function code while

handling

CASE sy-ucomm.

WHEN 'ENTR'. " When user presses enter button in module pool program
* Your procesing ... Copy the code/perform etc which you used for DISPLAY

ENDCASE.

Hope it will solve your problem..

Thanks & Regards

ilesh 24x7

ilesh Nandaniya