Application Development and Automation 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: 
Read only

FM

Former Member
0 Likes
1,050

Hi Friends,

Can any body let me know the step by step procedure for creating a new Function Module with example?

I am sure of rewarding points.

Thanks in Advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,033

hi Jak,

you can create a FM by going to the transaction se37.

steps.

1. write the name of FM

2. click on create

3. provide with function group and description and save

4. now enter import and export parameters and exceptions as required.

5. write the source code.

6. activate it.

hope this helps.

regards,

Kinshuk Saxena

9 REPLIES 9
Read only

Former Member
0 Likes
1,034

hi Jak,

you can create a FM by going to the transaction se37.

steps.

1. write the name of FM

2. click on create

3. provide with function group and description and save

4. now enter import and export parameters and exceptions as required.

5. write the source code.

6. activate it.

hope this helps.

regards,

Kinshuk Saxena

Read only

former_member191062
Active Contributor
0 Likes
1,033

Hello,

I am quite sure you will have hundreds of replys :-).

1. Create a Function Group /* If you not yet have one already */ Tr. SE37 -> GOTO -> Function Groups -> Create Goup.

2.

Choose the transport request for this /* or choose local object */

3.

In Tr. SE37 enter a choosen name staring with chr: 'z'

choose create.

Now you have to select the the group you just created, or the one you have.

4. Enter the import / export parameters

5. write the code

6. Activate it

>> you can use this now using CALL FUNCTION.

Regards,

Dezso

Read only

Former Member
Read only

Former Member
0 Likes
1,033

Hi Jak,

    • step by step procedure for creating a new Function Module with example

Simple.

You need to know first what typr of FM u want to create means normal or RFC enabled although the steps are almost same with a minor difference that u need to select the radio button as per the need.

Well regarding steps , it already shown above.

  • First of all u need to have a functin group for ur function module if u don't have then create Function Group first from SE37 -->Function Group --> Create group

  • Now after that , in SE37 enter ur Function module say Ztest and then press create.

  • Give description and in attributes select Normal Function module or RFC (Say Normal FM) .

  • Give importing and exporting Paramaters. This step again depend on ur reqmts. u can have changing as well as Tables paramters also.

  • Write ur code in the source text .

  • Save --> Give request number .

  • Activate it.

  • U can also test ur FM by pressing F8.

Hope u will be clear with the steps.

Cheers

Sunny

Rewrd points, if found helpful

Read only

0 Likes
1,033

HI there.

Here what i sthe difference betwwen import and export parameters..suppose for example i am doing addtion..of two numbers

Thanks in Advance

Read only

0 Likes
1,033

Hi Jak,

import parameters are those which you send to the FM.

export parameters means the result

c = a+ b. a and b should be importing parameters

c should be exporting parameters.

Meanings interchange when you use the FM in a program.

Regards,

ravi

Read only

0 Likes
1,033

Hi Jak,

if you give inputs two numbers, they are import parameters, and if you get the sum of then then it is export parameter.

Regards

vijay

Read only

0 Likes
1,033

Hi,

Have a look into these links:

They will give u some tips on using import and export parameters in a FM.

Best Regards,

Anjali

Read only

Former Member
0 Likes
1,033

Hello jak,

correct and quicker answers should be rewarded.

regards,

Kinshuk