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: 

HOW to create a function module ..... in abap

Former Member
0 Kudos

pls lemme know ............the steps and procedure in creating a function module

7 REPLIES 7

Former Member
0 Kudos

Hi Guru,

First you need to decide, what goes in to the function module and what comes as output.

1. Go to SE37.

2. Type the FM name and click create.

3. Now, Define the Attributes like if it "remote enabled" etc.

4. Then define the Importing parameters (This would be the parameters that would be passed in to the FM).

5. Define Export parameters/ table parameters which ever you have decided would be the output.

6. If required you can define Exceptions. (Used for Error HAndling)

7. Now in the Source Code tab - you can write the main logic of the FM using the import parameters. Populate the output to the Export parameters that you have defined.

8. Activate the function Module.

Now you have created a FM. You can use the same in your program to carrry on the desired logic.

<b>Reward points for helpful answers.</b>

Best Regards,

Ram.

Former Member
0 Kudos

HI

Function modules are created in se37.

You have to enter

1) Function group

2) Import parameters

3) Export parameters

4) Tables

5) Source code.

Attributes may be set to normal or Remote enabled.

regards

swati

varma_narayana
Active Contributor
0 Kudos

Hi..

Find the Link below for Steps to Create Function Group and FM.

http://help.sap.com/saphelp_nw04/helpdata/en/26/64f623fa8911d386e70000e82011b8/content.htm

<b>Reward if Helpful</b>

Former Member
0 Kudos

hi GURU,

To Create Function Module first you need to create Function Group and Activate it.

First go to SE37 then

1. Goto>Function Groups>Create Group.

Here you need to give Group name and Short Text of group.

2. After Creating Function Group again:

Goto>Function Groups>Change Group.

Enter your Function Group name and press enter.

a dialog box will appear where you can see its status is inactive.

So, press <b>Main Program</b> Button and activate your function group.

NOW you Function Group is activated and and you can create Function Module in it.

Now Enter your Function Module Name and press create then

give your Function Group name in respective place and press enter.

Now you can give your Import/Export parameters and and if you want to use TABLES give it in TABLE section only not in Import/Export Parameters.

Then Write Logic in Source Code Tab and Activate it.

if you have any qury regarding it Pls let me know.

Reward if Useful.

Sachin.

Former Member
0 Kudos

First we have to create function group.

after in se37 gv function module name starts with package name .

after maintain import and export parameters and write logic in source code.

save and activate that.

Former Member
0 Kudos

Hi GURU,

If you got any help from any of these please reward and close thread.

Sachin