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

Screen Displaying problem

Former Member
0 Likes
598

Hi experts,

I am creating screen with two push buttons through se38(abap code editor) there i write the code like this

REPORT ZMMINTERACTIVE.

call screen 100.

DATA : OKCODE LIKE SY-UCOMM.

data : a type i value 2,

b type i value 5,

c type i.

MODULE USER_COMMAND_0100 INPUT.

case OKCODE.

when 'ENTER'.

c = a + b.

write c.

when 'EXIT'.

LEAVE SCREEN.

endcase.

ENDMODULE.

Program is running without errors but while clicking enter or exit button nothing is happen . is push button is correct option for this code or in push button what

are the necessary settings i want to make ? Kindly give me the solution

reg

R.vijai

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
575

Hi,

Try this..Check the changes marked in bold..

case OKCODE.

when 'ENTER'.

c = a + b.

<b>LEAVE TO LIST-PROCESSING.</b>

write c.

when 'EXIT'.

<b>LEAVE PROGRAM.</b>

endcase.

ENDMODULE.

Also make sure you give the function code for the push buttons in the attributes of the button..

Thanks,

Naren

5 REPLIES 5
Read only

Former Member
0 Likes
576

Hi,

Try this..Check the changes marked in bold..

case OKCODE.

when 'ENTER'.

c = a + b.

<b>LEAVE TO LIST-PROCESSING.</b>

write c.

when 'EXIT'.

<b>LEAVE PROGRAM.</b>

endcase.

ENDMODULE.

Also make sure you give the function code for the push buttons in the attributes of the button..

Thanks,

Naren

Read only

0 Likes
575

Hi,

Still prg is not running after putting your commands. In layout editor in function code ,text ,name,fcttype as E i entered for enter and exit buttons. i choose the push buttons from Edit---->Create element is it right?

Reg

R.Vijai

Read only

0 Likes
575

no need to define fntype E for enter and for exit also it is not mandatory.

after creating your pushbutton in layout go to attribute window. there you can find the fncode and fntype.

just assign that there.

it will work.

regards

shiba dutta

Read only

Former Member
0 Likes
575

Hi,

okcode = ok_code.

CLEAR ok_code.

CASE okcode.

when 'EXIT'.

LEAVE TO TRANSACTION space.

endcase.

Hope this helps.

Reward if helpful.

Regards,

Sipra

Read only

Former Member
0 Likes
575

Hi vijaya,

go with case sy-ucomm.

when ' '..

............

when ' '.

............

but see that the fct code in the properties of the buttons is same as that u specified here at when '........'.