2007 Jul 10 7:20 AM
Hi,
when i a creating the function module
I am getting the following error. Statement "EX_RESULT=IM_NUM1+IM_NUM2" is not defined. Check your spelling
FUNCTION ZAC_CALCULATE.
*"----
""Local Interface:
*" IMPORTING
*" REFERENCE(IM_NUM1) TYPE I
*" REFERENCE(IM_NUM2) TYPE I
*" REFERENCE(IM_OPER) TYPE C
*" EXPORTING
*" REFERENCE(EX_RESULT) TYPE I
*"----
CASE IM_OPER.
WHEN '+'.
EX_RESULT=IM_NUM1+IM_NUM2.
WHEN '-'
EX_RESULT=IM_NUM1-IM_NUM2.
WHEN '*'
EX_RESULT=IM_NUM1*IM_NUM2.
ENDCASE.
ENDFUNCTION.
2007 Jul 10 7:35 AM
Hi,
Now i am getting this error.
when I am checking for syntax error iam getting this error. This is the program that is present in function group. when i tried to activate that also I got the error that Report/program statement is missing.
Program SAPLZAC_GRP 2
REPORT/PROGRAM statement missing, or program type is I (INCLUDE).
Hi rams,
Had You Active the Function Group?
Thanks.
2007 Jul 10 7:21 AM
Hi,
Give Spaces
EX_RESULT = IM_NUM1 + IM_NUM2.
Reward if useful!
2007 Jul 10 7:22 AM
2007 Jul 10 7:22 AM
Hi,
Give like this,
FUNCTION ZAC_CALCULATE.
*"----
""Local Interface:
*" IMPORTING
*" REFERENCE(IM_NUM1) TYPE I
*" REFERENCE(IM_NUM2) TYPE I
*" REFERENCE(IM_OPER) TYPE C
*" EXPORTING
*" REFERENCE(EX_RESULT) TYPE I
*"----
CASE IM_OPER.
WHEN '+'.
<b>EX_RESULT=IM_NUM1 + IM_NUM2.</b>
WHEN '-'
<b>EX_RESULT=IM_NUM1 - IM_NUM2.</b>
WHEN '*'
<b>EX_RESULT=IM_NUM1 * IM_NUM2.</b>
ENDCASE.
ENDFUNCTION.
Regards,
PAdmam.
2007 Jul 10 7:22 AM
2007 Jul 10 7:22 AM
2007 Jul 10 7:23 AM
Hi
Check the for the syntax errors
Like spaces on both side of the symbols = or - or *.
<b>Reward points for useful Answers</b>
Regards
Anji
2007 Jul 10 7:35 AM
Hi,
Now i am getting this error.
when I am checking for syntax error iam getting this error. This is the program that is present in function group. when i tried to activate that also I got the error that Report/program statement is missing.
Program SAPLZAC_GRP 2
REPORT/PROGRAM statement missing, or program type is I (INCLUDE).
2007 Jul 10 9:00 AM
Hi Rams,
Go to SE80 and Select The Function Group name.
Then enter your Function Group name and right click it, and select the activate the Function Group.
It will solve your problem.
Thanks.
2007 Jul 10 12:53 PM
Hi,
Your program must be containing some Include programs which are inactive.
Activate them separately & then activate the entire program.
Hope this helps.
Reward if helpful.
Regards,
Sipra
2007 Jul 10 9:50 AM
Hi,
Try this code.
FUNCTION ZAC_CALCULATE.
*"----
""Local Interface:
*" IMPORTING
*" REFERENCE(IM_NUM1) TYPE I
*" REFERENCE(IM_NUM2) TYPE I
*" REFERENCE(IM_OPER) TYPE C
*" EXPORTING
*" REFERENCE(EX_RESULT) TYPE I
*"----
CASE IM_OPER.
WHEN '+'.
EX_RESULT = IM_NUM1 + IM_NUM2.
WHEN '-'
EX_RESULT = IM_NUM1 - IM_NUM2.
WHEN '*'
EX_RESULT = IM_NUM1 * IM_NUM2.
ENDCASE.
ENDFUNCTION.
IF USEFULL REWARD
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |