BAPI or FM equivalent to C223 t-code

Hi experts,
1>Is there any way to get the associated plants and material numbers for BOMs and Routings extended to?
Any BAPI or FM that can return material numbers and/or plants for which BOMs & Routings extended/cloned against old one?
Or any table on which I can query? what should be the input to the query?
2>* Is there any BAPI or Function module that creates production version as Tx C223 * ?
Thanks in advance.
regards,
Samy

Hello,
Check the Function group CMFV .

Similar Messages

  • Bapi for  'post customer down payment (t-code F-29)'

    hi all
    can any one tell which bapi is used to 'post customer down payment:header data (t-code F-29)'.
    thanks in advance,
    lokesh

    Hi,
    this one :
    BAPI_ACC_DOCUMENT_POST
    Best regards,
    Erwan

  • BAPI for customer Block/Unblock through transaction code : XD05

    Hi Gurus,
    I want to block/unblock customer sales areas(Transaction code : XD05) through program. Could you please suggest any BAPI for the same. As writing BDC will not be a good choice.
    Please help.
    Thanks,
    Bhupender

    Hello Bhupender,
    the best and easies solution is the MASS maintenance transaction as proposed above.
    For the BAPI question, sorry but there is NO BAPI to maintain a customer master data.
    The function module provided by my predecessor, even if it has the perfect look like is definitively not the one to use.
    Despite the name, this FM is designed to support only the maintenance of CONSUMERs.
    Moreover it is not an RFC enabled function module.
    It might work in your case, as the data to maintain is quite simple and limited but you still may face several troubles like NO change documents and change pointers created and/or no synchronisation with TREX, CRM, ...
    There is also a BAPI with a nice name, but in fact it is designed to be used only with SAP Online Store and SAP Product Catalog.
    The only reliable path for investigation is described within [note 384462|https://service.sap.com/sap/support/notes/384462].
    A other path for investigation is the class CMD_EI_API which has been introduced with ECC 2005 (6.00).
    You could wrap method MAINTAIN_BAPI inside of a bapi function module you would have written.
    Otherwise, but still with limited functionality there are some eSOA webservices to find, read, maintain customer master data.
    Hope this helps.
    BR
    Alain

  • Can i execute bapi two times if yes then wht code i need to write 2 time.

    Hi,
    I am trying to execute my bapi at wdDoInit() method of view . Same Bapi will execute at  Controller.
    But my view bapi is not running.
    Why this is happeded?
    My code for View is like this
    public void wdDoInit()
        //@@begin wdDoInit()
         IWDMessageManager manager = wdComponentAPI.getMessageManager();
                   try
                               wdContext.currentZcrm_Sales_Orders_InputElement().setRun_Bp("ALL");
                               wdContext.currentZcrm_Sales_Orders_InputElement().setUname("SUNIL103");
                               wdContext.currentZcrm_Sales_Orders_InputElement().modelObject().execute();     
    wdContext.nodeOutput().invalidate();
                   catch(WDDynamicRFCExecuteException e)
                                    manager.reportException(e.getMessage(), false);
        //@@end
    Please help me to trace this thing ,
    Regards,
    Gurprit Bhatia

    Hi,
       Change this code a bit:
    Zcrm_Sales_Orders_Input input = new Zcrm_Sales_Orders_Input();
    wdContext.nodeZcrm_Sales_Orders_Input().bind(input);
    input.setRun_Bp("ALL");
    input.setUname("SUNIL103");
    wdContext.currentZcrm_Sales_Orders_InputElement().modelObject().execute();
    wdContext.nodeOutput().invalidate();
    Regards,
    Satyajit.

  • BAPI or FM to create Products t-code : commpr01

    HI,
    Please let me know the Bapi or FM to CReate Products  the commpr01 t-code.
    Thanks and Regards,

    HI,
    There are two different Function Modules used to create service product and material product in CRM system.
    CRMXIF_PRODUCT_MATERIAL_SAVE for creating product of type material
    and CRMXIF_PRODUCT_SERVICE_SAVE for creating product of type service.
    Regards,
    PP

  • Suitable BAPI interface to upload data intoKP26 T.code (CO)

    Hi All I need to know the BAPI interface to upload the data into KP26 Co Activity type /Price Planning
    I have these fields to create entries in KP26 t.code.
    The Fields are as follows:
    Layout (could use the standard layout 1-201)
    1.Version --
    2. Period from / to --
    3. Fiscal Year -
    4. Cost Center -
    5.  Activity type-
    6. Fixed price-
    7. Variable price-
    8. Price unit--- 
    PLease any body help me which BAPI is suitable for KP26 T.Code .. Its Urgent ...
    Regards
    Purushotham.Ineni.

    Hi thank you  for kind reply i need to create the entries  for CO Activity /Price planning .
    i have to upload data to KP26 which i have posted the fields ..
    i already cheked the function modules which you have been given .. it is not suitable ..
    Is there any ohter  BAPI is there ... le t me know ...
    regards
    purushotham.ineni

  • BAPI for posting equivalent of MIGO GR (101) for OUTBOUND DELIVERY (R05)

    Hi everyone
    I am looking for a BAPI or function module to do the above; it is the second leg of an STO posting between plants, the first leg being where the goods issue is posted against the outbound delivery into in-transit stock (IM movement 641), with the second being to GR this stock with a 101, which will take it out of in-transit and into unrestricted stock at the destination plant.
    I have tried BAPI_GOODSMVT_CREATE from every angle but have come to the conclusion it does not cater for this. I also tried to do the GR against the STO (P/O) from which the delivery was created, but this does not work as the follow-on documents for the delivery will not be updated.
    Any suggestions?
    Thanks
    Andrew

    hi,
    i try to doing posting goods issue for outbound delivery out fo the regular progression.
    the posting is automaticly as part of outside program.
    thanks alot,

  • BAPI Function Module for SCM APO Trans code /SAPAPO/AC42

    Hi,
       Is there any BAPI Function Modules for SCM APO Tcode /SAPAPO/AC42.
       This BAPI FM should return the column values "Remaining Prod Alloc"  and "Incoming Order Quantity" when we give
       below details as inputs for the Tcode /SAPAPO/AC42
            Product Allocation Group
            Product
            Allocation Procedure
            prod Alloc step
            Product Alloc Object (Characteristics of Product Alloc Group)
            Plant (Characteristics of Product Alloc Group)
            Customer Group 5 (Characteristics of Product Alloc Group)
        Reward points if helpful.
    Thanks,
    Mich

    Hi,
    You should be able to get the information using the standard BAPI (Assuming you are using SCM5.0) BAPI_APOPAL_INSERT in the transaction BAPI.
    ProductAllocationAPO.DataInsert
    Interface to Import Product Allocation Data  Functionality
    This method is used to adopt data from OLTP systems for product allocation in the global availability check.
    You can do the following using the method:
    Adopt new data
    You can adopt new characteristics combinations or new time series. Newly created characteristics combinations have the status Active and are therefore included in the product allocation check.
    Change existing data
    You can overwrite existing data if you have set the interface parameter ALLOW_UPDATE. You can set the status of existing characteristics combinations to Active if you set the interface parameter UPDATE_STATUS. If the characteristics combination does not exist, the system creates it.
    The product allocation quantity is overwritten for existing time series. If you also want to change the incoming orders quantity, you must set the interface parameter UPDATE_INCOMING_ORDER_QTY. If the time series does not exist, the system creates it.
    Prerequisite
    To be able to use this method, you must have made all the Customizing settings for product allocation. For more information, see the Implementation Guide (IMG) for SAP APO under Global Available-to-Promise -> Product Allocation.
    Regards
    Vinod

  • Function modules and BAPIs for a transactio code

    Hi friends,
    How i can find  the List of function modules and BAPIs being used for a particular transaction code?
    for example: I would like to find List function modules and BAPIs being used for the Transaction code
    "FBRA"(Reset cleared items)?
    Any sort of help on this will be helpful.
    Thanks,
    Punjaala

    hi Anjaneyulu,
    open the t-code --> and go to menu system->status-->select the program and open the program-->
    selct the tree structure----in the left side the includes screen and function module everthing will show..
    or
    open the t-code --> and go to menu system->status-->select the program and open the program-->
    go to attributes and select the Package..
    next----
    go to se80--> enter the package --> and dispalay it shows the list of Program , include transaction function modules and bapi's under the pakage
    Regards,
    Prabhudas

  • BAPI BAPI_ACC_GL_POSTING_POST for G/L posting through (for T-Code F-02)

    Hi,
    I want to use BAPI 'BAPI_ACC_GL_POSTING_POST' for G/L account posting (F-02). I need to populate the below fields at item level but i am not sure how to populate these fields at item level because not able to find last two fields in any structure of the BAPI.
    Posting Key:
    Account
    Amount
    Tax Code
    Determine tax base (Checkbox in F-02)
    Please let me know how to populate them and if i am using the wrong BAPI then please provide me the correct one.
    Thanks a lot in adv.
    Regards,
    Sheelesh

    Hi
    You can add fields that you don't have in the interface with EXTENSION. Please, see SAP Note 487722 - Using EXTENSION1 for accounting BAPIs.
    I hope this helps you
    Regards
    Eduardo
    Edited by: E_Hinojosa on Dec 15, 2011 6:21 PM

  • I want complete code of mm01 using bapi's

    hi experts!
    my requirements is upload material master data using bapi....
    i want complete  code of mm01 ......i have no idea of bapi
    pls help me anybody...............................

    Dear Shilpa,
    Please go through the following link:
    https://www.sdn.sap.com/irj/sdn/wiki
    Tutorial, MM01 Upload using BAPI
    Author: Karthik Potharaju
    Submitted: 28.09.07
    *& Report ZKAR_MATMAS_BAPI
    *& This program demonstrates how easy it is to create Material master
    *& data using BAPI_MATERIAL_SAVEDATA
    *& The program also generates a report post-execution displaying errors
    *& as well as successful uploads
    *& Written by: Karthik Potharaju
    *& URL: http://allaboutsap.blogspot.com
    REPORT ZKAR_MATMAS_BAPI.
    TABLES
    FLAGS *
    DATA: F_STOP. " Flag used to stop processing
    DATA DECLARATIONS *
    DATA : V_EMPTY TYPE I, " No. of empty records
    V_TOTAL TYPE I. " Total no. of records.
    STRUCTURES & INTERNAL TABLES
    *--- BAPI structures
    DATA: BAPI_HEAD LIKE BAPIMATHEAD, " Header Segment with Control Information
    BAPI_MAKT LIKE BAPI_MAKT, " Material Description
    BAPI_MARA1 LIKE BAPI_MARA, " Client Data
    BAPI_MARAX LIKE BAPI_MARAX, " Checkbox Structure for BAPI_MARA
    BAPI_MARC1 LIKE BAPI_MARC, " Plant View
    BAPI_MARCX LIKE BAPI_MARCX, " Checkbox Structure for BAPI_MARC
    BAPI_MBEW1 LIKE BAPI_MBEW, " Accounting View
    BAPI_MBEWX LIKE BAPI_MBEWX, " Checkbox Structure for BAPI_MBEW
    BAPI_RETURN LIKE BAPIRET2. " Return Parameter
    *--- Internal table to hold excel file data
    DATA: IT_INTERN TYPE ALSMEX_TABLINE OCCURS 0 WITH HEADER LINE.
    *--- Internal table to hold Matetrial descriptions
    DATA: BEGIN OF IT_MAKT OCCURS 100.
    INCLUDE STRUCTURE BAPI_MAKT.
    DATA: END OF IT_MAKT.
    *--- Internal to hold the records in the text file
    DATA : BEGIN OF IT_DATA OCCURS 100,
    WERKS(4), " Plant
    MTART(4), " Material type
    MATNR(18), " Material number
    MATKL(9) , " Material group
    MBRSH(1), " Industry sector
    MEINS(3), " Base unit of measure
    GEWEI(3), " Weight Unit
    SPART(2), " Division
    EKGRP(3), " Purchasing group
    VPRSV(1), " Price control indicator
    STPRS(12), " Standard price
    PEINH(3), " Price unit
    SPRAS(2), " Language key
    MAKTX(40), " Material description
    END OF IT_DATA.
    SELECTION SCREEN. *
    SELECTION-SCREEN BEGIN OF BLOCK SCR1 WITH FRAME TITLE TEXT-111.
    PARAMETER : P_FILE TYPE RLGRAP-FILENAME OBLIGATORY DEFAULT " Input File
    'C:Material_master.XLS'.
    PARAMETER : P_MAX(4) OBLIGATORY DEFAULT '100'. " no.of recs in a session
    PARAMETERS: P_HEADER TYPE I DEFAULT 0. " Header Lines
    PARAMETERS: P_BEGCOL TYPE I DEFAULT 1 NO-DISPLAY,
    P_BEGROW TYPE I DEFAULT 1 NO-DISPLAY,
    P_ENDCOL TYPE I DEFAULT 100 NO-DISPLAY,
    P_ENDROW TYPE I DEFAULT 32000 NO-DISPLAY.
    SELECTION-SCREEN END OF BLOCK SCR1.
    AT SELECTION-SCREEN *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
    *--- Validating file
    PERFORM VALIDATE_FILE USING P_FILE.
    START-OF-SELECTION
    START-OF-SELECTION.
    *--- Perform to convert the Excel data into an internal table
    PERFORM CONVERT_XLS_ITAB.
    IF NOT IT_DATA[] IS INITIAL.
    *--- Perform to delete Header lines
    PERFORM DELETE_HEADER_EMPTY_RECS.
    ENDIF.
    END OF SELECTION. *
    END-OF-SELECTION.
    *--- Perform to upload Material Master data
    PERFORM UPLOAD_MATMAS.
    Form : validate_input_file
    Description : To provide F4 help for file if read from PC
    FORM VALIDATE_FILE USING F_FILE TYPE RLGRAP-FILENAME.
    CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
    CHANGING
    FILE_NAME = F_FILE
    EXCEPTIONS
    MASK_TOO_LONG = 1
    OTHERS = 2.
    IF SY-SUBRC <> 0.
    MESSAGE S010(ZLKPL_MSGCLASS). " 'Error in getting filename'.
    ENDIF.
    ENDFORM. " validate_input_file
    *& Form CONVER_XLS_ITAB
    text
    FORM CONVERT_XLS_ITAB.
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
    EXPORTING
    FILENAME = P_FILE
    I_BEGIN_COL = P_BEGCOL
    I_BEGIN_ROW = P_BEGROW
    I_END_COL = P_ENDCOL
    I_END_ROW = P_ENDROW
    TABLES
    INTERN = IT_INTERN.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    *--- Perform to move the data into an internal data
    PERFORM MOVE_DATA.
    ENDFORM. " CONVERT_XLS_ITAB
    *& Form MOVE_DATA
    text
    FORM MOVE_DATA.
    DATA : LV_INDEX TYPE I.
    FIELD-SYMBOLS <FS>.
    *--- Sorting the internal table
    SORT IT_INTERN BY ROW COL.
    CLEAR IT_INTERN.
    LOOP AT IT_INTERN.
    MOVE IT_INTERN-COL TO LV_INDEX.
    *--- Assigning the each record to an internal table row
    ASSIGN COMPONENT LV_INDEX OF STRUCTURE IT_DATA TO <FS>.
    *--- Asigning the field value to a field symbol
    MOVE IT_INTERN-VALUE TO <FS>.
    AT END OF ROW.
    APPEND IT_DATA.
    CLEAR IT_DATA.
    ENDAT.
    ENDLOOP.
    ENDFORM. " MOVE_DATA
    *& Form DELETE_HEADER_EMPTY_RECS
    To delete the Header and empty records
    FORM DELETE_HEADER_EMPTY_RECS.
    DATA: LV_TABIX LIKE SY-TABIX.
    IF NOT P_HEADER IS INITIAL.
    LOOP AT IT_DATA.
    IF P_HEADER > 0 AND NOT IT_DATA IS INITIAL.
    DELETE IT_DATA FROM 1 TO P_HEADER.
    P_HEADER = 0.
    EXIT.
    ENDIF.
    ENDLOOP.
    ENDIF.
    CLEAR IT_DATA.
    *--- To delete the empty lines from internal table
    LOOP AT IT_DATA.
    LV_TABIX = SY-TABIX.
    IF IT_DATA IS INITIAL.
    V_EMPTY = V_EMPTY + 1.
    DELETE IT_DATA INDEX LV_TABIX..
    ENDIF.
    ENDLOOP.
    CLEAR IT_DATA.
    *--- Total no of recs in file
    DESCRIBE TABLE IT_DATA LINES V_TOTAL.
    IF V_TOTAL = 0.
    MESSAGE I013(ZLKPL_MSGCLASS). " No records in the file
    F_STOP = 'X'.
    STOP.
    ENDIF.
    ENDFORM. " DELETE_HEADER_EMPTY_RECS
    *& Form UPLOAD_MATMAS
    to upload Material Master data
    FORM UPLOAD_MATMAS .
    LOOP AT IT_DATA.
    Header
    BAPI_HEAD-MATERIAL = IT_DATA-MATNR.
    BAPI_HEAD-IND_SECTOR = IT_DATA-MBRSH.
    BAPI_HEAD-MATL_TYPE = IT_DATA-MTART.
    BAPI_HEAD-BASIC_VIEW = 'X'.
    BAPI_HEAD-PURCHASE_VIEW = 'X'.
    BAPI_HEAD-ACCOUNT_VIEW = 'X'.
    Material Description
    REFRESH IT_MAKT.
    IT_MAKT-LANGU = IT_DATA-SPRAS.
    IT_MAKT-MATL_DESC = IT_DATA-MAKTX.
    APPEND IT_MAKT.
    Client Data - Basic
    BAPI_MARA1-MATL_GROUP = IT_DATA-MATKL.
    BAPI_MARA1-BASE_UOM = IT_DATA-MEINS.
    BAPI_MARA1-UNIT_OF_WT = IT_DATA-GEWEI.
    BAPI_MARA1-DIVISION = IT_DATA-SPART.
    BAPI_MARAX-MATL_GROUP = 'X'.
    BAPI_MARAX-BASE_UOM = 'X'.
    BAPI_MARAX-UNIT_OF_WT = 'X'.
    BAPI_MARAX-DIVISION = 'X'.
    Plant - Purchasing
    BAPI_MARC1-PLANT = IT_DATA-WERKS.
    BAPI_MARC1-PUR_GROUP = IT_DATA-EKGRP.
    BAPI_MARCX-PLANT = IT_DATA-WERKS.
    BAPI_MARCX-PUR_GROUP = 'X'.
    Accounting
    BAPI_MBEW1-VAL_AREA = IT_DATA-WERKS.
    BAPI_MBEW1-PRICE_CTRL = IT_DATA-VPRSV.
    BAPI_MBEW1-STD_PRICE = IT_DATA-STPRS.
    BAPI_MBEW1-PRICE_UNIT = IT_DATA-PEINH.
    BAPI_MBEWX-VAL_AREA = IT_DATA-WERKS.
    BAPI_MBEWX-PRICE_CTRL = 'X'.
    BAPI_MBEWX-STD_PRICE = 'X'.
    BAPI_MBEWX-PRICE_UNIT = 'X'.
    *--- BAPI to create material
    call function 'BAPI_MATERIAL_SAVEDATA'
    exporting
    HEADDATA = BAPI_HEAD
    CLIENTDATA = BAPI_MARA1
    CLIENTDATAX = BAPI_MARAX
    PLANTDATA = BAPI_MARC1
    PLANTDATAX = BAPI_MARCX
    FORECASTPARAMETERS =
    FORECASTPARAMETERSX =
    PLANNINGDATA =
    PLANNINGDATAX =
    STORAGELOCATIONDATA =
    STORAGELOCATIONDATAX =
    VALUATIONDATA = BAPI_MBEW1
    VALUATIONDATAX = BAPI_MBEWX
    WAREHOUSENUMBERDATA =
    WAREHOUSENUMBERDATAX =
    SALESDATA = BAPI_MVKE1
    SALESDATAX = BAPI_MVKEX
    STORAGETYPEDATA =
    STORAGETYPEDATAX =
    IMPORTING
    RETURN = BAPI_RETURN
    TABLES
    MATERIALDESCRIPTION = IT_MAKT
    UNITSOFMEASURE =
    UNITSOFMEASUREX =
    INTERNATIONALARTNOS =
    MATERIALLONGTEXT =
    TAXCLASSIFICATIONS =
    RETURNMESSAGES =
    PRTDATA =
    PRTDATAX =
    EXTENSIONIN =
    EXTENSIONINX =
    IF BAPI_RETURN-TYPE = 'E'.
    WRITE:/ 'Error:' ,BAPI_RETURN-MESSAGE ,'for material:' ,it_data-matnr.
    ELSEIF BAPI_RETURN-TYPE = 'S'.
    WRITE: 'Successfully created material' ,it_data-matnr.
    ENDIF.
    ENDLOOP.
    ENDFORM. " UPLOAD_MATMAS
    Regards,
    Abir
    Don't forget to Reward Points  *

  • BAPI for T.Code: VK11

    How to find the BAPI for transfering data to VK11 T.code.
    Sunil.

    Refer this one -
    BAPI_PRICES_CONDITIONS
    Sample code -
    Re: Sample code for  BAPI_PRICES_CONDITIONS
    Regards,
    Amit
    Reward all helpful replies.

  • BAPI or FM to update the commpr01 t-code

    Hi,
    Please let me know the Bapi or FM to update the commpr01 t-code.
    Thanks and Regards,
    Vijay.

    Hi,
    I want to update the transaction through a workflow.
    My scnerio is: i want to trigger a workflow whenever an attribute if the workflow is changed. The change goes through the series of approvals and after every level approves the change only then attributes needs to be changed.
    so i am thinking of updating the commpr01 t-code once all the levels are approved. so i need to use a BAPI or FM to update the t-code commpr01..
    Please suggest me if you have a better solution on this approach.
    Regards,
    Vijay.

  • BAPI list from transaction - code

    Hi all,
    it's exist a way to put as input a transaction-code and have as output a bapi's list in relation with t-code entered ???
    Tks a lot,
    bye

    hi,
    I don't think that there is any transaction code or a table to determine the same  ..
    Regards,
    Santosh

  • Questations on BAPI

    HI all,
    I have some questations on BAPI function modue creation,
    1.  After creating bapi function module we have to release the
         function module.  why should we release the Function
         module ?
    2. Creating BAPI object,
        What is API Method ?
        Why should we create the API Method ?
        What is the use of API ?
    3. Here also we are doing like
       Object Type Component -> To Implemented.
       Object Type Component -> To Released.
       Object Type -> To Implemented.
       Object Type -> To Released.
       What is the use of this ?
    Thanks,
    Nagaraju.

    Hi,
    1.RFC is Remote Function Call - a function module, which can be called remotely from outside
    BAPI is also a Remote enabled function module but the difference between BAPI and RFC is in BAPI there is a bussiness object attached to it which calls SAP application internally.
    can you explain RFC and BAPI???
    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. Whenever possible, a standardized BAPI must be used in preference to an individual BAPI.
    RFC is the protocol used to call functions in an R/3 system by a caller external to R/3 or to call programs external to R/3 from an R/3 system. Functions can only be called via RFC, if they are tagged as RFC functions in the SAP development workbench. They are then called RFC function modules. BAPIs are complete sets of (BAPI) function modules that model a business application.
    RFC is the protocol used by SAP for remote communication, that is, for communications between remote independent systems.RFC is used for communications between two independent SAP systems, or for communications between an SAP system and a non-SAP system, such as an external application. It can also be used for communications between modules on the same system.Using the RFC interfaces you can extend the functionality of R/3 applications from an external program.
    An R/3 system also contains Business Application Programming Interfaces (also called Business APIs, or BAPIs), which provide a programming interface to business objects. BAPIs are a set of methods for working with and manipulating SAP business objects.Internally, BAPIs are implemented as function modules stored in the R/3 Function Builder. Each BAPI has an equivalent internally-named function module. However, you should use the BAPI and not the function module behind it, because the BAPI provides a stable, object-oriented view of R/3 applications and data. The internal function modules or even the fact that the BAPIs are implemented as function modules are not guaranteed to remain the same in future releases of R/3.
    BAPI stands for Business Application Programming Interface.
    It is a library of functions that are released to the public
    as an interface into an existing SAP system from an external
    system.
    RFC is the protocol used to call functions in an R/3 system
    by a caller external to R/3 or to call programs external to
    R/3 from an R/3 system.
    Functions can only be called via RFC, if they are tagged as
    RFC functions in the SAP development workbench. They are
    then called RFC function modules. BAPIs are complete sets of
    (BAPI) function modules that model a business application.
    When you are familiar with web developments: RFC can be
    compared to HTTP and BAPIs are CGI applications.
    In other words: A BAPI function is a function module that
    can be called remotely using the RFC technology.
    RFC and BAPIs are remote enabled function modules. They are practicly the same. A BAPI is one step further as it usually is a self contained business function, such as "Create Purchase Order", or "Change Sales Document". BAPIs interface is very well defined and documented. BAPIs can be found in the BAPI browser via transaction BAPI. RFCs are just remote enabled function modules.
    BAPI stands for Business Application Programming Interface. It is a library of functions that are released to the public as an interface into an existing SAP system from an external system.
    RFC is the protocol used to call functions in an R/3 system by a caller external to R/3 or to call programs external to R/3 from an R/3 system. Functions can only be called via RFC, if they are tagged as RFC functions in the SAP development workbench.
    BAPIs are RFCs, the only difference is that BAPIs usually encapulate some complete business object. For example, creating a sales order, the BAPI would do all of the steps required to create a sales order.
    2.Create the API Method Using the BAPI WIZARD
    The BAPI wizard is used toTo expose the remote function module as a BAPI. The wizard will generate some additional code, so the function module is a valid method of the BOR. This allows the BAPi to be called as a workflow method in addition to be called by an outside program.
    Note: Each function module corresponds to a method in the BOR
    Go to the Business Object Builder SWO1.
    You can either create the new Object type as a subtype of an existing business object or create a new business object from scratch. In this example it would be obvious to create the Object type as a subtype of BUS2005 Production order. However, to illustrate how to create a new Object type from scratch, we will do this.
    In the Object/Interface type field write the name of the new Business Object: ZORDERSTAT. Press enter and fill in the additional fields necessary to create the object type.
    Supertype: Not relevant because we are creating our object from scratch
    Program. This is the name of the program where the wizard generates code for the Object type, NOT the function module we created earlier. The program name must not be the name of an existing program.
    Create the API Method Using the BAPI WIZARD
    The BAPI wizard is used toTo expose the remote function module as a BAPI. The wizard will generate some additional code, so the function module is a valid method of the BOR. This allows the BAPi to be called as a workflow method in addition to be called by an outside program.
    Note: Each function module corresponds to a method in the BOR
    Go to the Business Object Builder SWO1.
    You can either create the new Object type as a subtype of an existing business object or create a new business object from scratch. In this example it would be obvious to create the Object type as a subtype of BUS2005 Production order. However, to illustrate how to create a new Object type from scratch, we will do this.
    In the Object/Interface type field write the name of the new Business Object: ZORDERSTAT. Press enter and fill in the additional fields necessary to create the object type.
    Supertype: Not relevant because we are creating our object from scratch
    Program. This is the name of the program where the wizard generates code for the Object type, NOT the function module we created earlier. The program name must not be the name of an existing program.
    Create the API Method Using the BAPI WIZARD
    The BAPI wizard is used toTo expose the remote function module as a BAPI. The wizard will generate some additional code, so the function module is a valid method of the BOR. This allows the BAPi to be called as a workflow method in addition to be called by an outside program.
    Note: Each function module corresponds to a method in the BOR
    Go to the Business Object Builder SWO1.
    You can either create the new Object type as a subtype of an existing business object or create a new business object from scratch. In this example it would be obvious to create the Object type as a subtype of BUS2005 Production order. However, to illustrate how to create a new Object type from scratch, we will do this.
    In the Object/Interface type field write the name of the new Business Object: ZORDERSTAT. Press enter and fill in the additional fields necessary to create the object type.
    Supertype: Not relevant because we are creating our object from scratch
    Program. This is the name of the program where the wizard generates code for the Object type, NOT the function module we created earlier. The program name must not be the name of an existing program.
    After you have finished the wizard, you will notice that the ZGetOrderStatus has been added to the business object:
    You can double-click on the method to see its properties. To use the business object you must change the Object type status to Implemented. Use menu Edit->Change releases status->Object type->To implemented. No you can test the object (Press F8).
    Note that the BAPI wizard has added a wrapper class for the function module so it can be sued as method in the business object. Choose menu Goto->Program to display the program:
    Implementation of object type ZORDERSTAT *****
    INCLUDE <OBJECT>.
    BEGIN_DATA OBJECT. " Do not change.. DATA is generated
    only private members may be inserted into structure private
    DATA:
    " begin of private,
    " to declare private attributes remove comments and
    " insert private attributes here ...
    " end of private,
    KEY LIKE SWOTOBJID-OBJKEY.
    END_DATA OBJECT. " Do not change.. DATA is generated
    BEGIN_METHOD ZGETORDERSTATUS CHANGING CONTAINER.
    DATA:
    BAPIORDERSTATUSIMPORT LIKE ZBAPI_ORDER_STATUS_IMPORT,
    RETURN LIKE BAPIRETURN,
    TBAPISTAT LIKE ZBAPISTAT OCCURS 0.
    SWC_GET_ELEMENT CONTAINER 'BapiOrderStatusImport'
    BAPIORDERSTATUSIMPORT.
    SWC_GET_TABLE CONTAINER 'TBapistat' TBAPISTAT.
    CALL FUNCTION 'Z_BAPI_GET_ORDER_STATUS'
    EXPORTING
    BAPI_ORDER_STATUS_IMPORT = BAPIORDERSTATUSIMPORT
    IMPORTING
    RETURN = RETURN
    TABLES
    T_BAPISTAT = TBAPISTAT
    EXCEPTIONS
    OTHERS = 01.
    CASE SY-SUBRC.
    WHEN 0. " OK
    WHEN OTHERS. " to be implemented
    ENDCASE.
    SWC_SET_ELEMENT CONTAINER 'Return' RETURN.
    SWC_SET_TABLE CONTAINER 'TBapistat' TBAPISTAT.
    END_METHOD.
    Please check this link.
    http://help.sap.com/saphelp_utilities472/helpdata/en/c6/4dce68eafc11d18a030000e829fbbd/frameset.htm
    Use this its perfect for you
    EMIGALL
    Regards,
    Shiva.

Maybe you are looking for

  • I can't burn a music disk

    iTunes will not burn a music disk. it starts to burn 1 or 2 tracks then stops and kicks the disk out.

  • I want to print edited Pages documents with Comments written in margins, not yellow boxes

    Can anyone tell me a way to use Track Changes to edit a Pages document so my comments are printed in margins, not hidden in yellow boxes. I was able to do this on Word documents, but my students are now using Pages. Neither they nor I can see all com

  • OBIEE 11.1.1.6

    Hi Gurus, In OBIEE 11.1.1.5/6 version. It is possible to create to drill through report in Grand total in table view report. Ex: I have one table view report with Grand Total then we need to apply one drill through report in Grand Total? If it is pos

  • I want to disengage the spell or word suggester whenever the curser hangs over a word

    When the curser is moved around the page and stops close to a word, a box appears with a multilanguage list of suggestions for that word. I want to disengage this facility == This happened == Every time Firefox opened == many moons ago

  • Droplet to Rename Folders and Files

    I am an AS newbie and I need some help. Our accounting software creates a folder structure on our server when a job is created with a 6 digit job number. Enclosed in this folder is a set of sub-folders which are generated with a generic name: 0000_Ar