Skip to Content
author's profile photo Former Member
Former Member

example needed for function module

kindly provide me an example for function module & let me how to use this function in a report program..Thnaks in advance..

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Posted on Jan 11, 2007 at 07:36 AM

    Hi,

    GO to Tcode SE80.Create fucntion group.Name should start with z or y.

    GO to Tcode SE37.Create function module.Assign it to function group created above.Name should start with z or y.

    In change mode,you can top include.This is the place you should put the declarations.

    In F01,you need to write the form and U01 you should write the main program.Best way is to take any function module(z*) and follow it.

    There are 3 types of fm.

    1.Normal fm

    2.RFC enabled

    3.Update task.

    Check this link for RFC.

    http://help.sap.com/saphelp_47x200/helpdata/en/22/0425f2488911d189490000e829fbbd/frameset.htm

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 11, 2007 at 07:40 AM

    Hi,

    Declare PARAMETERS: P_FILE LIKE RLGRAP-FILENAME. in your program..

    No write this :

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.

    CALL FUNCTION 'F4_FILENAME'

    EXPORTING

    PROGRAM_NAME = SYST-CPROG

    DYNPRO_NUMBER = SYST-DYNNR

    FIELD_NAME = 'P_FILE'

    IMPORTING

    FILE_NAME = P_FILE.

    This will browse thru the directories to pick a name when U press F4 on the

    P_FILE ..

    Regards,

    GSR.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 11, 2007 at 07:40 AM

    hi,

    First, go to SE80, select from the listbox, "Function Group", enter the name of your function group, Hit enter. SYstem will ask if you want to create it, say yes. Once the function group is created, then righ-click on the node in the tree structure and select create->function module. Name it and give description.

    Add your IMPORT and EXPORT parameters in the appropriate tab, add the source code in the appropriate tab. SAve and activate.

    Here is some addtional reading.

    http://help.sap.com/saphelp_470/helpdata/en/d1/801ee8454211d189710000e8322d00/frameset.htm

    Regards,

    Santosh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 11, 2007 at 07:40 AM

    Hi Pradeep,

    Function modules are ABAP routines that are administered in a central function library. They apply across applications and are available throughout the system. You must assign function modules to a function pool that is called a function group. A function group is nothing but a container for the function modules. Now create a function group and then a function module, which you can use for the next exercise steps.

    Check this step by step exercies.

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

    Regards,

    Raghav

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 11, 2007 at 07:43 AM
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.