How to create Function Module

Hi,
I am trying to create a function module using RSAX_BIW_GET_DATA_SIMPLE  as a template. Can someone tell me how can I modify and rename this module. Also, how can I create extract structure from the function module.
I have tried to create a module in the module group by right cliking and then 'create', but it wouldn't let me do that way instead it giving me message 'function module name is reserved for SAP'. I get this message no matter what name I provide.
Basically I am trying to create a function module to extract data from SD module into BW. I appreciate your help with reward.
Thanks,
Rao.

Hi,
It is almost the same but a different transaction.
1. Goto SE37.
2. Follow the path
Goto --> Function Group --> Create Group
3. Then enter a function name Z***** and click create.
The following link gives you more information about the functions and groups and others:
http://cma.zdnet.com/book/abap/ch19/ch19.htm
If you are looking for ENHANCEMENT kind of a thing then follow the following path:
1. Log onto R/3
2. TCODE: SMOD
3. Enhancement RSAP0001.
4. Double click on the one you are looking for i.e. Transaction / Master Data.
5. In the Function Module Double click on the INCLUDE.
Hope it helps,
Regards,
GPK.
Message was edited by: Praveen

Similar Messages

  • How to create function module for getting customer name

    Hi Experts,
                   How to create function module?  when in import parameter kunnr values to be passed it must give name1 details according to the customer number...
    how to write the logic in source code....
    Regards,
    Thiru. R

    1. First of all create function group.
    2. Create function module using this function group.
    3. If only one kunnr is needed at a time, create import parameter for it. But if many kunnr to be entered at a time,use table.
    4. Fetch name1 for each kunnr from KNA1 table.
    "->> if many kunnr
    if not t_kunnr[] is initial.
    select kunnr as kunnr name1 as name1
    into table t_kunnr_name1
    from kna1
    for all entried in table t_kunnr
    where kunnr = t_kunnr-kunnr.
    endif.       
    sort t_kunnr_name1 by kunnr name1.
    delete adjacent duplicates from t_kunnr_name1 comparing kunnr name1.
    table t_kunnr_name1 will contain kunnr and its name1.
    I hope logic is clear for you now.
    Regards,
    Aparna

  • 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 create function module step by step

    hi experts,
    i am new to ABAP.
    can anybody tell me the step by step process on how to create a function module for adding two numbers without using editor screen.
    ex: 2+3=5.

    Hi,
    You can only create function modules and function groups using the Function Builder in the ABAP Workbench. For further information, refer to Creating New Function Modules. This section uses an example to illustrate how a function module is created from the point of view of ABAP programming.
    Function Groups and Function Modules:
    Firstly, we create a new function group DEMO_SPFLI to hold the function module. Then, we can create the new function module.
    Parameter Interface:
    You can specify the types of interface parameters in function modules in the
    same way as the parameter interfaces of subroutines. Since function
    modules can be used anywhere in the system, their interfaces can only contain
    references to data types that are declared systemwide. These are the elementary
    ABAP data types, the systemwide generic types, such as ANY TABLE, and types
    defined in the ABAP Dictionary. You cannot use LIKE to refer to data types
    declared in the main program.
    Exceptions:
    Our function module needs an exception that it can trigger if there are no entries
    in table SPFLI that meet the selection criterion. The exception NOT_FOUND
    serves this function.
    Source Code:
    Having defined the parameter interface and exceptions, we can now write the
    source code of our function module. To do this, choose Source code in the
    Function Builder. This opens the ABAP Editor for the include program
    L<fgrp>U<xx> (see Function Groups). This is the include that will
    hold the program code for the function module;
    Data in Function Modules
    You can use the TYPES and DATA statements to create local data types and
    objects. The interface parameters also behave like local data objects. In
    addition, you can access all of the global data of the main program. This data is
    defined in the include program L<fgrp>TOP. To open this include, choose Goto
      Global data. The global data behaves like the instance attributes of a class.
    The first time you call a function module in a particular function group, the data is
    loaded into memory. It can then be accessed and changed by all of the function
    modules in the group. The system retains the values until the next time a function
    module is called.
    Calling Subroutines
    You use subroutines for local modularization. Function modules can
    also use this technique. The function module that they call are defined in the
    corresponding main program.
    If you only want to call a subroutine from a single function module, it is best to
    define them in the same include program as the function module itself, directly
    after the ENDFUNCTION statement. These subroutines can be called from all
    function modules in the function group, but for clarity, they should only be called
    from the function module that precedes them.
    If you want to define a subroutine that will be called from several different function
    modules, you can define a special include program for it with the name
    L<fgrp>F<xx>.
    Raising Exceptions
    There are two ABAP statements for raising exceptions. They can only be used in
    function modules:
    RAISE <except>.
    and
    MESSAGE..... RAISING <except>.
    The effect of these statements depends on whether the calling program handles
    the exception or not. If the name <except> of the exception or OTHERS occurs
    in the EXCEPTIONS addition of the CALL FUNCTION statement, the exception is
    handled by the calling program.
    If the calling program does not handle the exception
      The RAISE statement terminates the program and switches to debugging mode.
      The MESSAGE ..... RAISING statement display the specified message. How the
    processing continues depends on the message type.
    If the calling program handles the exception, both statements return control to the
    program. No values are transferred. The MESSAGE ..... RAISING statement
    does not display a message. Instead, it fills the system fields SY-MSGID, SYMSGTY,
    SY-MSGNO, and SY-MSGV1 to SY-MSGV4.
    Source Code of READ_SPFLI_INTO_TABLE
    The entire source code of READ_SPFLI_INTO_TABLE looks like this:
    FUNCTION READ_SPFLI_INTO_TABLE.
    ""Local interface:
    *" IMPORTING
    *" VALUE(ID) LIKE SPFLI-CARRID DEFAULT 'LH '
    *" EXPORTING
    *" VALUE(ITAB) TYPE SPFLI_TAB
    *" EXCEPTIONS
    *" NOT_FOUND
    SELECT * FROM SPFLI INTO TABLE ITAB WHERE CARRID = ID.
    IF SY-SUBRC NE 0.
    MESSAGE E007(AT) RAISING NOT_FOUND.
    ENDIF.
    ENDFUNCTION.
    The function module reads all of the data from the database table SPFLI where
    the key field CARRID is equal to the import parameter ID and places the entries
    that it finds into the internal table SPFLI_TAB. If it cannot find any entries, the
    exception NOT_FOUND is triggered using MESSAGE...RAISING. Otherwise, the
    table is passed to the caller as an exporting parameter.
    Regards,
    Chandru

  • How to create function module in real time

    hi experts,
    can somebody explain a real time requiremwnt , to create a function module.
    its very urgent.
    i want elaborately.
    regards,
    subhasis.

    hi,
    In real time
    1. as per my knowledge we create function modules to Inbound IDOC /outbound processing..
    2.Interface between a program..
      Example we need to take some data from a report say materials and plant and process some bapi and return logfiles to the report we can use FM here too.
    To create a function module
    First you need to create a function group (function group holds a number of function modules relevant)
    SE37>goto>function groups-->create group ..click this create group..
    Now in the pop up enter the function groupname Eg: ZW_FG1 plus short text and saveit
    Now again goto SE37--> enter new Function module name eg:ZW_FM1
    and press F5.
    Now again a popup you need to enter
    function group name : ZW_FG1
    and short test and save it..
    Now the Function module is created under the Function group ZW_FG1.
    write your export import table parameters and you source code.
    rewards if useful
    regards,
    nazeer
    Message was edited by:
            nazeer shaik

  • How to create function module to update z tables?

    Hi,
    I am new to ABAP. I checked the forum but did not find relevant solutions.
    I have 2 z tables - ZFLIGHT and ZCUSTOMER. I have a few entries in each table.
    I want to write a report to update the entries in the table using function modules. For that I have created a function module - zflight_fm and also a function group- zflight_fg and assigned the function group to the Fm. I do not know how to proceed further, what to put as import, export parameters, tables, changing etc. Further I want exceptions to handle the successful update of the entries.
    Thanks and regards,
    Smruthi

    Steps:
    1) Changing --->a) Zflight TYPE ZFLIGHT(DDIC Ref) OR  Zflight TYPE  ANY TABLE
                           b) ZCustomer TYPE ZFLIGHT(DDIC Ref) OR  ZCustomer TYPE  ANY TABLE
    2) Execptions:
         a) Upload_failed_Flight
         b) Upload_Failed_Customer
    3) Exporting ---> a) Information what rows are uploaded
    Source Code:
    Insert Zflight from Zflight(changing parameter).
    If insert failed
    RAISE  Upload_failed_Flight.
    endif.
    Insert ZCustomer from ZCustomer(changing parameter).
    If insert failed
    RAISE  Upload_failed_Customer.
    endif.
    Regards,
    Gurpreet

  • How to Create Function Module BAPI_GETGLACCPERIODBALANCES Carry Forward

    Dear All,
    In SAP there is a Function Module BAPI_GETGLACCPERIODBALANCES to carry forward balance GL account. But in this case GL account (Balance Sheet) that i used (BS200150)  using IO Number as is cost object, I want to know if there is a function module standard provide by SAP that can get carry forward balance the GL account per IO Number if in the Year End Closing , we run T-code F.16 to carry forward balance  that posting in previous fiscal year, or we have to create a new function module, how to create it?
    Kindly help with this issue
    Thanks,
    Regards
    Aries S

    Yes, I tried passing constant '10.000', but still quantity is not getting updated.
    My code is:
      CALL FUNCTION 'BAPI_CUSTOMERRETURN_CREATE'
        EXPORTING
      SALESDOCUMENTIN               =
          RETURN_HEADER_IN              = RETURN_HEADER_IN
          RETURN_HEADER_INX             = RETURN_HEADER_INX
      SENDER                        =
      BINARY_RELATIONSHIPTYPE       = 'VORA'
      INT_NUMBER_ASSIGNMENT         =
      BEHAVE_WHEN_ERROR             =
      LOGIC_SWITCH                  =
      TESTRUN                       =
      CONVERT                       = ' '
       IMPORTING
         SALESDOCUMENT                 = SALESDOCUMENT
        TABLES
         RETURN                        =  RETURN
         RETURN_ITEMS_IN               = RETURN_ITEMS_IN
         RETURN_ITEMS_INX              = RETURN_ITEMS_INX
         RETURN_PARTNERS               =  RETURN_PARTNERS
        RETURN_SCHEDULES_IN           = RETURN_SCHEDULES_IN
        RETURN_SCHEDULES_INX          = RETURN_SCHEDULES_INX
      RETURN_CONDITIONS_IN          =
      RETURN_CFGS_REF               =
      RETURN_CFGS_INST              =
      RETURN_CFGS_PART_OF           =
      RETURN_CFGS_VALUE             =
      RETURN_CFGS_BLOB              =
      RETURN_CFGS_VK                =
      RETURN_CFGS_REFINST           =
      RETURN_TEXT                   =
      RETURN_KEYS                   =
      EXTENSIONIN                   =
      PARTNERADDRESSES              =

  • How to create Function Module with TABLE parameter (for internal table)

    Hi Guys,
    I am trying to create a function module by using TABLE parameter. I have to pass an internal table to this function module for processing.
    But it saying : TABLES parameters are obsolete!
    And I am not going further.
    Please suggest any work arround.
    Thanks

    Hi,
    create a table type in SE11..
    Then use that in your function module importing/exporting/changing parameter for passing internal tables..
    Thanks,
    Naren

  • How to delete Thr created functional module dynamically

    Hi All,
    How to delete Thr created functional module dynamically
    Regards,
    Lisa
    Message was edited by:
            Lisa Roy

    Hi,
    You can use the function module RS_FUNCTION_DELETE to do that.
    Make sure you are not deleting any standard FM's.
    Example
          call function 'RS_FUNCTION_DELETE'
               exporting
                    funcname          = 'ZFM_NAME" " Function modue name
                    suppress_popups   = 'X' " TO suppress any pop-ups that come when you delete
               exceptions
                    error_message     = 1
                    cancelled         = 2
                    function_released = 3
                    others            = 4.
    Regards,
    Sesh

  • Doubt in  export, import and table para when creating Function Module

    Dear fellow ABAPers,
    I have a doubt in defining export, import and table parameter while creating a function module.
    I am calling a function module inside a user exit. Now in the user exit the SAP fills an internal table called i_lfa1 with all the data user has eneterd.
    Now I want to pass this whole internal table to function module and the perform some checks on the values of internal table.
    After that function module fills an error structure with values depending on some check.
    1)
    How do I pass this internal table to function module ? 
    When I am creating function module in se37 where do I define this iternal table type ? Is it in Import or Table parameter during function module creation?
    2)
    Where do I define error structure type (which is returned by function module to main program)? Is it in Export or table parameter during function module creation?
    Please clear my doubt..
    Relevant points will be awarded.
    Regards,
    Tushar.

    Hi Tushar,
    1. How do I pass this internal table to function module ?
       I assume u are creating your own Y/Z FM.
       Pass it thru TABLES parameter.
    2. When I am creating function module in se37 where do I define this iternal table type
       Define this in TABLES interface.
       What Type ?
       THE SAME TYPE WHICH HAS BEEN DEFINED
        WHILE PASSING IN THE USER-EXIT FUNCTION MODULE.
       IF U SEE THE FM OF THE USER-EXIT,
       U WILL COME TO KNOW.
    3.
    Where do I define error structure type (which is returned by function module to main program)? Is it in Export or table parameter during function module creation?
    Define it in TABLES interace. (not in export, import)
      (Since what u are going to return is an internal table)
      U can take for eg. BDCMSGCOLL.
      OR u can create your own Y/Z structure
    for the same purpose.
      (or u can use the structure type T100)
    I hope it helps.
    Regards,
    Amit M.

  • How to assign function module with process code in IDOC ?

    how to assign function module with process code in IDOC ? and what code i have to write in that function module for custom IDOC ?
    helpful answer will be rewarded?

    Hi,
    First goto transaction we42 -->editing mode --> new entries -->give name of your process code and description --> processing with alv service and function module -->then press enter -->after that enter the name of the function module you want to associate from the drop down and save it.
    Thats the way to assign function module with process code.
    In that process code we will have the Function modules and Bapi's which will take the data which we are sending through IDOC and then process it.
    for example: i am triggering the IDOC for every purchase order created then this process code in the receiver system will take the data which i have enetered in the sender system to create the purchase order and process it and creates the same purchase order in the receiver's system.
    Reward if helpful.
    with regards,
    Syed

  • How to Debug Functional Module called via RFC?

    Hi Experts,
         Please, can someone explain to me how to debug functional module that is called via RFC? Thanks in advance.
      Best Regards,
    Aleksandar

    Hi Laxman,
       First of all thank you very much for giving attention to my post. Ok, I am trying to debug function module in RM-CA (FICA), function module is called by CRM system (via RFC) and in addition all this chain is triggered by WebClient.
         I have user that can login on the CRM as well as on RM-CA (ECC 6.0) system, but those users are different (unfortunately I do not have administration permission so I can’t change profiles of my users but I can ask for it). I can without any problem debug calls that come from WebClient, so setting an external break point in CRM system I can catch whatever I want but when process comes to point where actually call to back-end (RM-CA) takes place I simply can’t get into functional module, that resides on RM-CA side. Actually what happens is that processing continues as was chosen ‘NEXT STEP’ (F6).
         To resume, two systems and two different users. Where XCM user should be created? (on RM-CA system or CRM). Should I change something in Menu option Utilities -> Settings -> ABAP Editor tab -> Debugging tab, in field users?  If you need any additional info please tell me.
      Thanks again for your support.
    Aleksandar

  • How to create a module pool program

    Dear Guru
    I want to know know how to create a module pool program from se80 step by step. I want to know the steps where i will get the four includes like form routines, PAI, PBO, and global data please its very urgent.
    Thanks & regards
    Saifur Rahaman

    hi Saifur Rahaman,
    goto se80 then click find program,
    next u want any name of the program enter as,
    Attribute type as find Module pool click it.
    next u want any package and save and activate.
    program name with create screen with any number then
    click layout and u want any object and save , actived.
    click flow logic , four types as PBO and PAI and POV, POH.
    PBO---> Trigger is before screen.
    its applied for display screen and inactive or no display screen only
    PAI--->Trigger is after screen
    when u want button then its processed.
    POV--> Value requested for F4.
    POH-->Help requested for F1.
    Reward if useful,
    S.Suresh.

  • HOW TO CALL FUNCTION MODULE INSIDE SMARTFORM

    PLEASE ANYONE TELL ME, ABOUT  HOW TO CALL FUNCTION MODULE INSIDE SMARTFORM. IT IS VERY URGENT!!!!!!!!!1

    Hi,
      Under Global Definitions, we have 'Form Routines' tab. Under this tab, u can have a dynamic subroutine call. With in FORM and ENDFORM, you can call the Function Module.With in the Program Lines editor, u can define the subroutine........PERFORM. 
    If helpful, reward points.
    Rgds,
    CK

  • How to Use Function Module READ_TEXT

    Hi
    Anyone give me code or link or example for how to use function module READ_TEXT
    and what are the parameters which we have to pass in module.
    Regards.
    Mohsin

    Hi,
    refer the given below code.
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
       CLIENT                        = SY-MANDT
        id                            = 'KOPF'uF0E0 these details we will get thru transaction , where we enter these details.
        language                      = 'EN'uF0E0 these details we will get thru transaction , where we enter these details.
        name                          = TNAME  "table name
        object                        = 'AUFK'    " these details we will get thru transaction , where we enter these details.
    *   ARCHIVE_HANDLE                = 0
    *   LOCAL_CAT                     = ' '
    IMPORTING
       HEADER                        = HTEXT
      tables
        lines                          = LTEXT
    * EXCEPTIONS
    *   ID                            = 1
    *   LANGUAGE                      = 2
    *   NAME                          = 3
    *   NOT_FOUND                     = 4
    *   OBJECT                        = 5
    *   REFERENCE_CHECK               = 6
    *   WRONG_ACCESS_TO_ARCHIVE       = 7
    *   OTHERS                        = 8
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Thanks
    Arun

Maybe you are looking for

  • Photoshop elements 10 animated gifs show one layer only

    I don't like this new version of photoshop elements (photoshop elements 10). When I try to edit an animated gif file, it says I can only view one layer and the rest will be lost. Why is this?

  • How to get rid of a thousand Samsung android modem entries in my network setup?

    I noticed my system settings had become extremely slow to come up when I reconfigured my home network. When it finally came up I found literally 1000 identical Samsung android modem entries in my network settings. I deleted out about 30 but there's g

  • Asset Evaluation.

    Hi All, Iam new to sap. what is th Asset Evaluation. how to enter in sap. plse tell anyone with step wise. Thanks,

  • Steps to create a planning folder in detail.

    hai friends,              i am new to BPS .i want to create a planning folder.so i need detail steps and documentation. Thankyou, shankar.

  • Universe design guidelines

    Hello Friends, For new customers implementing webi on OLTP systems, is there any basic guidelines to refer. Some of the questions that arise are: 1. How many universes on an avergae would a companies have and maintain if implemented on OLTP system us