‎2007 Feb 03 7:22 AM
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
‎2007 Feb 03 7:25 AM
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
‎2007 Feb 03 7:25 AM
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
‎2007 Feb 03 7:45 AM
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
‎2007 Feb 03 7:52 AM
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
‎2007 Feb 03 7:27 AM
Hi,
okcode = ok_code.
CLEAR ok_code.
CASE okcode.
when 'EXIT'.
LEAVE TO TRANSACTION space.
endcase.
Hope this helps.
Reward if helpful.
Regards,
Sipra
‎2007 Feb 03 7:27 AM
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 '........'.