hi all
i am a new bee in abap/4 ..i am facing some problem ..can anyone tell how to make calculator in screen painter and menu painter with coding..i am confused how to start coding..do help me please.
Updated May 18, 2018
hi all
i am a new bee in abap/4 ..i am facing some problem ..can anyone tell how to make calculator in screen painter and menu painter with coding..i am confused how to start coding..do help me please.
Comments
Goto T.code SE38 and create zpgm name and press create, save it and activate the screen and come back.
then Goto T.code SE51 and create pgm name with screen no.
In layout take 3 input fields and 3 text fields for it as mentioned below.
Add four push buttons for addition,substraction,multiplication and divison.
Write following code in PAI.
Module user_command_1000_input
case sy-ucomm.
when 'add'.
field3 = field1+field2.
when 'sub'.
field3 = field1-field2.
when 'mul'.
field3 = field1*field2.
when 'div'.
field3 = field1/field2.
endcase.
endmodule.
Then finaly execute you can see a simple calculator.