‎2010 Sep 27 7:02 PM
hi all ,
i m new in SAP-ABAP world,can any one help me plz,
my question is, perofrm mathemetical operation on two nos, like add, subtract, etc.
what i have done is,
........................
i have created a screen name 500,
on layout, i have taken three i/o box name io1,io2 and io3
have takne 5 push botton name add, sub, mul, div and exit,
on PAI of screen 500 , i have doubl clicked
----
***INCLUDE MZOPONNUM_USER_COMMAND_0500I02 .
----
&----
*& Module USER_COMMAND_0500 INPUT
&----
text
----
MODULE USER_COMMAND_0500 INPUT.
data : IO1 TYPE I,
IO2 TYPE I,
IO3 TYPE I,
OK_CODE TYPE SY-UCOMM.
CALL SCREEN 500.
*clear OK_CODE.
ENDMODULE. " USER_COMMAND_0500 INPUT
&----
*& Module STATUS_0500 OUTPUT
&----
text
----
MODULE STATUS_0500 OUTPUT.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
*
CASE OK_CODE.
WHEN 'ADD'.
IO3 = IO1 + IO2.
WHEN 'SUB'.
IO3 = IO1 - IO2.
WHEN 'MUL'.
IO3 = IO1 + IO2.
WHEN 'DIV'.
IO3 = IO1 + IO2.
WHEN 'EXIT'.
EXIT.
ENDCASE.
ENDMODULE.
my tranjection name is- zgytest,
and when i m trying to execute it, it is giving message like- Transaction contains inconsistencies. Do you
want to execute it anyway?
IF I M EXECUTING IT, and debugging it,, in the io1 and io2 variable, i m getting value, but when cursor is coming to
check OK_CODE, its not checking and hence result is not getting printed in i03 box,
so can any one tell what is the solution for this plz,
‎2010 Sep 27 7:07 PM
Moderator message - Welcome to SCN Unfortunately, this forum is not a place to learn ABAP. I suggest that you get one of the good ABAP books that are out there and maybe join an internet forum that caters to beginners post locked Please read [Rules of Engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement], and [Asking Good Questions in the Forums to get Good Answers|/people/rob.burbank/blog/2010/05/12/asking-good-questions-in-the-forums-to-get-good-answers] before posting again. Rob