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

diff between normal function moudle and bapi?

please help me out for this question

Add comment
10|10000 characters needed characters exceeded

4 Answers

  • Posted on Sep 26, 2007 at 09:19 PM

    a BAPI (Business Aplication Programming Interface) is a standardized programming interface tat facilitates internal and external acces to bussines processes and data in SAP systems.BAPI as RFC-enabled fuction module.

    Normal fuction module can be RFC, but BAPIs are defined in the Business Object Repository (BOR) as methods of SAP Business Objects or SAP Interface Types and are implemented as function modules. The separation of a BAPI definition from its actual implementation enables you to access a BAPI in two ways:

    • You can call the BAPI in the BOR through object-oriented method calls

    • You can make RFC calls to the function module on which the BAPI is based

    BAPIs, which represent methods for business objects in SAP system, are used in a variety of contexts:

    - To link business processes across system boundaries (check ALE)

    - Used by SAP to integrate varius solution in the framework of mySAP Business Suite

    - To connect an SAP system to the Internet

    - Used in conjuction with SAP Business Workflow

    - To connect to external programs

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 26, 2007 at 10:14 PM

    Hello Reddy

    BAPIs allow us to access SAP business objects from external systems. For example, masterial master data are probably the most important business object in logistics.

    If you want to change the plant assignment of a material you call (in dialog) transaction MM02 and change the material.

    You can achieve the same using BAPI_MATERIAL_SAVEDATA (IMPORTING parameter PLANTDATA & PLANTDATAX).

    Thus, I like to describe BAPIs as <i><b>"transaction or dialog WITHOUT dialog"</b></i>. Looking under the hood you will see that BAPI_MATERIAL_SAVEDATA uses many "normal" function modules each of which performs a part of the entire BAPI function. The BAPI orchestrates all these function modules.

    Now if it were your task to change plant data of a material you may find a normal function module which allows to update table MARC directly. However, you have no clue whether these changes have to be propagated to other tables. In the worst case you may end up with "destroyed" material master data.

    Thus, if your task is to alter SAP business objects (e.g. material, SAP user, purchase order, invoice, ...) from external system never ever think of using any of these low-level function modules but always search for a BAPI.

    <b>COMMIT WORK: </b>

    Normal function modules which update tables may contain a COMMIT WORK statement. BAPIs should not perform any commit work. If the BAPI call was successful (see below) then call BAPI_TRANSACTION_COMMIT (or BAPI_TRANSACTION_ROLLBACK in case of failure).


    Normal function modules can raise exceptions. BAPIs will never raise any exception because this would cause the RFC connection to be broken leaving the caller behind without any messages. Therefore BAPIs collect messages and return them in a RETURN parameter (BAPIRET2 or its corresponding table type).

    In case of success BAPIs may return an S-message but some do not return any message. Use the following coding to check the success or failure of a BAPI call:

                     WHERE ( type CA 'AEX' ).  " (A)bort, (E)error, (X)dump
      IF ( syst-subrc = 0 ).
            DESTINATION '<rfc_destination>'.
            DESTINATION '<rfc_destination>'
             wait = 'X'.  " synchronous



    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 27, 2007 at 07:04 AM


    <b>Some important differences:</b>

    BAPI Function module must be Remote enabled(Only pass by value Parameters allowed).

    BAPI Function module cannot have Exceptions.

    BAPI Function module must have a parameter called RETURN type BAPIRETURN to return the messages .

    BAPI Function module cannot have any statements like



    reward if Helpful.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 28, 2007 at 04:03 AM
    "Remote Function Call

    Call of a function module that runs in a different system (destination) as the calling program. Possibilities include connections between different SAP systems or connections between an SAP and an external system. Specially programmed functions, whose interface simulates a function module, are called in external systems instead of function modules. There are synchronous, asynchronous, and transactional function calls. The system is called up using the RFC interface.

    "Business Application Programming Interface

    (BAPI) Predefined interface to data and processes in an SAP application, which is stored in the Business Object Repository with the basic functions Create Objects, Query Object Properties, and Change Object Properties. BAPIs are implemented using function modules with the naming convention BAPI_<business_object_name>_<method_name> that can be called remotely and that cannot run a user dialog. The BAPI Explorer, which lists the function modules for each application, can be accessed with the transaction code BAPI.

    i given all about 3 FM ( normal functin module and RFC BAPI )

    see here what u have to observe is normal function module we can't connect with other systems and it will not work like interfaces but remaining to it will useful to connect with external systems and as well as with SAP systems also we can use only in SAP a normal function module is just like include but differnce is include we can't excute but FM we can excute just like reports

    BAPI methods are RFC enabled function modules. The difference between RFc and BAPI are business objects. You create business objects and those are then registered in your BOR (Business Object Repository) which can be accessed outside the SAP system by using some other applications (Non-SAP) such as VB or JAVA. in this case u only specify the business object and its method from external system in BAPI there is no direct system call. while RFC are direct system call.Some BAPIs provide basic functions and can be used for most SAP business object types. These BAPIs should be implemented the same for all business object types. Standardized BAPIs are easier to use and prevent users having to deal with a number of different BAPIs.BAPI is having all Key fields, methods, interfaces etc.

    Reward points if it is usefull..


    Add comment
    10|10000 characters needed characters exceeded