2008 Jun 06 7:10 AM
2008 Jun 06 7:12 AM
then you have to write a function module on your own
go to se37 and create a function module
check this link
http://www.saptechnical.com/Tutorials/ABAP/FunctionModule/page1.htm
I need a function module to divide two numbers.
2008 Jun 06 7:12 AM
then you have to write a function module on your own
go to se37 and create a function module
check this link
http://www.saptechnical.com/Tutorials/ABAP/FunctionModule/page1.htm
2008 Jun 06 7:13 AM
hi,
if the requirement is so simple y u want func mod.
u can do it with simple code.
2008 Jun 06 7:15 AM
Hi ,
You can create a z FM for the same IN SE37.
Go as follows:
import :
parameters A1,B1 , TYPE F , default <ur default valuse>
export
Parameter RES ,TYPE F
Source Code
function zmy_divide.
*"----
""Local interface:
" IMPORTING
" REFERENCE(A1) TYPE F DEFAULT 6
" REFERENCE(B1) TYPE F DEFAULT 4
" EXPORTING
" REFERENCE(RES) TYPE F
" EXCEPTIONS
" DIV_ZERO
*"----
if B1 eq 0.
raise div_zero.
else.
res = A1 / B1.
endif.
endfunction.
Reward if helpful
Manish
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |