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

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

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.

Similar Messages

  • How to use this function module on abap hr GET_PDSNR_RANGE

    how to use this function module on abap hr GET_PDSNR_RANGE
    thankx.

    PASS INETRNAL TABLE WITH SOME DATA TO TABELLE FOR GENERATING PDSNR SEQUENCE

  • How to Create the Function Module Exit

    Hi,
      How to Create the Function Module Exit. Please tell me the step by step procedure.

    Hi,
    Check this link for how to create the function module exit..
    http://sap.niraj.tripod.com/id62.html
    Thanks
    naren

  • I'm very new tp SAP ABAP, how to create a function module..V.URGENT

    hi folks,
    I'm very new to sap abap.
    I want to create a function module.
    the following is my requirement.
    by passing(eporting parameters to funtion module from pgm point of view) a field, i want to get(importing parameters from the funtion module, from pgm point of view) some 7 fields(of various tables).
    please also tell me how can code an inner join for tables 5 tables(a,b,c,d,e). i'm joining a on b, b on c, c on d,the problem here is that i can not join d on e as there are no common fields in d and e.
    can i join e and c or b, there are no common fields even in a and e.
    please tell me the solution as soon as possible, this very important and urgent deliverable.
    thanks in advance

    Here is link for creating function modules
    <a href="http://help.sap.com/saphelp_47x200/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/frameset.htm">Creating Function Modules</a>
    Regds
    Manohar

  • 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

  • How to Create a Function module z_create and to track the error records?

    I want to create a function module z_create which will insert the data from the internal tables gt_model_master and gt_model  into the corresponding database custom tables y_model_master.
    Secondly if any error is encountered during the above updation, then how to track those error records ?

    HI,
    check the sy-subrc ,if it is zero the insertion is success,otherwise use 
    message class.
    if sy-subrc ne 0.
    message e052(zmessage).
    endif.
    Edited by: rakesh dhudipala on Feb 12, 2008 2:33 PM
    Edited by: rakesh dhudipala on Feb 12, 2008 2:33 PM

  • How to create ENQUEUE function module for s567 table

    Hi Experts,
    Anyone Plz tell the steps how to create a ENQUEUE function module for the table s567.
    Its somewht urgent, plz help me.
    <REMOVED BY MODERATOR>
    Mohana
    Edited by: Alvaro Tejada Galindo on Mar 10, 2008 4:21 PM

    Hi,
    You can create a lock on a object of SAP thorugh transaction SE11 and enter any meaningful name start with EZ Example EZTEST_LOCK.
    Use: you can see in almost all transaction when you are open an object in Change mode SAP could not allow to any other user to open the same object in change mode.
    Example: in HR when we are enter a personal number in master data maintainance screen SAP can't allow to any other user to use same personal number for changes.
    Technicaly:
    When you create a lock object System automatically creat two function module.
    1. ENQUEUE_<Lockobject name>. to insert the object in a queue.
    2. DEQUEUE_<Lockobject name>. To remove the object is being queued through above FM.
    You have to use these function module in your program.
    Hope this will give a basic idea.
    Regards
    Sudheer

  • How to create a Function Module

    Hi
    Please tell me the procedure to create a function module.
    Thanks in advance,
    Priya

    Hi Srinivas,
    In order to create a function module firstly you need to assign it to a function group.
    In order to create function group goto t-code se37.
    Choose Goto->Function groups-> Create group .
    Give the function group name.
    Then come back to se37 type in the name of your FM and then press <b>CREATE</b> button.

  • How can create a function module for currency and quantity fields

    hi,
    i want to create a function module with some fields.when i activated it give some errors for 
    netpr,menge,wemng  fields(currency, quantity fields).error is it asks for reference fields. 
    please send me solution for it.
    sreenu.

    Hi Sreenu,
    While creating CURRENCY/QUANTITY fields in the DataBase Table, you have to enter a REFERENCE TABLE and a REFERENCE FIELD to the field.
    For that, after entering the field name and the data type in the correcponding columns, you have to place the cursor on the data type of the required field and click the CURRENCY/QUANTITY FIELDS tab. You will find two columns called REFERENCE TABLE and a REFERENCE FIELD.
    you have to enter a reference table in which a currency/quantity field is used and a reference field which is a currency/quantity field in that table.
    For Example, below is the table details.
    FIELD DATATYPE LENGTH DEC.PLACES REF.TABLE REF.FIELD
    1.SNO     CHAR 5
    2.AMOUNT  CURR 10     2          T001      WAERS
    3.NOS     QUAN 5                 KNA1      /VSO/R_PAL_UL
    Here Field 2(AMOUNT) is a CURR field whose Ref. Table is T001 and Ref. Field is WAERS and Field 3(NOS) is a QUAN field whose Ref. Table is KNA1 and Ref. Field is /VSO/R_PAL_UL.
    Hope this will help you.
    Regards,
    Vaitheeswaran

  • How two create UPDATE FUNCTION MODULE

    Hi,
    I have 2 tables to update one after the other...
    I have geard it is advisable to use update function module for this..
    can any1 tell me how to create and work with update function modules...
    Answers will be rewarded....

    Abhay,
    How an update function module works is, the execution of the FM is delayed to until when a COMMIT WORK statement is executed.
    Hence if you have the data available for updating the two DB tables at the time of calling the FM, you can pass the tables to the same FM and program the DB update for both in the same FM.
    However the COMMIT WORK should be outside the FM further down in the calling program.
    This link is very good and easy to follow
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/41/7af4daa79e11d1950f0000e82de14a/frameset.htm
    Hope it helps
    Aditya[url=http://help.sap.com/saphelp_erp2005vp/helpdata/en/41/7af4daa79e11d1950f0000e82de14a/frameset.htm]
    Message was edited by:
            Aditya

  • How to create the funtion module with step by step

    friends can u help me regarding how to create the function module very urgent,
    regards
    bhavani

    To create a function module, you first need to create a Function Group which will keep all the function module of same functionality.
    To create a Function Group, go to SE80->Click on Workbench-Edit Object->Function Group Tab->Enter Function Group name-> Click Create.
    To create a Function Module:
    Go to T.Code SE37->Enter the Function name->Enter Function Group name n Short Des.-> Here you need to define Import, Export parameters with the condition. Also you can write your code in source code tab.
    check this link
    Converting seconds values
    check the FM code. if you don't have this FM code, create it in SE37 and make use of it.
    FM MONI_TIME_CONVERT
    FUNCTION MONI_TIME_CONVERT.
    ""Lokale Schnittstelle:
    *" IMPORTING
    *" REFERENCE(LD_DURATION) TYPE SY-TABIX
    *" EXPORTING
    *" REFERENCE(LT_OUTPUT_DURATION) TYPE SWL_PM_CVH-DURATION
    DATA: LD_HOUR(4) TYPE N. "
    DATA: LD_MIN(4) TYPE N. "
    DATA: LD_SEC(4) TYPE N. "
    DATA: LD_VALUE2(2) TYPE N.
    DATA: LD_VALUE3(3) TYPE N.
    DATA: LD_VALUE4(4) TYPE N.
    DATA: SAVE_DURATION LIKE SY-TABIX.
    data: ld_minus(1).
    SAVE_DURATION = LD_DURATION.
    if ld_duration < 0.
    save_duration = save_duration * ( -1 ).
    ld_minus = true.
    endif.
    CLEAR LT_OUTPUT_DURATION.
    IF SAVE_DURATION NE 0.
    LD_HOUR = SAVE_DURATION DIV 3600.
    save_duration = save_duration - ld_hour * 3600.
    LD_MIN = SAVE_DURATION DIV 60.
    save_duration = save_duration - ld_min * 60.
    LD_SEC = SAVE_DURATION.
    IF LD_HOUR LE 100.
    LD_VALUE2 = LD_HOUR.
    WRITE LD_VALUE2 TO LT_OUTPUT_DURATION+3(2).
    ELSEIF LD_HOUR LE 1000.
    LD_VALUE3 = LD_HOUR.
    WRITE LD_VALUE3 TO LT_OUTPUT_DURATION+2(3).
    ELSE.
    LD_VALUE4 = LD_HOUR.
    WRITE LD_VALUE4 TO LT_OUTPUT_DURATION(4).
    ENDIF.
    WRITE ':' TO LT_OUTPUT_DURATION+5.
    LD_VALUE2 = LD_MIN.
    WRITE LD_VALUE2 TO LT_OUTPUT_DURATION+6(2).
    WRITE ':' TO LT_OUTPUT_DURATION+8.
    LD_VALUE2 = LD_SEC.
    WRITE LD_VALUE2 TO LT_OUTPUT_DURATION+9(2).
    LT_OUTPUT_DURATION = LT_OUTPUT_DURATION+1.
    if ld_minus = true.
    write '-' to lt_output_duration+1(1).
    endif.
    ELSE.
    job running or aborted
    ENDIF.
    ENDFUNCTION.
    Eg:2
    Use the following procedure to create a function module
    1.From the ABAP/4 Development Workbench screen, press the Function Library button on the Application toolbar.
    2.Type the name of your function module in the Function Module field. The name must begin with Y_ or Z_.
    3.Press the Create button. The Function Module Create: Administration screen is shown
    4.Type the name of a function group in the Function Group field. The function group name must be four characters long and must begin with Y or Z.
    5.Type an S in the Application field. This field is used to indicate which function area uses the function module. Our functionality is not used by any functional area, it is simply an example, so any choice will do. (S indicates that the function module contains functionality needed by Basis.)
    6.Type a description of the function module in the Short Text field. The contents of this field are seen when displaying a list of function modules.
    Press the Save button on the Application toolbar.
    7.If the function group does not already exist, a pop-up informs you of that fact and asks you if you want to create it. Press the Yes button to create the function group. The Create Function Group dialog box appears. Type a description in the Short Text field and press the Save button. The Create Object Catalog Entry screen appears. Press the Local Object button. You are returned to the Function Module Change: Administration screen.
    8.Press the Source Code button on the Application toolbar. The Function Module Edit screen is displayed.
    9.Type the source code for your function module. Do not change the system-generated comment lines under any circumstances! Your function module might fail to operate if you do.
    10.Press the Save button on the Application toolbar. The message Program xxxxx saved appears in the status bar at the bottom of the window.
    11.Press the Back button on the Application toolbar. You are returned to the Function Library Initial screen.
    12.If you want to define import or export parameters, select the Import/Export Parameter Interface radio button. Press the Change pushbutton. You are shown the Import/Export Parameters screen (refer to Figure 19.6). Type the names of your parameters in the first column and enter any other desired characteristics for each parameter. When you are finished, press the Save button and then the Back button.
    13.Finally, to activate your function module, press the Activate button on the Application toolbar of the Function Library Initial Screen.
    http://www.erpgenie.com/abap/bapi/example.htm

  • I need to create RFC function module which creates the IDOC

    Hi-
    Any idea how to create RFC function module which creates the outbound IDOC. If you have any sample code please forward to me.
    Thanks,
    Sony

    My Problem is
    Whenever they create Invoice using T-code's like FV65(Parked Document), automatically should create IDOC's...
    I have used message type FIDCC1 but this message type is usefull only for Posting documents.
    1. Whenever they create parked document, entries will be stored in BKPF(Parked Document-Filed-BKPF-BSTAT = 'V') and Bseg....
    2. I have to read entries from those tables and should create IDOC...
    3. I checked FM's(FI_IDOC_CREATE_FIDCC1, FI_IDOC_PREPARE) but are not useful...
    4. Now I need to write one RFC function module and that FM should create the IDOC's....
    Can anyone please help me out?
    Thanks,
    Sony

  • How to create function module in abap for VirtualProvider in bi

    how to create function module in abap for VirtualProvider in bi ???????????????
    can any one help me with simple example ?????????????????
    Moderator message : Duplicate post locked. Read forum rules before posting.
    Edited by: Vinod Kumar on Jun 15, 2011 4:40 PM

    Hi ,
    Thanks for replies about my question??.
    If i am using the exit in my char relation ship how can i debugg that exit???
    if i am using BPS0 how to do it???If i am using BPS_WB how to do it??
    Case1.Variable (type Exit) I known how to do debugg this one in BPS0 but i'm not sure in BPS_WB??
    Case2:Char Relation Ship(Type Exit) how to do in BPS0 and BPS_WB??.
    Thanks.

  • How to upload Excel file in BI using function module in abap program

    How to upload Excel file in BI using function module in abap program?

    Hi Anuj,
    To upload the file , you can try a standard program "RSEPSFTP" .
    while you execute the program , a selection screen appears in which the inputs should be give as
    RFC destination - The target server name
    FTP command- PUT
    local file - your file name
    local directory - path of your local file
    remote file - your target file name
    remote directory - where it has to be stored
    Hope this is useful for you
    Thanks & regards
    Anju

  • 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..

Maybe you are looking for

  • Discussion Forum  - Retain Portal Login

    Hi all, Hope I'm in the right place for this. We are looking to install a discussion forum solution (currently running 9.0.4.1.0 - Build: 129). Ideally we would like the forum to work in the following way: A user logs into the portal, clicks on 'Disc

  • Icon for saved passwords is missing, as are the passwords in ver 8.0. What happened? I have Norton 360, too.

    The feature does work for IE, and did for the previous version of Firefox. When I upgraded, it disappeared. I have checked tools, options, security and the appropriate boxes are checked.

  • DEFINITIONS OF TERMS UNABLE TO FUNCTION IN ALL DOCUMENT OR NOTE.

    WHY IS IT THAT THE NEW UPDATE ios7 CANNOT DEFINE WORDS ANYMORE IN THE "NOTE" "KEYNOTE" OR ANY BOOKS YOU WANT. ANYONE EXPERIENCE THIS? HOW CAN I RESTORE THE DEFINITIONS OF TERMS PLEASE. NOTE: APPLE OWNER CAN YOU PLEASE FIX THIS BUG ESPECIALLY WITH THE

  • Posting block to invoice

    Hi Please tell me what happens if i block the invoice for posting to accounting? what are the consequences? from when the payment terms will be calculated is it from the date of invoice or the day when i release to accounting regards

  • Planning on Cost Element group

    Hi Guys, I have a PLAN Query with costelement in the rows and i am extracting costelement group hierarchy from R/3 and using the hierarchy on the costement in the rows. Now i have a requirement users want to enter the PLAN data at the costelement Gro