‎2007 Feb 02 6:16 AM
Hi experts,
I am new to abap. i created a screen . In that i placed two push bottons.
i gave name as enter and exit for that two buttons. while clicking enter button two no to be added and result should be displayed and while clicking exit button it want to leave the screen.
For this in flow logic how to write the code. Kindly give me the code.
Thanks in advance
Reg
R.Vijai
‎2007 Feb 02 6:27 AM
hi,
in PAI
ok_code = sy-ucomm
case ok_code .
when 'ENTER'.
a = c + b.
when 'EXIT'.
LEAVE SCREEN.
and in PBO
transfer the field a to screen
display the result.
PLZ reward points
‎2007 Feb 02 6:21 AM
in pai module write ur code.
case sy-ucomm.
when 'ENTER'.
C = A + B.
//Assign c to the screen field to display it.
when 'EXIT'.
LEAVE SCREEN.
endcase.
‎2007 Feb 02 6:23 AM
HI,
For the buttons you need to give FCODE. Goto screen layout and double click on each button and give some FCODE for these two buttons.
Then in your flow logic create a module in INPUT section.
MODULE ok_code_screen INPUT.
Also add ok_code in the screen elements list.
Then in the module write.
case ok_code.
here write code for your FCODE's.
endcase.
Regards,
Sesh
‎2007 Feb 02 6:27 AM
hi,
in PAI
ok_code = sy-ucomm
case ok_code .
when 'ENTER'.
a = c + b.
when 'EXIT'.
LEAVE SCREEN.
and in PBO
transfer the field a to screen
display the result.
PLZ reward points
‎2007 Feb 02 9:32 AM
‎2007 Feb 02 9:39 AM
‎2007 Feb 02 10:22 AM
HI,
I am creating screen through se38 there i write a code
call screen 100.
below that i write
DATA ok_code like sy-ucomm. in flowlogic i write the code like this
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100.
case sy-ucomm.
when 'ENTER'.
C = A + B.
//Assign c to the screen field to display it.
when 'EXIT'.
LEAVE SCREEN.
endcase
now "case" is not defined ,check your spelling error is coming .kindly reply.
‎2007 Feb 02 9:38 AM
Hi,
You should assign function codes for you pushbuttons, and assign the ok code in the element list of your screen.
Regards,
Leo