Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Functional Module Code

0 Kudos
408

I am trying to write a functional module to read data from a table and then export it. Issue i am facing is with Function , ENDFUNCTION keywords. It says I need to write FUNCTIONAL-POOL instead of Function. I have tried that also. It didn`t help either.

Please point out what is the issue with this thing.

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor
319

Did you forget to (create and) activate the function group before creating the first function module?

Also your forum Id doesn't display the SAP employee icon, so use a Customer namespace - Function group starting with Y or Z, module starting with Y_ or Z_ (ref: 16466 - Customer name range for SAP objects)

4 REPLIES 4

eduardo_hinojosa
Active Contributor
319

Hi

You need to know how to create FM. Please, check the following link

https://help.sap.com/saphelp_46c/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/content.htm?no_cache=...

After take in account you have some ranges for creating your own objects in workbench. Please, look at Note 16466 - Customer name range for SAP objects. So, for FM the function must be begin by Z_ or Y_

I hope it helps you

Regards

Eduardo

former_member596005
Participant
319

May be FM name is an issue here , try creating functionmodule name starting with 'Z' or 'Y'.

Sandra_Rossi
Active Contributor
319

A function module belongs to a function pool (or function group) which has a FUNCTION-POOL statement at the beginning of the code. Maybe you removed it or you didn't activate the function pool first (you may also activate all objects at a time).

raymond_giuseppi
Active Contributor
320

Did you forget to (create and) activate the function group before creating the first function module?

Also your forum Id doesn't display the SAP employee icon, so use a Customer namespace - Function group starting with Y or Z, module starting with Y_ or Z_ (ref: 16466 - Customer name range for SAP objects)