Purpose of bapi

what is the purpose of bapi and how it wil work?pls giv me brief information

<b>BAPI (Business Application Program Interface)</b>
BAPI is a set of interfaces to Object- oriented programming methods that enable a programmer to integrate 3rd party software into the proprietary R/3 product from SAP.
CL_HTTP_CLIENT --- By activating this class we can provide connectivity between R/3 and any other legacy system.
JCO (Java), COM/DCOM (Microsoft) connectors are used.
The adapter provides local transaction support for the BAPI. The following BAPI calls support local transactions
BAPI_TRANSACTION_COMMIT
BAPI_TRANSACTION_ROLLBACK
<b>BAPI Creation</b>
Define a Function Group -- SE37
Write RFC-FM --  SE37
Create an object --  SWO1
Make the FM as an API method within the object.
Transfer Request Release -- SE09
<b>BAPI Types</b>
GetList()
GetDetail()
Create()
Change()
Delete()
Add<subobject> , Remote<subobject>
Replicate() , SaveReplicate()
<b>Some Standard BAPIs</b>
Bapi_salesorder_change
Bapi_salesorder_createfromdat1
Bapi_salesorder_getlist
Bapi_salesorder_getstatus
Bapi_creditcard_check
Bapi_bpcontact_change
Bapi_billingdoc_confirm
Bapi_po_create
Award points if this was helpful
Thanks and regards.

Similar Messages

  • Purpose of BAPI's.....

    anybody can send me the documentation and purpose of using BAPI's. main advantages how to create BAPI's....and send me the sample program with detail explanation...
    thanks in advance.....
    thanks,
    maheedhar.t

    Hi,
    BAPI is used only when it is available for the particular  transaction like Delivery Sales order. but BDC can be used for any 
    transaction which have screen and fields.
    BAPI is directly updated the database instead BDC run through the screen flow.
    So BAPI can't handle all the flow logic checking and enhancement put by programmer to faciliate the user requirement
    BAPI is a higher end usage for tranfering the data from SAP to non-SAP and vice-versa. for ex: if we are using VB application,where in that we want to connect to SAP and retireve the data,and then change and update the data in SAP for that purpose we can use that.
    Apart from that, we can also use it for Uploading/Downloading the data from SAP to Non-SAP like BDC, provided we have an existing  BAPI for that. 
    BAPI function modules will also do all the checks required for data integrity like Transactions for BDC.
    There is one more advantage using BAPI instead of BDC. When we go for upgradation, there might be pozzibility to change the screen elements for transactions depending on the requirement. In that case,our BDC pgm may or may not work (depending on the screen changes they have made). Unless and until we prepare new BDC we cant use the old BDC pgm. But in BAPI, SAP promises that they are going to keep the old BAPI and for new functionality they will provide an upgraded BAPI. Until we write a new BAPI pgm, we can use the exisitng BAPI pgm
    Regards
    Sudheer

  • BAPI - Account Number - Cost Center - Profit Center

    Is there a BAPI which we enter an account number and it outputs the balance filtered by cost centers? We can do this with transaction S_ALR_87013611 but we want to develop a custom report.
    On the other hand, is there a BAPI which we enter an account number and it outputs the balance filtered by profit center? We can do with transaction S_ALR_87013326.
    Thanks in advance.

    the main purpose of BAPIs are that they can be called from external system (RFC type FMs), this is why I asked.
    On the other hand I have no idea about the existance of such BAPI, or other FM.
    Of course you can develop one for you

  • Reg:BAPI RFC

    How to create BAPI-RFC?wht is the purpose of bapi rfc?
    plz send me urgently.........

    Hi,
    Programming a BAPI consists of some tasks like: •Defining BAPI Data structures ( using SE11 )
    •Creating BAPI Function Modules (For each method)
    •Defining BAPI Methods in the BOR
    •Documentation of the BAPI
    •Generate ALE interface for asynchronous BAPIs
    •Generate and release
    NOTE:
    Here we will not be covering the two points – Documentation of BAPI and Generating ALE Interface for asynchronous BAPIs.
    NOTE: You can use the BAPI explorer (T-code BAPI) to get a step-by-step instruction / checklist in how to create a BAPI. In the BAPI explorer select the Project tab.
    EXAMPLE – HOW TO CREATE A BAPI
    In the example we will create a BAPI that reads some information about the line items for a Sales Invoice from table VBRP based on the Invoice No. that is supplied to the import parameter of the BAPI Function Module.
    BAPI Name ZGetInvoiceItems
    Function group ZBAPIVIN
    Function module: ZBAPI_GET_BILL_ITEMS
    FM Import parameters : IV_BILLNO TYPE ZBAPI_BILL_ITEMS-VBELN
    FM Tables :IT_VBRP LIKE ZBAPI_BILL_ITEMS
    FM Export parameters : RETURN LIKE BAPIRETURN
    Defining BAPI Structures
    This is the basic step followed while creating BAPIs. All the relevant structures that are required for BAPI have to be created using T-Code SE11. The structures can be created for Import/Tables parameters. Use Data type -> Structure
    In our case we do not have multiple inputs but just one input i.e. Sales Invoice No. and so we have not made use of any structure for the purpose. But if required, structure can be used for import parameter also.
    The following are the components of structure ZBAPI_BILL_ITEMS:
    Field Name Description
    VBELN Invoice Number
    POSNR Invoice Item Number
    MATNR Material Number
    FKIMG Quantity
    VRKME Sales Units (Quantity)
    NETWR Amount
    Point of Caution
    It is required to define a structure for every parameter in the BAPI and use of same structures which are used in existing applications cannot be done because BAPI structures are frozen when BAPIs are released and then there are restrictions on changing them.
    Screenshot of Structure – ZBAPI_BILL_ITEMS
    Creating BAPI Function Modules (For each method)
    We must create new function group for each BAPI. If the BAPIs are related then the same can be grouped under the same FUNCTION GROUP to enable the sharing of global data amongst the related BAPIs
    Screenshot of Attributes Tab in the FM ZBAPI_BILL_ITEMS
    Screenshot of Import Parameters Tab in the FM ZBAPI_BILL_ITEMS
    Screenshot of Export Parameters Tab in the FM ZBAPI_BILL_ITEMS
    NOTE:
    Since Remote Enabled module processing type is selected and the Import/Export parameters can only be BY VALUE for an RFC enabled function module, select the checkbox for Pass Value for each IMPORT/EXPORT parameter.
    Screenshot of Tables Tab in the FM ZBAPI_BILL_ITEMS
    Code in the Function Module ZBAPI_BILL_ITEMS &
    related Includes in the Function Group
    INCLUDE LZBAPISTATUSUXX
    THIS FILE IS GENERATED BY THE FUNCTION LIBRARY. *
    NEVER CHANGE IT MANUALLY, PLEASE! *
    INCLUDE LZBAPIVINU01.
    "ZBAPI_GET_BILL_ITEMS
    INCLUDE LZBAPIVINTOP “ Global data
    FUNCTION-POOL ZBAPIVIN. "MESSAGE-ID
    TABLES: VBRK, VBRP.
    DATA: T_VBRP LIKE ZBAPI_BILL_ITEMS OCCURS 0.
    STRUCTURE FOR RETURN MESSAGES BY BAPI FUNCTION MODULE
    DATA:
    BEGIN OF MESSAGE,
    MSGTY LIKE SY-MSGTY,
    MSGID LIKE SY-MSGID,
    MSGNO LIKE SY-MSGNO,
    MSGV1 LIKE SY-MSGV1,
    MSGV2 LIKE SY-MSGV2,
    MSGV3 LIKE SY-MSGV3,
    MSGV4 LIKE SY-MSGV4,
    END OF MESSAGE.
    INCLUDE LZBAPIVINU01 - Subroutines
    ***INCLUDE LZBAPIVINU01.
    FUNCTION ZBAPI_GET_BILL_ITEMS.
    ""Local interface:
    *" IMPORTING
    *" VALUE(IV_BILLNO) TYPE VBELN
    *" EXPORTING
    *" VALUE(RETURN) TYPE BAPIRETURN
    *" TABLES
    *" IT_VBRP STRUCTURE ZBAPI_BILL_ITEMS
    Check if the Invoice exists
    select single *
    from vbrk
    where vbeln eq iv_billno.
    if sy-subrc ne 0.
    If not return the error message
    clear message.
    message-msgty = 'E'.
    message-msgid = 'Z3'.
    message-msgno = '001'.
    message-msgv1 = iv_billno.
    perform return_bapi_message using message
    changing return.
    exit.
    endif.
    If the Invoice exists, get all the required item lines information
    in the table it_vbrp
    refresh it_vbrp.
    clear vbrp.
    select vbeln posnr matnr fkimg vrkme netwr
    into table it_vbrp
    from vbrp
    where vbeln eq iv_billno.
    ENDFUNCTION.
    FORM RETURN_BAPI_MESSAGE *
    --> VALUE(IV_MESSAGE) *
    --> XV_RETURN *
    form return_bapi_message using value(iv_message) like message
    changing xv_return like bapireturn.
    check not message is initial.
    call function 'BALW_BAPIRETURN_GET'
    exporting
    type = iv_message-msgty
    cl = iv_message-msgid
    number = iv_message-msgno
    par1 = iv_message-msgv1
    par2 = iv_message-msgv2
    par3 = iv_message-msgv3
    par4 = iv_message-msgv4
    importing
    bapireturn = xv_return
    exceptions
    others = 1.
    endform.
    Regards,
    Vineela.

  • BAPI SRM_RECORD_FIND is for search records in rms?

    Hi everyone
    I want to search records in rms public sector by atributes.
    Is there any bapi for this purpose?
    bapi SRM_RECORD_FIND doesn't returns any table with any results.
    what bapi can I use ?
    thank's in advance

    Hi Seeta Ram,
    Did you pass the table PO_ITEM_SCHEDULES to BAPI_PO_CREATE with the coresponding Item numbers for each item in the table PO_ITEMS?
    Regards,
    Vitz.

  • How can i convert the data from mutiple-table to the other database(MSSQL)?

    Dears,
    How can i convert the data from mutiple-table to the other database such as MS-SQL?
    I have a third party system based on MS-SQL 2000.
    Now we want to make a integration between SAP R/3(Oracle) and SQL server.
    When my user releases the purchase order in R/3, the application we coded will convert the releated data to the temp database on the SQL server.
    But i don't know which tools will help me reach the purpose.  BAPI, LSMW, IDoc... ???
    Would anybody tell me which way is better and how to do?
    Thanks a lot!
    Kevin Wang

    Hello Kevin,
    The question to use which method depend on your detail requirements. If you use BAPI, you need to find which Bapi can provide the data you want. Bapi normally use as a function called by external system. So you need to develop an external program like VB/Java to call this Bapi and move it to SQL. LSMW is use when you want to upload data from an external system to SAP. So it does not serve your requirement. Idoc can be use to export data to an external system. Again like Bapi, you need to find what Idoc can provide the data you want. However, it does not any programming from the external system. If I were you, based on your requirements, I think writing an Abap program that read the data you want and download it to NT/SQL server will be faster and easier.

  • Upload the Special Purpose Ledger Data Using GB01 Application Trough BAPI

    Hi Experts,
    I need to Upload the Special Purpose Ledger Data Using GB01 Application Trough BAPI
    Can anybody help me Which BAPI is available for this application.
    plz give me the Guidence Which steps Should i follow this.
    Thanks Inadvance

    try these
    JV_GB01_DOCUMENT_POST.
    JV_GB01_DIRECT_INPUT this fm is used to to post directly to SPL
    or try BAPI_ACC_DOCUMENT_POST
    BAPI_ACC_GL_POSTING_CHECK
    BAPI_ACC_GL_POSTING_POST

  • How to create sales order using bapi( test purpose)

    Hi all,
           while i was creating sales order using the BAPI_SALESORDER_CREATEFROMDAT1 it is giving some error,
    version 0 is not defined for the fiscal year ****.
    I have given the fallowing parameters as input
    ORDER_HEADER_IN
         DOC_TYPE     OR
                    SALES_ORG  1000
         DISTR_CHAN  10
                    DIVISION         00
    ORDER_PATNERS
         PARTN_ROLE     SP
         PARTN_NUMB     1000
    ORDER_ITEMSIN
         MATERIAL     M-13
    I need to create sample sales order . Please help me how to create sales order with an example( for test purpose).
    Regards
    Deviprasad.

    Hi Prasad,
    Try using BAPI_SALESORDER_CREATEFROMDAT2.
    While creating sales order using FM: BAPI_SALESORDER_CREATEFROMDAT2, please make sure ORDER_ITEMS_IN, ORDER_ITEMS_INX, ORDER_SCHEDULES_IN, ORDER_SCHEDULES_INX.
    Pricing Conditions will not be mandatory to create a sales order via BAPI.
    As you were saying, you can create a sales order but not with items. Do populate the internal tables that i have specified above.
    Also try to pass the item number internally, this will help you in identifying the schedule lines.
    Regards,
    Priyanka.

  • BAPI purpose

    BAPI_GL_GETGLACCBALANCE
    BAPI_GL_GETGLACCCURRENTBALANCE
    BAPI_GL_GETGLACCPERIODBALANCES
    Can anybody let me know whts the purpose for these bapi's.
    please let me know the exact purpose.
    is it used for any uploading or for what purpose.

    Hi,
    Refer Below for all your queries:
    BAPI_GL_GETGLACCBALANCE
    http://abap.wikiprog.com/wiki/BAPI_GL_GETGLACCBALANCE
    BAPI_GL_GETGLACCCURRENTBALANCE
    http://abap.wikiprog.com/wiki/BAPI_GL_GETGLACCCURRENTBALANCE
    BAPI_GL_GETGLACCPERIODBALANCES
    http://abap.wikiprog.com/wiki/BAPI_GL_GETGLACCPERIODBALANCES

  • Purpose : ALE, LSMW , BAPI

    Dear All,
               When is ALE, LSMW and BAPI used?
    Regards,
    Ratish
    [email protected]

    Hi Ratish,
    Ale is a layer to communicate between two seperated systems, Lsmw is a tool to upload the data into sap system here we can get the data from IDOC also, Bapi is used to upload the data into sap database.
    Reward if useful.
    kishore

  • How get all rows of a table with a BAPI

    Hi,
    how is it possible to get more then one row by calling a BAPI from the WD. In my Application I need the rows of a Table coming from the r/3 System. How is it possible to get all the rows after the first call? What is the logic behind it? My purpose is also to create an own BAPI.
    regards,
    Sharam
    null

    Hi,
    If I understand, you don't want display the result into a Web Dynpro Table. If so, after the execution, the result of your request is stored into the context. Then you don't really need to transfert the data from your context to an Java Array.
    But if you want to do it, here is the code :
    guess your result node called
    nodeResult
    Vector myVector = new Vector();
    for (int i = 0; i < wdContext.nodeResult().size(); i++){
       myVector.put(wdContext.nodeResult().getElementAt(i));
    I hope this will answer to your question.
    Regards

  • Using BAPI as WebService Interface in SAP PI

    Hello,
    Situation is:
    BAPI is imported in SAP PI from SAP R/3 system.
    The BAPI will be used for R/3 as Sync.Receiver.
    A Web Application should connect to SAP PI with the same message structure for request and response.
    So the idea is to publish the BAPI interface as a WSDL for this partner.
    But when doing this in Directory SAP PI does not offer BAPIs as Interfaces for WSDL, only message interfaces created
    in Repository are offered.
    BAPIs are interfaces per definition. So we dont need a message interface to add the BAPI to it.
    Maybe this woin t work anyhow with a SAP system.
    But how to use the BAPI for a WSDL?
    Is it required to create an interface for this purpose and add this one in the Directory WSDL create function?
    Best regards
    Dirk

    Hi Meinhard,
    There are more ways to get where you want to go, some are mentioned above.
    You can also do the following:
    1) From the BAPI you create the Webservice in R3 (as described in the link from pavan kumar)
    2) Go to trx SOAMANGER (in R3)  and get the URL for the WSDL
    3) Import the WSDL in PI as an External Definition (ED)
    4) Now you create an INBOUND, synchronous, service interface with the external definition.
    5) After saving the SI you can create a matching Outbound service interface (it's a menu option)
    Now you can use these service interfaces in the Integration directory.
    You can even create an ICO (integrated configuration) provided you use SOAP communication channels.
    kr
    Robert

  • IDOC/BAPI for Production order creation from Legacy system

    Hi all
    We are using an interface to create Production orders from legacy to SAP. Would you recommend an IDOC or a BAPI to create Production orders. If IDOC or BAPI then could you please mention which one?
    thanks a bunch

    Hi John,
    For your purposes, please use BAPI for production order creation from legacy system. There is no standard inbound IDoc available to use. SAP has an IDoc for outbound interface only (message type LOIPRO).
    If there is an inbound IDoc available, I would recommend to use an IDoc.
    IDoc technology has excellent error handling and will allow you to reprocess an error (if any).
    BAPI is also good approach to use and fast in term of  processing.
    For BAPI approach, you can use BAPI BAPI_PRODORD_CREATE.
    Hope this will help.
    Regards,
    Ferry Lianto

  • Help Rgd. BAPI for Creation of Inbound delivery Document

    Hi all,
    I need a Bapi to create inbound delivery document without using PO reference. I have seen the below BAPIs. i) BAPI_IBDLV_CREATE_FROM_OBDLV, 
    ii) BAPI_GOODSMVT_CREATE. I am not sure whether they are for creating inbound delivery document without using PO reference.
    It will be of great use if anyone can give me the BAPI for the purpose and the mandatory parameters or sample test data for the BAPI.
    Thanks in Advance,
    Rakesh.

    If you create the inbound delivery->check the purchase order in the tabstrip "Confirmations" on item level. There are three fields: "Confirmation control key", "Order acknowl." and "acknowl. required".
    Ckeck if there is a value in "confirmation control key".
    You should get the same error if you try to create VL31N in dialog mode, not only by using the bapi.
    Rgds,
    JP

  • General questions on IDOCs and IDOCs for 2 Accounting Interface BAPIs

    This post involves several questions pertaining to the topic of IDOC creation. I downloaded a couple of PDFs and tried googling for material on that, but things are far from being clear in my mind.
    I tried to put my questions in some order, so we can follow a line of reasoning. Here we go, then:
    I have one code where I there are calls to 2 BAPIs:
    - BAPI_ACC_ACT_POSTINGS_REVERSE and
    - BAPI_ACC_GL_POSTING_REV_POST
    I am supposed to prepare/create an IDOC to perform the activities these BAPIs are responsible for, for the sole purpose of providing us much more details on the activities being executed in the system - this is one of the IDOC's features, if I got it right, its highly detailed logging of everything that is going on behind.
    Now, the 1st question arises:
    From the material I read, I understood that IDOCs are nothing more than data containers, whose sole purpose is to provide a means of communication between two different systems/parties - one of them would usually be SAP. If this is right, than what sort of IDOC would be this one I am supposed to build - if there's not going to be any inter-system communication ? Doesn't it sound strange that pure "data containers" can work as "logging functions" ? Please share some light here.
    The 2nd question - after I understand what an IDOC really is - is
    then connected to the job I have to do. I found 2 IDOCs which I think have the proper/correspondent basic types for the 2 aforementioned BAPIs. They are, respectively:
    - ACC_DOCUMENT_REVERSE01 and
    - ACC_GL_POSTING_REVERSE01
    Getting back to my understanding of IDOCs, I got that every IDOC is generally made of one control record, data record(s), and status record(s). 3rd question: Where do the segments fit in ? Are the segments definitions of the Data Records ? And why is it that some IDOC types have header segments only and others doesn't have one ? (header segments are not the same as control records, right ?)
    Finally, what is the general process flow for creating/preparing an IDOC ? I looked over a couple of forum posts about this but some of them differ one from another in the order of the steps, some don't mention this or that step, so I am still confused.
    4th and last question: what comes first ? The definition of a partner, the bonding of a message type with an IDOC basic type, definitions of the inbound/outbound interfaces ?
    Any help here would be highly appreciated.
    Thanks in advance,
    Avraham

    Hi Jaya,
    Answer 1. Class is a template for creating objects. Object can also be called as instance.
    Interfaces allow you to use different classes in a uniform way (polymorphism).
    Answer 2. Normal abap is a procedural programming where as by using abap objects we can achieve object oriented programing.
    Answer 6. Source code:
    In below code i have created a interface and a class which is implementing the interface. I have declared a reference variable of type interface and created a object. Then i have called a method.
    REPORT  ZABAPOBJECTS_INTERF.
          INTERFACE I1
    INTERFACE I1.
      METHODS METH1.
    ENDINTERFACE.                    "I1
          CLASS C1 DEFINITION
    CLASS C1 DEFINITION.
      PUBLIC SECTION.
        METHODS: METH2.
        INTERFACES: I1.
    ENDCLASS.                    "C1 DEFINITION
          CLASS C1 IMPLEMENTATION
    CLASS C1 IMPLEMENTATION.
      METHOD I1~METH1.
        WRITE: / 'This is a method one'.
      ENDMETHOD.                                                "I1~METH1
      METHOD METH2.
        WRITE: / 'This is a method two'.
      ENDMETHOD.                                                "METH2
    ENDCLASS.                    "C1 IMPLEMENTATION
    START-OF-SELECTION.
      DATA : REF1 TYPE REF TO I1.
      CREATE OBJECT REF1 TYPE C1.
      CALL METHOD REF1->METH1.
    Question 7: Yes we need to create a class but most probably we use the existing classes.
    Regarding BAPi's go through the below links,
    http://www.sapgenie.com/abap/bapi/example.htm
    http://www.sapdevelopment.co.uk/bapirfc/bapirfchome.htm
    Regards,
    Azaz Ali.

Maybe you are looking for

  • Can I Programmatically Change the Active Group on a Hypertrend in DSC?

    I would like to know how to programmatically change the active group of a hypertrend in Labview DSC.  I saw a link which said it can be done in Lookout.  But in the DSC module, the active group is read only. I know of a hard way to do it.  I could sa

  • How to set up environment for web dynpro?

    We want to develop applications in Java Web Dnpro. What do I need to configure in SAP R3 to use Web Dynpro Java? I can develop applications on the SAP NetWeaver Developer Studio and only perform a configuration  in SAP ECC ? Or do I need to install S

  • Adding a dynamic summary row for a spark data grid

    i'm looking for a solution for a spark data grid. by clicking on a row it will become larger and will show under the original row a some kind of a summary text with no realtion to columns. is there a summary row option for a spark datagrid that can s

  • Apple TV not responding-Port 3689

    I have been syncing with my Apple TV for almost 2 years. My only recent changes have been the upgrade to Snow Leopard. When I tried to sync today and clicked on the more info I received the following response: Once you have synced or paired the Apple

  • Packing List

    HI Friends I would like to know Packing List Number which table it will store. Where we can maintain Truck Number and L/R Number. Please explain me about Batch Characteristic (Batch Characteristics related Table name and Fields Name) what are the pac