2005 May 13 12:16 PM
Hi all,
I created a test Function Modules. whenever I try to activate it, it gives an error
"REPORT/PROGRAM statement missing, or program type is I (INCLUDE)."
Further, if I dbl click the error, it takes me to the function group, where two include files are listed.
Any Thoughts,
Hanif
2005 May 13 12:23 PM
Hi Hanif,
Have you included subroutines (FORM ... ENDFORM) before your ENDFUNCTION statement? If you, you should put them after the ENDFUNCTION statement.
Also, you may have deleted your ENDFUNCTION statement. Make sure that you have one at the end of your function module.
Cheers,
Brad
2005 May 13 12:31 PM
Hi,
This error will come even if u create a report.I have also faced the same problem.
Try activating the related includes if u have used any.
Also try activating by pressing activate any way sometimes this will help out.
Thanks & Regards,
Judith.
2005 May 13 12:43 PM
Hi,
I did not use any FORM...ENDFORM Statement nor I changed any changed any Include Files. I wrote a test FM it has two inputs param and it returns the sum of these two.
I did try Activate Anyway, but no availth, when i called it in a report, it resulted in same error.
Any idea.....
Hanif
2005 May 13 1:05 PM
Hi Hanif,
Obviously, this function Module should belong to some function group. and I suppose you have not created that function Group. In that case, the Function Group (or one of the other function modules inside that function group)might be having some syntax-error. Please check that out.
Regards,
Anand Mandalika.
2005 May 13 3:07 PM
Hi Hanif,
Can you post your FM code?
Please also mark this as a question.
Brad
2005 May 13 3:34 PM
2005 May 13 3:48 PM
fortunately, I have met this error before several hours.
I think when activate, you didn't choose all the associated file, so occur this error.
Please have a check in the file list when activate.
2005 May 13 5:31 PM
Check your main program. Let us say your function group is ZZMM. Then your main program name will be SAPLZZMM. Now if you look into this main program it should look somewhat like this.
*******************************************************************
* System-defined Include-files. *
*******************************************************************
INCLUDE LZZMMTOP. " Global Data
INCLUDE LZZMMUXX. " Function Modules
*******************************************************************
* User-defined Include-files (if necessary). *
*******************************************************************
* INCLUDE LZZMMF... " Subprograms
* INCLUDE LZZMMO... " PBO-Modules
* INCLUDE LZZMMI... " PAI-Modules
INCLUDE LZZMMF01.
In here, the include LZZMMUXX, will contain further includes, one for each function module assigned to that function group and it should look like this
*****************************************************************
* THIS FILE IS GENERATED BY THE FUNCTION LIBRARY. *
* NEVER CHANGE IT MANUALLY, PLEASE! *
*****************************************************************
INCLUDE LZZMMU01. "YOUR_FUNCTION_MODULE_NAME
Now you will get this error message typically if you are missing the following statement in the main program
INCLUDE LZZMMTOP. " Global Data
or within this include, there must be this line as its first line.
FUNCTION-POOL ZZMM. "MESSAGE-ID ..
If any of the above is missing, I would say first check your TOP include and see if the statement FUNCTION-POOL is there.
If you still get an error, go to SE38, enter the name of your main program and do a check main program. If you don't get any syntax errors, then activate the program there itself.
Let us know how it goes.
Srinivas
2005 May 14 7:09 AM
activate the function group and then activate the function module.
its because the function group is not active you are getting this message.
Regards
Raja
2005 May 16 7:05 AM
Thanks
Srinivas Adavi, Durairaj Athavan Raja zhenglin gu and all others who replied to this message.
Many replies were relevant to the problem. I did not need to change any thing in the code, Idea of opening the main program in SE38 worked fine, I activated the top most object (Function Module), and it get acticated.
Thanks again.
2005 May 16 7:09 AM
Good to hear the issue is resolved.
From next time onwards when you post a question do not uncheck <b>mark it as question</b> option.
Regards
Raja