2023 Apr 05 10:14 AM
Hi,
I try to create simple function model but I have this error which says " the statement "function" is not allowed in the current environment. However, the similar statement "function-ball" is allowed"
2023 Apr 05 10:47 AM
2023 Apr 05 11:15 AM
Hi Shakir,
To resolve the error, you can create a function pool by following these steps:
Here's an example of how to define a simple function module in a function pool:
FUNCTION ZMH_FM_AGETEST.
*"----------------------------------------------------------------------
*"*"Local interface:
*" TABLES
*" ET_EMPLOYEES STRUCTURE ZMH_SOPRAA
*" IMPORTING
*" MIN_AGE TYPE I
*"----------------------------------------------------------------------
SELECT *
FROM zmh_sopraa
INTO TABLE et_employees
WHERE age GT min_age.
ENDFUNCTION.
Note that in the correct syntax, you need to define the input/output
parameters of the function module in the local interface section.
Additionally, the table parameter ET_EMPLOYEES should be defined using
the keyword TABLES.2023 Apr 06 9:11 AM
Hi Babar,
I have already function group "function pool" created and when I have created the function module , I put it in the function group , which I have created.
And with SE38 when I set the "Type" to "Function pool" is not allowed !!!
2023 Apr 06 4:37 PM
2023 Apr 05 12:11 PM
2023 Apr 05 12:12 PM
Activate all the includes of the function group at the same time.
2024 Jul 03 3:28 PM
2023 Apr 06 9:12 AM
sorry I did not understand the first comment, and the second comment how I made it ? maybe you have a blog
2023 Apr 06 4:37 PM
Go to SE37. Enter the name you want for your function module. Click on "CREATE".
In Eclipse, go to File->New and choose function module.
2023 Apr 06 9:06 PM
2023 Apr 11 8:08 AM