Diff b/w BAPI and Function Module.

What is the difference between BAPI and Function Module....
By Interface programming do we mean posting data thru  BAPI,BDC....

Hi Alex,
BAPI: Standard Interface in the R/3 system that allows the system to communicate with components of other business suites.
FM: These are the procedures that are defined in the Function Groups and can be called from any ABAP Program. FM allow you to encapsulate and reuse global functions int he R/3 system.
The main basic difference between BAPI and FM are
1) All BAPIs are FM but not all FMs are BAPIs
2) BAPIs are remote enabled
3) BAPIs interface will not have a changing and exceptions. They can not be used to have use dialog.
Interface programs can post data to SAP either through a BDC, BAPI, IDOC etc. It depends on the type of requirement.
Hope this solves your question.
Enjoy SAP
Rajasekhar

Similar Messages

  • Difference between bapi and function module

    Can you guys tell me what are the differences in calling bapis and function modules?
    I see we are calling both as the same way we call function modules. May be for bapis, we need to be careful in declaring and passing those exact structures. Can you please make it clear reg. the differences between them?
    I appreciate it.
    Thanks!

    HI,
    See these links on help.sap.com
    <b>For BAPI:</b>
    The data entered in the Internet is transferred to the R/3 System via BAPIs (Business Application Programming Interfaces).
    Data in the R/3 System is accessed via BAPIs as well.
    A Good Site for BAPI's
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    http://help.sap.com/saphelp_erp2005/helpdata/en/7c/3ce38765ba11d395fe00a0c94260a5/frameset.htm
    <b>For Function Module:</b>
    The important use of functional module is it is used by Enhancements.
    SAP Enhancements are used to expand the standard functionality within SAP.
    Enhancements use function modules and are called from the standard SAP code.
    http://help.sap.com/saphelp_erp2005/helpdata/en/41/7af4daa79e11d1950f0000e82de14a/frameset.htm
    List of functional modules ( Good Site)
    http://www.geocities.com/victorav15/sapr3/abapfun.html
    Hope it helps!!!!
    Thanks
    Sudheer

  • Bapis and function modules

    Hi all,
    I need bapis and standard function modules used for shipment change and transportation . could any one of you give me.
    Thanks

    pls try this bapis
    BAPI_OUTB_DELIVERY_CHANGE
    BAPI_SHIPMENT_CHANGE
    it will work

  • CATS BAPI and Functional Module

    The BAPI list given here is used for transferring the data from CATS to HR.
    BAPI_CATIMESHEETMGR_INSERT -To Create Data records into CATS DB
    BAPI_CATIMESHEETMGR_DELETE -To Delete Data records in CATS DB
    BAPI_CATIMESHEETMGR_CHANGE - To change/edit existing Data records in CATS DB
    BAPI_CATIMESHEETRECORD_GETLIST - To Display Data records in CATS DB
    BAPI_CATIMESHEETRECORD_GETLIST Time Sheet: Data Record List
    BAPIEMPLOYEECATS BAPIs for BUS 7025
    BAPI_EECATIMESHEET_GETWORKLIST Time Sheet: Read Worklist
    Can you explain me what is FM for and what role it plays for BAPI.
    thanks
    Sunny

    hi
    BAPI is a function module used in specific cases and they are better
    in those particular ones cause they make many checks, so if you have two
    options: a function module and a BAPI i�d tell you to use a BAPI.
    If you have any other doubts about some BAPIS in particular, be sure to use
    transaction BAPI
    they have great documentation there.
    regards
    kunal

  • Bapi and Function Module

    Hi,
    I'm working on some PM realted stuff, in which i need to use BAPI_ALM_ORDER_GET_DETAIL
    where i need some fields from export parameters, giving the input as order number.
    But it is exporting a structure, so i'm not sure how to get the fields from the structure(i.e,
    How to retrive data from the structure ),
    since i could get data only from table or internal table.
    SO please guide me in getting data from this structure
    Or how can i assign this structure to the Interanl table or some how to retrive data.
    In short guide me how to use this function module, to retrive data like order type, location, plant and many other stuff.
    Thanks and regards
    Rich

    if the exporting parameters are like structure, it means its header data.
    Define any structure as type of BAPI structure. use the function module. you will have all the header data in that structure. Structure means a single string of data with different components. So you can use this data directly.
    e.g.
    ES_HEADER structure, you want to use plant field.
    Simply use it as   ES_HEADER-PLANPLANT

  • BAPI or Function Module to get open orders and open quotation details

    Hi,
    I have requirement to get all the open orders(as in VA05) and all the open quotations( as in VA25) for a sold-to-party. Could you please let me know if there are any BAPIs or Function Modules for the same.
    Thanks,
    Surekha.

    Hi,
    Check if the below helps:
    1.  BAPI_SALESORDER_GETLIST for VA05
    2. BAPI_QUOTATION_GETDETAILBOS for VA25.
    Regards,
    Vivek

  • BAPI or Function Module for F-53 and FBZ1

    Hi Gurus,
    I am currently executing two transactions F-53 and FBZ1. I would like to know if there are any read BAPIs or function modules that take BELNR_D(Document Number) and Company code and Fiscal Year as input and give the rest of the details I enter in these transactions like, partial payment, residual payment.
    Kindly help.
    Many Regards,
    Sagar

    Hi, Sagar:
    Nice to see your thread here
    No matter what kind of transactions you are using, finally, there will be a document posted in General Ledger Accounting, which is what you want. So to read the result, you can always try function module, like FI_DOCUMENT_READ.
    Hope it will help.
    Best Regards, Lawrence

  • I need to know thelist of bapi's and function modules used for transaction

    I need to know thelist of bapi's and function modules used for transaction in order to use these FM or BAPI in reading some fields of equipment master and functional loocation.Can any one suggest me some methods...or do i need to write  a report for the same.

    Steps to find the BAPI/function modules used in a transaction
    1) Find the package of the transaction thro' SE93.
    For example the package for the transaction VA03 is VA
    2) Go to Se80, key-in the package (say VA)
    3) You can see the function modules under the folder finction group and
    you can see the BAPI's under the folder Business Engineering-> Business Objects-> double click on the released methods of the Business Objects

  • To know thelist of bapi's and function modules used for transaction IH10

    I need to know thelist of bapi's and function modules used for transaction in order to use these FM or BAPI in reading some fields of equipment master and functional loocation.Can any one suggest me some methods...or do i need to write a report for the same.

    hi,
    provide report name (here: RIEQUI20)
    goto se38 - utilities - cross reference - function modules
    or use report RPR_ABAP_SOURCE_SCAN
    with search string call function
    A.
    Message was edited by:
            Andreas Mann

  • In LSMW, what is diff between LSMW-BAPI and LSMW-IDOC

    hello all
    In LSMW, what is diff between LSMW-BAPI and LSMW-IDOC

    Hi Swamy,
    The differences between IDoc and BAPI are as follows: 
    IDOC
    IDocs are text encoded documents with a rigid structure that are used to exchange data between R/3 and a foreign system.
    Idocs are processed asynchronously and no information whatsoever is returned to the client.
    The target system need not be always online. The IDOC would be created and would send the IDOC once the target system is available (tRFC concept). Hence supports guaranteed delivery.
    With asynchronous links the sub-process on the client can be finished even if the communication line or the server is not available. In this case the message is stored in the database and the communication can be done later.
    The disadvantage of asynchronous links is that the sub-process on the server cannot return information to the calling sub-process on the client. A special way for sending information back to the client is required. In addition, a special error handling mechanism is required to handle errors on the receiving side.
    IDOCs may be more changeable from release to release.
    IDOCs  are poorly documented.
    BAPI
    BAPIs are a subset of the RFC-enabled function modules, especially designed as Application Programming Interface (API) to the SAP business object, or in other words: are function modules officially released by SAP to be called from external programs.
    BAPIs are called synchronously and (usually) return information.
    For BAPIs the client code needs to do the appropriate error handling.
    Problems with synchronous links occur if the communication line or the server is temporarily not available. If this happens, the sub-process on the client cannot be finished (otherwise there would be data inconsistencies).
    Synchronous links have the advantage that the sub-process on the server can return values to the sub-process on the client that has started the link.
    BAPIs are not totally immune to upgrades.
    BAPIs are reasonably well documented.
    Reward points if useful.
    Best Regards,
    Sekhar

  • Is there any BAPI or function module  to delete entries from a table (VBAK)

    Hi Everybody,
    this is my first thread in SDN...
    my problem follows...
    A report is be created that selects all sales orders created by e-Sales that are more than 20 minutes old and still have a delivery block:
    tables:
    VBAK     sales document: header data
    selection fields:
    VBAK-LIFSK      &#8800;     <BLANK>
    VBAK-ERNAM     =     userID used by e-Sales / IVE
              (EP-BATCH / EAI-BATCH)
    VBAK-ERDAT      <=     Current system Date
    VBAK-ERZET     <=     Current system Time - 20 minutes
    These orders should be deleted from SAP system.
    This report should be scheduled to run regularly every 10 minutes.
    my doubt : is ther any BAPI or Function module to delete entries from a standard table...if no what is the way to delete the enteries from a std table...
    best replies will be rewarded....
    regards
    Reddy

    Hi Vasanth ,
    thanks for your reply.
    i tried in the same manner what u mentioned.
    but how to pass only one parameter to the functionmodule..
    here in this case we have to pass only update flag as 'D'..
    i did the same it giving dump..
    An exception occurred that is explained in detail below.                          
    The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was      
      not caught and                                                                   
    therefore caused a runtime error.                                                 
    The reason for the exception is:                                                  
    The call to the function module "BAPI_SALESORDER_CHANGE" is incorrect:                                                                               
    In the function module interface, you can specify only                            
    fields of a specific type and length under "ORDER_HEADER_INX".                    
    Although the currently specified field                                            
    "INT_ORDER_HEADER_INX" is the correct type, its length is incorrect.              
    my pgm :
    *& Report  YNEW_ORDER_DELETION
    REPORT  ynew_order_deletion.
    TABLES:vbak.
    PARAMETERS:
         p_lifsk LIKE vbak-lifsk DEFAULT '02'.
    SELECT-OPTIONS:
       s_lifsk FOR vbak-lifsk DEFAULT '10',
        s_ernam FOR vbak-ernam,
        s_erdat FOR vbak-erdat,"DEFAULT sy-datum.
        s_erzet FOR sy-uzeit.
    *PARAMETERS:
    p_erzet LIKE sy-uzeit.
       s_erdat like vbak-erdat,
       s_erzet like vbak-erzet.
    DATA:
       BEGIN OF int_final OCCURS 0,
            w_vbeln TYPE vbak-vbeln,
       END OF int_final.
    DATA:
      int_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
    DATA: int_order_header_inx LIKE bapisditmx OCCURS 0 WITH HEADER LINE.
    DATA:
      wf_time TYPE sy-uzeit.
    INITIALIZATION.
      s_ernam-low = 'KULKARMA'.
      s_ernam-sign = 'I'.
      s_ernam-option = 'EQ'.
      APPEND s_ernam.
    s_ernam-low = 'EAI-BATCH'.
    s_ernam-sign = 'I'.
    s_ernam-option = 'EQ'.
    APPEND s_ernam.
    wf_time = sy-uzeit - 1200.
    p_erzet = sy-uzeit - 1200.
    p_erzet-low = wf_time.
    APPEND s_erzet.
      int_order_header_inx-updateflag = 'D'.
      APPEND int_order_header_inx.
    START-OF-SELECTION.
      SELECT vbeln FROM vbak
                       INTO TABLE int_final
                       WHERE lifsk EQ p_lifsk
                         AND ernam IN s_ernam
                         AND erdat IN s_erdat
                         AND erzet IN s_erzet.
      IF sy-subrc = 0.
        LOOP AT int_final.
          CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
            EXPORTING
              salesdocument         = int_final-w_vbeln
      ORDER_HEADER_IN             =
        order_header_inx            = int_order_header_inx
      SIMULATION                  =
      BEHAVE_WHEN_ERROR           = ' '
      INT_NUMBER_ASSIGNMENT       = ' '
      LOGIC_SWITCH                =
      NO_STATUS_BUF_INIT          = ' '
            TABLES
              return                      = int_return
      ORDER_ITEM_IN               =
      ORDER_ITEM_INX              =
      PARTNERS                    =
      PARTNERCHANGES              =
      PARTNERADDRESSES            =
      ORDER_CFGS_REF              =
      ORDER_CFGS_INST             =
      ORDER_CFGS_PART_OF          =
      ORDER_CFGS_VALUE            =
      ORDER_CFGS_BLOB             =
      ORDER_CFGS_VK               =
      ORDER_CFGS_REFINST          =
      SCHEDULE_LINES              =
      SCHEDULE_LINESX             =
      ORDER_TEXT                  =
      ORDER_KEYS                  =
      CONDITIONS_IN               =
      CONDITIONS_INX              =
      EXTENSIONIN                 =
        ENDLOOP.
        LOOP AT int_return.
          WRITE:/ int_return-type,
                  int_return-id,
                  int_return-number,
                  int_return-message.
        ENDLOOP.
      ENDIF.
    please help me ..its a very urgent issue to be solved...
    am waiting for ur reply...
    regards
    gangareddy

  • Standard BAPI or Function Module for FB01posting

    Hi Experts,
    My requirement is as follows.
    Invoice details would be sent across from Middleware to SAP and for which I have developed a Custom Remote Enabled Function Module. The Function Module needs to post the data using FB01 Transaction.
    I had planned for recording a BDC for FB01 and post the data, however, we are on the verge of getting upgraded from 4.7 to ECC 6.0. To avoid problems that we might face for change of screens in ECC 6.0, I would prefer using a BAPI or Function Module for FB01 posting, if available, instead of BDC.
    Data coming from Middleware are as follows.
    HEADER:
    BKPF-BLDAT :  Document Date
    BKPF-BUDAT : Posting Date
    BKPF-XBLNR: Reference (Invoice#)
    BKPF-BLART : Document Type
    BKPF-BUKRS : Company Code
    BKPF-BKTXT : DocHeader Text
    BKPF-WAERS : Currency
    LINE ITEM:
    BSEG-LIFNR : Vendor no
    BSEG-WRBTR - Total amt -Debit/Credit -Vendor
    BSEG-ZUONR : Assignment field
    BSEG-EMPFB : Alternative Payee
    BSEG-UZAWE : Payment Method Supplement
    BSEG-ZTERM : Pmt terms
    BSEG-KOSTL : Costcenter
    BSEG-HKONT : GL AccountNumber
    BSEG-WRBTR : Amount for GL
    BSEG-SGTXT : Line item text
    The Vendor Line Item would be one where as GL line items could me more than one.
    Can any of you suggest me a standard BAPI or Func Mod?
    Points will be awarded for valuable inputs.
    Thanks to all!!!!

    You can use RFBIBL00 program for FB01 postings. Go through the program help on how to use this program.
    This program requires a file to be on application server in a certain format.
    You may also refer the program RFBIBLT0 on how the file format should be.
    Hope this helps.
    Thanks,
    SKJ

  • BAPI or Function Module for F-22

    Hi I am working on one scenario. I am clearing the document using F-30 transaction in one company code and Posting the same document in other company code using F-22. I need to know whether it posts successfully or not using F-22 before I clear the document so that I can stop this from clearing. I can not do this simply using  the BDC. Here I need a BAPI or function module to have a check whether it will post successfully or not using F-22 before I clear the document using F-30.
    Please help me to find the right BAPI or Function Module here.
    Thanks,
    Ravi.

    Hi Eswar,
    BAPI_ACC_DOCUMENT_POST  works only for 2 line postings. But we can make it work for one line by implementing BTERWBAPI01.
    Here you will be passing ACCHD-GLVOR = RFST
    ACCIT-BSTAT = S
    ACCIT-BSCHL = 39
    ACCIT-UMSKZ = F
    ACCIT-ZUMSK = Z
    could you please share the code that you have implemented in BTE?
    please share the sample code that you have done for BAPI.Because I also have the same requirement for f-47.
    Regards,
    xavier.P

  • Help required in bapi or function module..

    Hi,
    Is there any BAPI or Function Module to get cost center description by giving cost center as input parameter? please suggest me.Thanks in advance.
    Regards,
    Sandy.

    Hi,
    write a simple select query instead of FM or BAPI.
    select single ltext
    into lv_ltext
    from cskt
    where spras = sy-langu
    and kokrs = lv_kokrs           " put your controlling area
    and kostl = lv_kostl             "put your cost center
    and datbi = lv_datbi.          "put your valid-to date
    Thanks,
    Srilakshmi.
    Edited by: Srilakshmi Moola Ram on Sep 17, 2009 7:19 AM

  • BAPI or function module to change Assignmnet no. (ZUONR) of T code FB02.??

    dear all
    is there any BAPI or function module to change Assignmnet no. (ZUONR) of T code FB02.
    i want to change it in a mass.
    i have tried FI_ITEMS_MASS_CHANGE but its not working...is there any way to do BDC for the same...
    or we can give any condition in BDC to read any particular line item details..actually i have to double click on vendor line item and there i have to change the asignment field text.
    pls help...
    jigar p

    Check the Post
    Any BAPI for "FB02"
    Code is given how to use FI_ITEMS_MASS_CHANGE .
    Regards,
    Abhishek

Maybe you are looking for

  • How do i upload files from my pc to my phone

    I downloaded blackberry link but that is only for switching files between phones. Can someone Please help me with this ?

  • Issue using an INSTEAD OF trigger

    Hi Guys, I've not posted in here before so please tell me if i'm asking too much or just not doing something right. I have created the following view which will compile ok: DROP VIEW book_cust_vu; CREATE VIEW book_cust_vu AS SELECT c.cust_id, c.name,

  • Install Base Accounting Class code

    Hi, Iam using api csi_item_instance_pub.update_item_instance for updating Install base instance. Iam able to update the partyid, account id but not accounting class code. Can anyone please help me how to update accounting class code along with party

  • Partitioning disk

    With a Mac Mini with Intel processor, I am considering partitioning my hard drive into three parts--one for Mac OSx10.4, one for WinXP Home (using Boot Camp), and one for common data storage. Anyone ever tried this particular configuration? Any advic

  • REP-1510 Group manager unable to compute column

    Hai all, I am using oracle 6i report builder.I have created a matrix report with different type of grouping and i tried to add a slno in the matrix report.I used summary column for showing the Serial Number but the serial number is showing on the rep