Skip to Content
avatar image
Former Member

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

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

7 Answers

  • avatar image
    Former Member
    Aug 21, 2007 at 04:31 AM
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 21, 2007 at 04:32 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 21, 2007 at 04:32 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 21, 2007 at 04:33 AM

    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>

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 21, 2007 at 04:50 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 21, 2007 at 05:14 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 21, 2007 at 08:51 AM

    Hi GURU,

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

    Sachin

    Add comment
    10|10000 characters needed characters exceeded