‎2005 Dec 01 5:51 PM
Hi,
I created FM using Se37. I didn't put any code inside that FM. But While Activating that FM i am getting error like "program SAPLYMATERIAL "Report/Program statement missing, or program type is include". If i double click that program name then it's going to this code
*******************************************************************
System-defined Include-files. *
*******************************************************************
INCLUDE LYMATERIALTOP. " Global Data
INCLUDE LYMATERIALUXX. " Function Modules
*******************************************************************
User-defined Include-files (if necessary). *
*******************************************************************
INCLUDE LYMATERIALF... " Subprograms
INCLUDE LYMATERIALO... " PBO-Modules
INCLUDE LYMATERIALI... " PAI-Modules
If i try to activate this telling me syntax error "The main program of the function "YMAT" does not begin with FUNCTION_POOL". Kind of strange....... B'cos i didn't write any code in FM. Why i am getting this error?
‎2005 Dec 01 5:58 PM
Hi
It seems to be an issue with the function group you used.
Try repairing the function group .
Regards
Kalpana
‎2005 Dec 01 5:55 PM
Hi Subhashini,
When you create a FMyou need to create it with reference to a function group.
the function group will have a main program attached to it and there will be several include in it(One for global data , one for the form rouitines etc).
So when you have the code and see if you get the error still.
Regards,
Ravi
‎2005 Dec 01 5:56 PM
Something went wrong when creating the function group. You can delete it and try creating it again or you can check that all of your code matches mine.
The SAPLYMAT should look like....
*******************************************************************
* System-defined Include-files. *
*******************************************************************
INCLUDE LYMATTOP. " Global Data
INCLUDE LYMATUXX. " Function Modules
*******************************************************************
* User-defined Include-files (if necessary). *
*******************************************************************
* INCLUDE LYMATF... " Subprograms
* INCLUDE LYMATO... " PBO-Modules
* INCLUDE LYMATI... " PAI-ModulesThe LYMATTOP include should have ....
FUNCTION-POOL YMAT. "MESSAGE-ID ..
Regards,
Rich Heilman
‎2005 Dec 01 5:56 PM
For more info, see any existing function module,
Go to got0->Main program for any function module.
‎2005 Dec 01 5:58 PM
Hi
It seems to be an issue with the function group you used.
Try repairing the function group .
Regards
Kalpana
‎2005 Dec 01 6:01 PM
Hi,
Exactly My function is looks like Urs. ALso I created Function group & linked that Function Group to FM. But still it's giving me error.
‎2005 Dec 01 6:07 PM
First make sure that the TOP include is activated.
If it is then something is wrong. I would start over. Delete the function group. Go to SE80, pull the listbox down to "Function Group", enter the name and hit enter. System will ask you if you want to create it, say yea, and give a description. Click save, enter dev class.
Now you have you funciton group. Go ahead and activate it, by right clicking on the function group name and "Activate". Select the TOP include as well as the main program and click green check. Now all should be activated, now start adding function modules.
Regards,
Rich Heilman
‎2005 Dec 01 6:14 PM
Ok i will try this. But When i create FM as YMAT1, If i save this telling me warning that " Function Module name is reserved for SAP"?..
Is that ok. or b'cos this it's causeing the error "Report/Program statment missing Error"
‎2005 Dec 01 6:19 PM
‎2005 Dec 01 6:19 PM
Go to SE38 and enter your main program SAPLYMATERIAL. Click activate there. Then in the menu, Utilities-->Update Navigation Index.
Now go to SE37 and check if your function module is active. Try activating it again, if not.
Srinivas
‎2005 Dec 01 6:28 PM
Hi,
Thanks guys. Now it's activating Without any errors. I activated through SE80. Great help guys.
Thanks,
Subashini
‎2005 Dec 01 6:03 PM
Initially delete the FM which u have created. Recreate a new FM from SE37. While creating the FM attach a valid function group and save the FM. It automatically creates various include programs. Try activating the main program.
This will solve ur problem.
‎2005 Dec 01 6:04 PM
Function Group Problem, There is some other Programs having some problem, because of that you are getting this message.
try to Correct that FM.
then you will not get any errors.
regards
vijay