How to develope custom function modules in SAP R/3 system to maintain c...

How to develope custom function modules in SAP R/3 system to maintain cross
referencing tables for sales order number.

Hi Raja,
Steps to crate FM..
Follow these steps..
Go to the T: code SE37
First You Create Function Group
On That u specify
Function Group Name..............
Short Text..............................
save...
Go to SE 37
Specify the Function Module Name: Eg: Z_Bapi_Materialmaster
Short Text.......
Save...
Next Go to Attributes..
Select Radio button : Remote enabled model
Go to Parameters..
Click Import...
Give Parameter Type Associate type S.t
next Click Export...
Give Parameter Type Associate type S.t
Next Click Tables Button..
Specify tables..
Next click source code button..
Write Source code here..
Eg : Select statements Etc..
Finally we should be select the Radio button Enable remorely
https://www.sdn.sap.com/irj/sdn/wiki?path=/pages/viewpage.action?pageId=39728
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/bapi%2bstep%2bby%2bstep
Hope this information is useful to you..
Reward points if it is usefulll....
Thanks ,
Satya Kumar..

Similar Messages

  • How to develop a function module

    Hello everyone,
    Can anyone pls help me with this..it's quite urgent.Thanks in advance.
    How to develop a function module  which will obtain the timestamp and give it to a particular transaction or any other transaction where it may be useful to have it. The transcation must have a new parameter to decide whether timestamp should or should not be displayed. The function module must be able to give the timestamp and some other information as follows:
    Host timestamp
    Local timestamp
    Userid
    System
    SAP client

    Hi Aruna,
    Could not get you complete question.
    But you can try to create a function module which will return you time stamp, userid and other details when you call the function module.
    Goto se80, create  a function group to it add the function module. In the parameters of the functin module mention the importing parameters you have any (as per your requirement) and in the exporting parameter mention time stamp, userid fields and so on . in the source sode of the function module move the item stamp and other details to the interface of the function module by passing them from the system variables.
    Thanks,
    George
    reward to all helpful tips

  • How to use BAPI_MATERIAL_MAINTAINDATA_RT function module in SAP Reatil?

    Hi,
    I am facing aproblem with BAPI_MATERIAL_MAINTAINDATA_RT function module when i send Article Master data from one SAP Server where all Article Master Data is maintained to another SAP Server where all Transaction Data is maintained.
    how can i use the above Function Module to create or change Articles in Remote Server ( Transactional Data Server) by specifying Destination when calling Function Module so that it can create or change in Remote Server i.e what are the neccessary parameters passed to this function modules.

    thanks

  • Using Function Module in SAP Script

    Dear Friends,
    how can i use function modules in sap scripts?. i want to use call function SPELL_AMOUNT in sap script?
    in text element using perform statement hw can i use?
    Regarding i search related articles but, i am not getting any solution.
    Plz help Me.
    Regards,
    K.S.Kannan

    Dear Kanan,
    You can do it in two ways:
    Way1
    your Amount will be in some variable say VAR_AMT1 and want in words in field say VAR_SPELL.
    In your report program you can use the function module SPELL_AMOUNT and pass the  VAR_AMT1 to it and you will get the words in VAR_SPELL.
    So now in your sap script you can use the variable  VAR_SPELL to print the amount in words.
    we normally use this above method.
    WAY2
    You are inside Sap script and you can write the following code in the sap Script window.
    /: PERFORM AMT_TEXT IN PROGRAM ZF_REPORT USING &VAR_AMT1& CHANGING &VAR_SPELL&
    /: ENDPERFORM
    In the Tag Column when you press F4 you can see various symbols like
    /: =  ( / /= /( /: /* /E
    . Select
    In the program ZF_REPORT (any report) you should have the perform AMT_TEXT  where you should use the function module SPELL_AMOUNT to convert the amount into words.
    Hope its Clear.

  • Testing custom function modules

    Hi Friends ....
      As I am new to ABAP testing , I need help in knowing how to test custom function modules .
    Below is how I am trying :
      Step : 1 -- >  Open Tcode SE37
      Step : 2 -->  Display the function module
       Step : 3 --> Do its syntax check.....activate it..... execute it
       What if no test data is available???
    I am trying to execute directly where it gives a return parameter for some function modules saying No Entry \ No data available for this ID etc.,
    I am in a confusion whether its correct or not
    I want some ideas regarding this
                                 - Swapna

    >
    Swapna Vadlamani wrote:
    > Hi Anupama...
    >
    >   Thank u a ton for the quick reply...but I have another doubt..if I execute without giving any selection parameter data...it says
    >
    >   No data stored for in the selected period
    >
    >                                 -Swapna
    Ok, so that is what it does if you don't pass it any selection parameter data - I doubt very much if that is how it will be used in Production.  Any function module is just a bit of code that does what it has been programmed to do; to test it you just need to find out what it is supposed to do from whoever has asked for it to be built and then check that it does it.  If there is no test data set up, then you'll need to find out from your functional consultant how to set some up or get them to set it up for you.

  • How to create a custom function module with the records in SAP R/3?

    Hi All,
    How to create a custom function module with the records in SAP R/3? Using RFC Adapter I have to fetch the custom function module records.
    Regards
    Sara

    Hi
    goto se37...here u need to create a function group... then u need to create a function module. inside assign import/export parameters. assign tables/exceptions. activate the same. now write ur code within the function module
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/content.htm
    Look at the below SAP HELP links, These links will show you the way to create a Function Module
    http://help.sap.com/saphelp_nw04/helpdata/en/26/64f623fa8911d386e70000e82011b8/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/content.htm

  • How to Developed user defined functions to call function modules in SAP R/3

    •     how to Develope user defined functions to call function modules in SAP R/3 system

    Hello Raja,
    Go through this V.imp Link...
    http://download.oracle.com/docs/cd/B10464_05/integrate.904/b10408/rfc.htm
    Steps to crate FM..
    Follow these steps..
    Go to the T: code SE37
    First You Create Function Group
    On That u specify
    Function Group Name..............
    Short Text..............................
    save...
    Go to SE 37
    Specify the Function Module Name: Eg: Z_Bapi_Materialmaster
    Short Text.......
    Save...
    Next Go to Attributes..
    Select Radio button : Remote enabled model
    Go to Parameters..
    Click Import...
    Give Parameter Type Associate type S.t
    next Click Export...
    Give Parameter Type Associate type S.t
    Next Click Tables Button..
    Specify tables..
    Next click source code button..
    Write Source code here..
    Eg : Select statements Etc..
    Finally we should be select the Radio button Enable remorely
    https://www.sdn.sap.com/irj/sdn/wiki?path=/pages/viewpage.action?pageId=39728
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/bapi%2bstep%2bby%2bstep
    Re: User Defined Functions Tutorials
    Hope this information is useful to you..
    Thanks ,
    Satya Kumar..

  • How to write the custom Function Module to trigger the Alert.

    Hi all,
    I have developed a custom alert category in Tx - alrtcatdef. Now i want to trigger it from my custom function module. what should i do or what is the procedure to trigger the alert from my custom function module.
    Arul Jothi

    hi arul,
    try this program.
    RSALERTTEST.
    check out this link...
    <a href="/people/ginger.gatling/blog/2005/12/02/innovative-ways-to-use-alerts:///people/ginger.gatling/blog/2005/12/02/innovative-ways-to-use-alerts
    regs,
    jaga

  • How to code a predifined function module in sap ,in se37.

    can any one tell me how to code a predifined function module in sap ,in se37.it's an immediate requirement.if u give a brief description it'll do.

    Hi Henry,
    There are two possible ways in which I can interpret your question.
    1. You want to create a new Function Module in SE37. you will have to refer to the <a href="http://help.sap.com/saphelp_47x200/helpdata/en/d1/801e9a454211d189710000e8322d00/frameset.htm">Function Builder</a> tutorial for that.
    2. You want to use an existing function module in your program. In the code of your program in SE38, click the button <i>Pattern</i>. On the pop-up, give the name of the function module that you wish to use in your program.
    Regards,
    Anand Mandalika.

  • How to bring the custom function module in WE42?

    Hi,
    I have created a custom function module to post a custom idoc.
    Process code has been created thro WE42 and WE57 is done.
    Still I am not able to see the custom function module in the list (WE42) in order to assign it to process code.
    May i know the reason for this?
    Thanks.
    Thiyagu

    What makes you think that it should be visible in WE42? There is no F4-value help for this and you haven't added it manually yet, right.
    In WE42 you can manually add entries, so that's what I would do.

  • How to trigger inbound custom function module?

    Hello Experts,
    Could someone help me with my dilemma?
    I have created a custom process code which is linked to a custom function module for processing inbound IDocs. I have tested the function module successfully and I have set up the partner profile accordingly. The IDocs are coming in but get stuck at status "64". My function module never gets triggered even though in the partner profile it is set up to be triggered immediately. Any idea what I am missing?
    Thanks,
    Marlin

    Hi marlin ,
    just go for these checks and let us know the status ..
    1.Check here .
    Bd51 – assignment of Inbound function module. Present or not
    Check here .
    2.Bd67 –assignment of process code to inbound function module /present or not.
    3.
    Check here.
    In the object for the message type u need to give the BUS object as the application object.
    like bus2032
    4.
    Now place a break-point in ur function module and run it in debugging mode ..
    Now check whether this one is getting  into ur function module , next check the status record of the document number .
    regards,
    vijay.
    take an idoc , populate it from we19 and then there call the function module in debugging mode in back ground ..
    we'll see if this is actually picking the Fm or not.
    Message was edited by: Vijay

  • Update the custom table by using Custom Function module.

    Hi Experts,
            My requirement is ,
    1) To create the Custom Z table with fields
               vbak-vbeln
               likp-vbeln
               vbuk-vbeln
      After creating this Z table.
    2) I have to create one custom function module.
        Based on this function module i have to update that Z table.
    3) Before these steps i have to write down an ALV report based on the tables vbak and vbeln, in that table i have to print vbak-vbeln. and also in report i generated check box and one custom button in application toolbar. after the report will displayed , when ever i click the button in application tollbar , this function module will executed and the table will be updated.
        But I developed the ALV report with custom button and check box successfully.
      My doubt is how to write the function module and based on that function module how to update the table.
          Please suggest me on this requirement.
        Thanks in Advance.
    Thanks and Regards
    Srihari.

    HI ,
         Can any one help me out on my above requiremnet..
    Thanks and Regards
    Srihari.

  • How many types of function modules are there

    hi gurus,
    how many types of function modules are there...
    what type of function module bapi  is....
    i don't know much about that...
    pls help me...
    regards,
    praveen

    hi
    hope it will help you.
    <REMOVED BY MODERATOR>
    Function Modules Used in Script:
    In the Driver Program we must use all or some of the function modules that are listed below to transfer the data.
    • Open_Form
    • Close_Form
    • Start_Form
    • Write_Form
    • Write_Form_Lines
    • End_Form
    • Control_Form
    • Read_Form_elements
    • Read_Form_Lines
    Any driver program must contain Open_Form, Close_Form and Write_Form. Other function modules are optional.
    OPEN_FORM: This function module opens layout set printing. One must call this function module before he uses any of other layout set function modules like Write_Form, Start_Form, Control_Form etc., You need specify a layout set name in the export parameters of this function module. If nothing is passed to Open_Form then one should use Start_Form function module to open layout set before starting the output. The layout set opened by Open_Form should be closed by Close_Form function module, other wise output doesn’t appear. We can use any number of Open_Form, Close_Form functions in one single program. But Close_Form must be there for every Open_Form in the program.
    Some of the important export parameters we have to pass to Open_Form function module.
    Form: Enter the Layout set name here, which then controls the output formatting. If nothing is specified then we must use Start_Form for opening layout set.
    Language: Layout sets are Language dependent. Enter the desired language here. If the entered layout set is not in that language, then the function tries to open the Form entered in its original language. The default value is SY-LANGU.
    Device: SAP Script can format a text on different device types. The device can be ‘PRINTER’ or ‘TELEX’, ‘TELEFAX’, ’ABAP’ and ‘SCREEN’.
    Dialog: Use parameter DIALOG to determine whether to display a dialog box before printing, in which the user can set several spool parameters for print formatting. Possible values: SPACE displays no print parameter screen. 'X' display print parameter screen. Default value: 'X'
    Options: Use parameter OPTIONS to set several options for print formatting. The parameter has the structure ITCPO. The user can change some of the defined settings on the print control screen. The default value for Options is ‘ ‘. We will discuss about ITCPO structure in detail later.
    Other Export, Import and Exceptions are self-explanatory.
    Close_Form: The function module closes the layout set opened using OPEN_FORM. The system executes any terminating processing steps for the last opened layout set. No Export parameters for this Function Module.
    Start_Form: In-between the function modules OPEN_FORM and CLOSE_FORM, we can use different layout sets. This allows us to combine several different layout sets into one print output. However, we can combine only those layout sets that have the same page format. To switch layout sets, use the function module START_FORM. If another layout set is still open, we must close it first using END_FORM. If we specify no layout set name when calling START_FORM, the system restarts the last open layout set. If after OPEN_FORM no layout set was activated yet, the system leaves the function module with the exception UNUSED. Some of the important export parameters for this function module are
    Form: The parameter contains the name of the layout set you want to use for printing. If you specify no layout set here, the system restarts the last active layout set.
    Language: Layout sets are language-dependent. Enter the desired language here. If the layout set does not exist in this language, the system tries to call the layout set in its original language. If the parameter LANGUAGE is empty, the system uses the language of the last active layout set.
    Startpage: Usually, SAP script starts with the page specified as start page in the layout set definition. If we want to start output with another layout set page, enter the name of the desired layout set page here. If the desired page is not defined, the system uses the start page defined in the layout set.
    Program: To replace program symbols, SAP script must know which active program contains the work areas for the values to be passed. If we omit the parameter, the system searches for the field values in the program that was specified in the parameter OPTIONS (field TDPROGRAM) of OPEN_FORM. If we enter a program name, the system replaces the program symbols with the values from this program up to the next END_FORM.
    Exceptions and other Export, Import parameters are self-explanatory.
    Write_Form: The system outputs the layout set element specified in parameter ELEMENT into the currently opened layout set. In the parameter WINDOW we can specify the name of a window for the output. Remember that the layout set element must be defined in this window. The parameter FUNCTION specifies how to merge the text lines to be output with any existing contents in the window. In this case, there are differences between the different window types or areas. Some of the important export parameters used in Write_Form.
    Element: Specify the name of the text element you want to output into the layout set window specified in the parameter WINDOW. The element must be defined in that layout set window. If you specify no element, the system uses the default element, if one is defined in the layout set.
    Window: Specify the name of the window into which you want to output the layout set element specified in the parameter ELEMENT. Default value for Window is ‘MAIN’.
    Function: The parameter determines how to output the text element into the respective window. The output type depends on the window type and area:
    Window Type: MAIN Area: BODY
    SET/APPEND: Appends to previous output.
    Window Type: Main Area: Top/Bottom and
    Window Type: Other than Main and all areas
    SET : Delete the old element contents and prints the new elements
    APPEND: Appends the new content to existing elements.
    Type: The system interprets this parameter only for output to the main window. The parameter determines the area of the main window into which we want to output the element. Possible values: 'TOP' header area
    'BODY' main area
    'BOTTOM' footer area
    Default value: 'BODY'
    Write_Form_Lines: This function module outputs the text lines in table LINES into the specified layout set window. The text lines must have the SAP script ITF format. From the data in the text header, the system uses only the field TDSTYLE to apply the formatting attributes defined in the specified style for this text. If the field is empty, the system uses the identically named formatting attributes (character and paragraph formats) of the layout set.
    Use parameter WINDOW to specify into which of the windows defined in the layout set we want to output the text. We can specify any window used in the layout set. The parameter FUNCTION determines how to merge the text lines to be output with any existing contents in the window. There are differences between the different window types or areas.
    Header: This parameter contains the header of the text module we want to output in the current layout set. For the formatting process, the system uses only the entries in the header fields TDSTYLE and TDFORM. Structure: THEAD
    WINDOW: Enter the name of the window into which we want to output the layout set element specified in parameter ELEMENT. Default value: 'MAIN'
    FUNCTION: This parameter determines how to output the text element into the respective window. The output type depends on the window type and area: Window type MAIN, area BODY: 'SET' append to previous output 'APPEND' same as SET. DELETE' no effect. Window type MAIN, areas TOP and BOTTOM; all other windows: 'SET' delete old window or area contents and output the element 'APPEND' append the element to the existing elements 'DELETE' no effect Default value: 'SET'
    TYPE: The system interprets this parameter only for output to the main window. The parameter determines the area of the main window into which you want to output the element. Possible values: 'TOP' header area 'BODY' main area 'BOTTOM' footer area Default value: 'BODY'
    END_FORM: END_FORM ends the currently open layout set and executes the required termination processing. After calling this function module, no more layout set is active. For further output, we must start a new layout set using START_FORM. No Export parameters.
    CONTROL_FORM: Use this function module to pass SAP Script Control Commands to the layout set. The Control command is passed through the export parameter ‘COMMAND’ in quotes.
    READ_FORM_ELEMENTS: This function module fills a table with all text elements that appear in one layout set. If we specify no layout set name, the system includes all elements of the currently open layout set. If we specify a layout set, the system uses the information about the active version of the layout set, retrieved from the database. Here we have two export parameters, Form and Language and a table parameter Elements.
    READ_FORM_LINES: Use this function module to transfer the lines of a layout set element into an internal table. If we specify no layout set name, the system transfers the text lines of the currently open layout set. If we specify a layout set, the system uses the text lines of the active version of the layout set from the database. The Export parameters are Form, Language, Window and Element. If we pass these 4 parameters the function module returns a table with the lines from layout set.
    Function modules are one element. There are no types. However sometimes an RFC enabled function module is referred to as RFC Function module, but really it is just a function module. Also BAPIs are function modules, but are usually referred to as just BAPI as opposed to BAPI Function module.
    There is no different function module types , but calling the function module will be different.
    check this function calls syntax
    1. Calls a function module:
    CALL FUNCTION func.
    2. Call a function module in a different mode (asynchronous Remote Function Call):
    CALL FUNCTION func STARTING NEW TASK taskname.
    3. Call a function module in the update task:
    CALL FUNCTION func IN UPDATE TASK.
    4. Call a function module in a remote system (Remote Function Call, RFC ):
    CALL FUNCTION func DESTINATION dest.
    5. Asynchronous call to a function module with transactional processing (transactional Remote Function Call):
    CALL FUNCTION func IN BACKGROUND TASK.
    qRFC with output queue
    6. Call a function module that can be activated in the context of enhancements:
    CALL CUSTOMER-FUNCTION func.
    Cheers,
    Chandru
    Edited by: Alvaro Tejada Galindo on Feb 27, 2008 11:53 AM

  • How to down lode function module & how to uploaded

    Dear  friends,
    Iam trying  2  transport request 4m development 2 production ,
    unknowing i deleted  customized function module, 
    Same functional module was in other client  plz guide me how to downloaded functional module  & how to up lode ,
    How to down lode function module & how to uploaded
    Regards,
    Reddy

    Hello,
    Create a request of type Transport of Copies.
    Go to transaction SE03 , select the option Include Objects in a Transport Request, select the object, include in your request and liberate it.
    Then copy the DATA and COFILE of this request to your destination system and import it in transaction STMS.
    Take a look at this: Transport error!
    Regards,

  • How to create RFC function module and how to call this function module

    Hi,
    i want to know step for creating RFC function module and then How to  use this function module from some other sap system.
    Thnaks,
    jigar

    Jigar,
    To implement a remote function module in ABAP, perform the following steps:
    Register the module as remotely callable in the RFC server system.
    In the function module Administration screen (transaction code SE37), set the field Can be called via REMOTE CALL. Registering a module as remote causes an RFC stub to be generated for it.
    Write the code for the function module.
    Create the destinations.....................
    Displaying, Maintaining and Testing Destinations
    To display, create or modify destinations, choose Tools ® Administration ® Administration ® Network ® RFC destinations or enter transaction code SM59.
    Remote Destinations are stored in table RFCDES. The RFCDES table describes logical destinations for remote function calls.
    It is not possible to maintain the RFCDES table directly.
    You can also access logical destinations via the Implementation Guide (IMG) by choosing Tools ® AcceleratedSAP ® Customizing ® Execute Project ® SAP Reference IMG.
    In the Implementation Guide, expand the following hierarchy structure:
    Basis
    Application Link Enabling (ALE)
    Sending and Receiving Systems
    Systems in Network
    Define Target Systems for RFC Calls
    Displaying Destinations
    The initial screen for this transaction displays a tree:
    Different connection types (i.e. partner systems or programs) are possible. For further information, see Types of Destinations.
    To display all information for a given destination, double-click it, or place the cursor on it and press F2 .
    To search for a destination, press the Find button and specify your selection. You get a list of all entries matching your selection. Place the cursor on the one you want, and press F2 or simply double-click the destination. All information for the given entry appears.
    Creating Destinations
    On the destinations overview screen (transaction code SM59), the connection types and all existing destinations are displayed in a tree structure.
    All available connection types are explained in Types of Destinations.
    To create a new RFC destination, press the Create button. A new screen is displayed with empty fields for you to fill in.
    If you want to create a new destination
    As you create a remote destination, you can specify a particular application server or a group of servers for a balanced distribution of system load.
    For details of the destination parameters, see Entering Destination Parameters.
    Changing Existing Destinations
    On the destinations overview screen (transaction code SM59), the connection types and all existing destinations are displayed in a tree structure.
    You can display all information for a given destination by double-clicking it or pressing F2 on it.
    To change an existing destination, double-click it, or place the cursor on it and press the Change button.
    For details of the destination parameters, see Entering Destination Parameters.
    Testing Destinations
    To test a destination, choose the appropriate function from the Test menu.
    Connection (also available via the Test connection pushbutton)
    Authorization (checks logon data)
    Local network (provides a list of application servers)
    You can use the CALL FUNCTION statement to call remote functions, just as you would call local function modules. However, you must include an additional DESTINATION clause to define where the function should run:
    CALL FUNCTION RemoteFunction
    DESTINATION Dest
    EXPORTING
    f1 =...
    f2 =...
    IMPORTING
    f3 =...
    TABLES
    t1 =...
    EXCEPTIONS......
    The field Dest can be either a literal or a variable: its value is a logical destination (for example, "hw1071_53") known to the local SAP System. Logical destinations are defined in the RFCDES table (or the TRFCD table in R/2 Systems) via transaction sm59 or the following menu path: Tools ® Administration, Administration ® Network ® RFC destinations. You can also access logical destinations via the Implementation Guide (IMG) by choosing Tools ® Customizing ® Enterprise IMG. In the Implementation Guide, you can then choose Cross-application components ® ALE ® Communication ® Define RFC destination.
    The remote function call concept, for example, allows you to access a function module in an R/2 System from an ABAP program in an R/3 System. If you want to read a customer record from your R/2 System’s database, create a remotely callable function module in the R/2 environment which retrieves customer records. Call this function from your R/3 System using a remote function call and listing the destination for the target R/2 System:
    Pls. reward if useful

Maybe you are looking for