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

unable to activate layout in module pool.

Former Member
0 Likes
1,241

PROGRAM SAPMZVALIDATION.

data: NUM1 type i,

NUM2 type i,

ANS type i,

OK_CODE type SY-UCOMM.

odule USER_COMMAND_0089 input.

CASE OK_CODE.

WHEN 'SUM'.

ANS = NUM1 + NUM2.

WHEN 'EXIT'.

LEAVE PROGRAM.

ENDCASE.

endmodule. " USER_COMMAND_0089 INPUT

i made this program but it is not working with layout. no push button is link with result.

how to do.

PROGRAM SAPMZVALIDATION.

data: NUM1 type i,

NUM2 type i,

ANS type i,

OK_CODE type SY-UCOMM.

odule USER_COMMAND_0089 input.

CASE OK_CODE.

WHEN 'SUM'.

ANS = NUM1 + NUM2.

WHEN 'EXIT'.

LEAVE PROGRAM.

ENDCASE.

endmodule. " USER_COMMAND_0089 INPUT

i made this program but it is not working with layout. no push button is link with result.

how to do.

9 REPLIES 9
Read only

Former Member
0 Likes
1,170

HI Ruchi,

i think you forgot to declare the ok_code in Screen Element List.Please check the element list of the screen.Give one Ok_Code to the push button in the screen field attributes.Activate entire program and run the program

Message Edited

Shibu

Read only

0 Likes
1,170

i have mentiond ok_code

Read only

Former Member
0 Likes
1,170

Hi

use this

PROGRAM SAPMZVALIDATION.

data: NUM1 type i,

NUM2 type i,

ANS type i,

OK_CODE type SY-UCOMM.

odule USER_COMMAND_0089 input.

CASE SY-UCOMM.

WHEN 'SUM'.

ANS = NUM1 + NUM2.

WHEN 'EXIT'.

LEAVE PROGRAM.

ENDCASE.

endmodule. " USER_COMMAND_0089 INPUT

Check that Fcode that is used is also there in ur menu...

Check that your menu is in active mode..

<REMOVED BY MODERATOR>

Gaurav J.

Edited by: Alvaro Tejada Galindo on Feb 4, 2008 6:07 PM

Read only

0 Likes
1,170

MName Type LinColDefVisHeiScrFormatInpOutOutpDicDictProperty list

NUM1 Text 4 4 4 4 1

NUM1 I/O 4 23 20 20 1 INT4

NUM2 Text 6 4 4 4 1

NUM2 I/O 6 23 20 20 1 INT4

ANS Text 8 3 3 3 1

ANS I/O 8 24 19 19 1 INT4

EXIT Push 10 8 4 4 1

SUM Push 10 20 3 3 1

OK_CODE OK 0 0 20 20 1 OK

this element list and this is activated

Read only

0 Likes
1,170

Hi Ruchi,

you are not getting the ok_code value of the button while debugging ?can you delete the button and redo the same.it is working for me .i copied your code and tested the same.

regards

shibu

Read only

Former Member
0 Likes
1,170

Try this

Assign SY-UCOMM to OK_CODE

OK_CODE = SY-UCOMM.

CASE OK_CODE.

WHEN 'SUM'.

ANS = NUM1 + NUM2.

WHEN 'EXIT'.

LEAVE PROGRAM.

ENDCASE.

Read only

bandal_amol
Explorer
0 Likes
1,170

please declare ok_code in element list.

Read only

Former Member
0 Likes
1,170

Check function code of button is same or not as specified in the program.

Read only

Former Member
0 Likes
1,170

Hi Ruchi,

Double click the button in the screen.

The SY-UCOMM / OK_CODE will contain the value specified in the FCODE field in properties.

I suppose you are validating with the name of the button.

Cheers