BAPI Update

Hello Friends,
I am using the BAPI "BAPI_BUPA_CENTRAL_CHANGE", in order to update the SAP Business Partner data. But dont know what is wronge, its not working, here is my sample code.
ftemplate = repository.getFunctionTemplate("BAPI_BUPA_CENTRAL_CHANGE");
ftemplatecommit = repository.getFunctionTemplate("BAPI_TRANSACTION_COMMIT");
if(ftemplate != null) {
// Create a function from the template
function = ftemplate.getFunction();
commit   = ftemplatecommit.getFunction();
// Set up Import Parameters
function.getImportParameterList().setValue("0000000001", "BUSINESSPARTNER");
str = function.getImportParameterList().getStructure("CENTRALDATAPERSON");
str.setValue("Ammar","FIRSTNAME");
str.setValue("Rizvi","LASTNAME");
JCO.Table table = function.getTableParameterList().getTable("RETURN");
if (table.getNumRows() >0){
System.out.println(table.getString("MESSAGE"));
mConnection.execute(function);
mConnection.execute(commit);
After executing the above code, when i check the firstName and lastName of the specified Business Partner, it shows me the same old values.
It would be very nice if some one pls let me know what is possibally wronge with my code!
Many thanks!
Marek

Hello Gregor,
Thanks for your reply,
I have seted the CENTRALDATAPERSON_X, structure also, but still not updating the business partner.
I have added these lines of code,
str = function.getImportParameterList().getStructure("CENTRALDATAPERSON_X");
str.setValue("Ammar","FIRSTNAME");
str.setValue("Rizvi","LASTNAME");
Can you pls help me in identifying the possible problem,
Many thanks
Marek
Message was edited by: Marek Jöricke

Similar Messages

  • How to find which BAPI updates which table

    1) I am new to SAP. is there any way to find which BAPI updates which table.  I have been given task to write a custom progm to change sevice notifications using BAPI_ALM_MAINTAIN* .<br />
    <br />
    i would really appreciate if any one would come with suggestions.

    SELECT owner, object_type, object_name, object_id, status
      FROM SYS.dba_objects
    WHERE object_id IN (
                       SELECT     object_id
                             FROM public_dependency
                       CONNECT BY PRIOR object_id = referenced_object_id
                       START WITH referenced_object_id =
                                                        (SELECT object_id
                                                           FROM SYS.dba_objects
                                                          WHERE owner = :owner AND object_name = :NAME
                                                                AND object_type = :TYPE))-- Mahesh Kaila

  • Problem with Sales Order BAPI  Update...Very Very Urgent....Pls Help me out

    I am trying to update the sales order text using "BAPI_SALESORDER_CHANGE" But i am getting an error as " Sold-to party E455 not maintained for sales area E901 C1"
        I passed the sales order no, and the text to be upated and the Update flag is set to "U".
        When i try giving the same values in se37 it updates the sales order text successfully but when i use the same BAPI in the report i am getting the above error. Can anyone pls help me out.

    hi
    the message is very clear that the sold to party ur refering is not from the same sales area. if u have the customer already then extend the same to the said sales area, by common division and distribution channel
    <b>reward points</b>
    Regards

  • BADi/BAPI update sales Area

    Hi Guys,
                   I am struck with a single field to update, lets me depict it..
    I loaded the business partner via LSMW and the standard idoc doesnot support the <b>Account Assignment group</b> field and i am not finding a way to update this field externally ...
    Does any one have any idea whic BAPI or badi does it ?
    If u have any idea please do mention.
    Regards.

    Hi crm_learner_learner,
    in order to find the proprer badi- BADI, pls fill the following guide:
    /people/alwin.vandeput2/blog/2006/04/13/how-to-search-for-badis-trace-it
    I guess that there must be a proper Bapi, to be used for sales data. In this case follow the previous procedure and change the filter in "display trace".
    Concerning Badi try Partner_update.
    Regards,
    AndreA

  • COMMIT and PERFORMANCE and BAPI UPDATE

    When looping through  about 10 000 documents it goes initially quite fast but in the end it is very slow. Is it a basis problem?
    Initially it takes about 0,5 sec and in the end each document update takes about 20 sec. In total about 15 hours!
    My basis consultant says I should do a commit as seldom as possible. But I want to do it after each document (=a LUW?). I could add a counter and do a commit each 100:th document, but I do not like it.
    Pseudo logic.
    loop at itab (about 20 000 recs)
    ..CALL FUNCTION 'BAPI_CTRACDOCUMENT_CHANGE'
    ..Update of a ZTABLE
    ..COMMIT WORK.
    ..GET RUNTIME+display RUNTIME-diff
    endloop.

    Hi mikael,
    1. My basis consultant says I should do a commit as seldom as possible
    Yes, they are right.
    If we don't do commit,
    then,
    in the database, the rollback area
    goes on increasing, increasing,
    and occupies memory and gets slow.
    2. I could add a counter and do a commit each 100
    Thats the best practical solution.
    The figure 100 or 50 or 200 etc,
    one has to figure out practically.
    regards,
    amit m.

  • Bapi updating issue for MD61

    Hello All,
    My code for MD61 upload data is as follows.
    the issue is if we have any record in the excel is having the wrong data,
    it is not updating the below records.
    SORT itab BY matnr werks.
      DELETE ADJACENT DUPLICATES FROM itab COMPARING matnr werks.
      LOOP AT itab INTO w_itab.
        CALL FUNCTION 'BAPI_REQUIREMENTS_GETDETAIL'
       EXPORTING
         material               = w_itab-matnr
         plant                  = w_itab-werks
         requirementstype       = ' '
         version                = c_00
         reqmtsplannumber       = ' '
    *       MRP_AREA               =
    *       MATERIAL_EVG           =
       TABLES
        requirements_out        = it_reqout[]
         return                 = it_return
        IF NOT it_reqout[] IS INITIAL.
          LOOP AT jtab INTO w_jtab
                            WHERE matnr = w_itab-matnr
                            AND   werks = w_itab-werks.
            wa_chrq-date_type = '1'.
            wa_chrq-req_date  = w_jtab-dats.
            wa_chrq-req_qty   = w_jtab-qty.
            wa_chrq-unit      = w_jtab-uom.
            wa_chrq-prod_ves  = w_jtab-prdver.
            APPEND wa_chrq TO it_chrq.
            CLEAR wa_chrq.
          ENDLOOP. " jtab
    *      AT END OF werks.
    *       ON CHANGE OF w_jtab-werks.
          CALL FUNCTION 'BAPI_REQUIREMENTS_CHANGE'
            EXPORTING
              material                       = w_jtab-matnr
              plant                          = w_jtab-werks
              requirementstype               = ' '
              version                        = c_00
              reqmtsplannumber               = ' '
              vers_activ                     = c_x
    *                 REQUIREMENT_PARAM              =
    *             MRP_AREA                       =
    *         do_commit                      = c_x
             update_mode                    = c_x
             delete_old                     = ' '
    *            NO_WITHDR                      = ' '
    *            MATERIAL_EVG                   =
          IMPORTING
            requirement_item_out            = it_chreqout
            TABLES
             requirements_schedule_in       = it_chrq
    *   REQUIREMENTS_CHAR_IN           =
              return                        = it_chret
          IF  it_chreqout IS INITIAL.
            LOOP AT it_chret INTO wa_chret WHERE type EQ 'E'.
              WRITE:/ 'PIR cannot be modified for ',30 w_jtab-matnr,
                                                                        54 w_jtab-werks,
                                                                        65 wa_chret-message.
            ENDLOOP. " it_chret
          ELSE.
    Edited by: kishan P on Oct 12, 2010 11:07 AM
    Edited by: Ganesh Reddy on Oct 12, 2010 1:25 PM

    Dear Manikandan K,
    Regarding the message we can tell you that the error message           
    "Item is not a component of the referenced Work Order" usually appears 
    because there is a case sensitive problem between the item code given  
    in the BOM and the item code given in the item master data.            
    Please check if the item codes of the BOM are exactly the same as the  
    codes given in the item master data. There should not be any differences
    between spelling of the codes (for example item code in the item master
    data is with capital letters X00014447 while the item code in the BOM  
    is with normal letters x00014447).                                                                               
    In case you find item with this issue please correct its item code     
    in the BOM manually so it will be exactly identical with the code given
    in the item master data.                                               
    Regards,
    Marcella Rivi
    SAP Business One Forums Team

  • Function Module or BAPI to update the cheque payments

    Hi Everyone,
    I would like to know whether we have any Function Module or BAPI which can update the cheque payment or its attributes into SAP.
    Thanks,
    KC
    Message was edited by:
            kittu chowdary

    Aniruddha,
    Does this BAPI update the Transactions FCH6, FCH9 ?
    Thanks,
    KC

  • Problem in updating the GR processing time using BAPI 'BAPI_SAG_CHANGE'

    Hi,
    I am using the BAPI 'BAPI_SAG_CHANGE' for uopdating the GR processing time(BAPIMEOUTITEM-GR_PR_TIME) of the scheduling agreements.
    Issue: when there is no value maintained for GR processing time for a particular scheduling agreemnet the BAPI updates the GR processing time successfully but when there is some value already existing for a particular scheculing agreement then the BAPI does not update this field eventhough the return parameter shows the message 'successfully updated'.   
    Can somebody suggest what could be the reason.
    OR
    Is there any other way/FM to update the scheduling agreements.  
    Thanks,
    Ravindra

    This appears to be old-style BAPI, with ....X tables.  Did you populate the field in the X version of the outitem for the column(s) to be changed?  Did you call the COMMIT bapi after the update?

  • Updating the database using z bapi without deleting existing data

    hi every body,
    i am using a zbapi in that i am updating a table which is having 40 fields but i am modifying the only four fields but it is deleting the remaining field entries
    i am now attaching the code what i have used
    ZMPETS_SHIPHDR-SHIPDOCNO    = wf_shipdocno.
    ZMPETS_SHIPHDR-VENACCEPTIND = VENACCEPTIND.
    ZMPETS_SHIPHDR-LASTCHANGEDT = SY-DATUM.
    ZMPETS_SHIPHDR-LASTCHANGEBY = SY-UNAME.
    ZMPETS_SHIPHDR-LOEKZ        = ' '.
    CALL FUNCTION 'Z_MPETS_SAVE_SHIPHDR'
      EXPORTING
        zmpets_shiphdr_save       = ZMPETS_SHIPHDR.
    *COMMITING THE UPDATION.
       CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        IMPORTING
          RETURN = RETURN.
    UPDATING THE SHIPMENT ACTIVITY TABLE.
    ZMPETS_SHIPACTIV-PETSDOCNUMBER = wf_shipdocno.
    ZMPETS_SHIPACTIV-LOEKZ    = ' '.
    ZMPETS_SHIPACTIV-ACTIVITY = '20'.
    CALL FUNCTION 'Z_MPETS_SAVE_SHIPACTIV'
      EXPORTING
        zmpets_shipactiv_save       = ZMPETS_SHIPACTIV.
    in the upper function module the code
    is
    modify zmpets_shipactiv from zmpets_shipactiv_save.
    we have to use this compulsory as it is client's standard
    *COMMITING THE UPDATION.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        IMPORTING
          RETURN = RETURN.
    kindly give me reply
    i will reward the points for a best reply

    Welcome to SDN!
    You will need to pass all 40 fields into your BAPI structure (ZMPETS_SHIPACTIV). The problem is that when you use the modify from statement, the BAPI updates the DB as-is from the BAPI structure, and since you are passing it only 4 values, it defaults the others to space.
    Do this:
    SELECT * FROM ZMPETS_SHIPACTIV WHERE <specify key fields here>
    and then
    ZMPETS_SHIPACTIV-PETSDOCNUMBER = wf_shipdocno.
    ZMPETS_SHIPACTIV-LOEKZ = ' '.
    ZMPETS_SHIPACTIV-ACTIVITY = '20'.
    CALL FUNCTION 'Z_MPETS_SAVE_SHIPACTIV'
    EXPORTING
    zmpets_shipactiv_save = ZMPETS_SHIPACTIV.
    This should work.
    Hope this helps.
    Sudha

  • 'BAPI_ALM_ORDER_MAINTAIN' Not Updating Fields

    Hi,
    We are using BAPI_ALM_ORDER_MAINTAIN to update Special Stock indicator
    (RESB-SOBKZ) at component level for a service order (IW32).
    BAPI is not updating the value which we are passing for this field but
    intrestingly BAPI is updating rest of the fields at component level,
    like Component Quntity, Componen Plant etc. Only Special Stock
    Indicator field is an exception.
    We are passing value in "BAPI_ALM_ORDER_COMPONENT-SPECIAL_STOCK" field
    and updating BAPI Update table with X for this field.
    Can somebody provide help on this.
    Steps for the Reconstruction 
    Below is the source code which i am using to update Srvice order via
    this BAPI
    REPORT zbapi .
    DATA t_meth TYPE TABLE OF bapi_alm_order_method.
    **Internal table for Operation (BAPI)
    DATA t_oper TYPE TABLE OF bapi_alm_order_operation.
    DATA t_comp TYPE TABLE OF bapi_alm_order_component.
    **Internal Table for Opertaions UP (BAPI)
    DATA t_comp_up TYPE TABLE OF bapi_alm_order_component_up.
    **Internal table for BAPI Return code
    DATA t_ret TYPE TABLE OF bapiret2.
    ***WORK AREA DECLARATIONS
    **Work Area for Hedaer
    DATA:wa_header TYPE caufvdb,
    wa_meth TYPE bapi_alm_order_method,
    wa_op TYPE afvgb,
    wa_comp TYPE resbb,
    wa_comp1 TYPE bapi_alm_order_component,
    wa_comp_up TYPE bapi_alm_order_component_up,
    wa_oper TYPE bapi_alm_order_operation.
    PARAMETERS:TEST.
    ****Fill Method Internal table
    CLEAR wa_meth.
    wa_meth-method = 'SAVE'.
    APPEND wa_meth TO t_meth.
    wa_meth-refnumber = sy-tabix.
    wa_meth-objecttype = 'COMPONENT'.
    wa_meth-method = 'CHANGE'.
    wa_meth-objectkey(12) = '000004000104'.
    wa_meth-objectkey+12(4) = '0010'.
    wa_meth-objectkey+16(4) = '0010'.
    APPEND wa_meth TO t_meth.
    **Component Internal table
    wa_comp1-reserv_no = '0000001072'.
    wa_comp1-res_item = '0001'.
    wa_comp1-activity = '0010'.
    wa_comp1-item_number = '0010'.
    wa_comp1-special_stock = 'B'.
    wa_comp1-requirement_quantity = '15'.
    wa_comp1-stge_loc = '0001'.
    wa_comp1-backflush = 'X'.
    APPEND wa_comp1 TO t_comp.
    **Component Update Internal table
    wa_comp_up-special_stock = 'X'.
    wa_comp_up-backflush = 'X'.
    wa_comp_up-requirement_quantity = 'X'.
    wa_comp_up-stge_loc = 'X'.
    APPEND wa_comp_up TO t_comp_up.
    **Call Bapi
    BREAK-POINT.
    CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
    TABLES
    it_methods = t_meth
    it_component = t_comp
    it_component_up = t_comp_up
    return = t_ret.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

    Hi Ferry,
    1. I have also tried ur given code before BAPI_TRANSACTION_COMMIT.
        l_fname = 'SOBKZ'.
        l_fvalue = 'U'.
        CALL FUNCTION 'CO_BH_MOD_SINGLE_FIELDS'
          EXPORTING
            aufnr_imp = wa_meth-objectkey(12)
            field1    = l_fname
            value1    = l_fvalue.
    but this program is giving dump for only this particular Value saying that This is PROTECTED field.
    Can anyone help me out on How to Update Special Stock Indicator on Components Tab of Maintenance Order (IW32).
    If anyone has faced such type of problem & solved it then please let me also.
    2. Which BADI to use for Updating Special Stock Indicator when we press enter on Components tab in Transaction IW32 ?..
    Thanks in advance,
    Hope to get the solution soon from all SAP gurus.
    and help will be appriciated .
    Gaurav.

  • Time Limit exceeded Error while updating huge number of records in MARC

    Hi experts,
    I have a interface requirement in which third party system will send a big file say.. 3 to 4MB file into SAP. in proxy we
    used BAPI BAPI_MATERIAL_SAVEDATA to save the material/plant data. Now, because of huge amount of data the SAP Queues are
    getting blocked and causing the time limit exceeded issues. As the BAPI can update single material at time, it will be called as many materials
    as we want to update.
    Below is the part of code in my proxy
    Call the BAPI update the safety stock Value.
        CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
          EXPORTING
            headdata                    = gs_headdata
            CLIENTDATA                  =
            CLIENTDATAX                 =
           plantdata                   = gs_plantdata
           plantdatax                  = gs_plantdatax
           IMPORTING
              return              = ls_return.
        IF ls_return-type <> 'S'.
          CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
          MOVE ls_return-message TO lv_message.
    Populate the error table and process next record.
          CALL METHOD me->populate_error
            EXPORTING
              message = lv_message.
          CONTINUE.
        ENDIF.
    Can any one please let me know what could be the best possible approach for this issue.
    Thanks in Advance,
    Jitender
    Hi experts,
    I have a interface requirement in which third party system will send a big file say.. 3 to 4MB file into SAP. in proxy we
    used BAPI BAPI_MATERIAL_SAVEDATA to save the material/plant data. Now, because of huge amount of data the SAP Queues are
    getting blocked and causing the time limit exceeded issues. As the BAPI can update single material at time, it will be called as many materials
    as we want to update.
    Below is the part of code in my proxy
    Call the BAPI update the safety stock Value.
        CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
          EXPORTING
            headdata                    = gs_headdata
            CLIENTDATA                  =
            CLIENTDATAX                 =
           plantdata                   = gs_plantdata
           plantdatax                  = gs_plantdatax
           IMPORTING
              return              = ls_return.
        IF ls_return-type <> 'S'.
          CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
          MOVE ls_return-message TO lv_message.
    Populate the error table and process next record.
          CALL METHOD me->populate_error
            EXPORTING
              message = lv_message.
          CONTINUE.
        ENDIF.
    Can any one please let me know what could be the best possible approach for this issue.
    Thanks in Advance,
    Jitender

    Hi Raju,
    Use the following routine to get fiscal year/period using calday.
    *Data definition:
    DATA: l_Arg1 TYPE RSFISCPER ,
          l_Arg2 TYPE RSFO_DATE ,
          l_Arg3 TYPE T009B-PERIV .
    *Calculation:
    l_Arg2  = TRAN_STRUCTURE-POST_DATE. (<b> This is the date that u have to give</b>)
    l_Arg3  = 'V3'.
    CALL METHOD CL_RSAR_FUNCTION=>DATE_FISCPER(
      EXPORTING I_DATE = l_Arg2
                I_PER = l_Arg3
      IMPORTING E_FISCPER = l_Arg1  ).
    RESULT = l_Arg1 .
    Hope it will sove ur problem....!
    Please Assign points.......
    Best Regards,
    SG

  • Custom program for availability check and update for existing sale order at Item level(VA02)

    Hi,
    I came to know Bapi_Saleorder_Simulate can be used for availability check and update an existing sale order.but there is no sample program explaining the process.I have tried this by passing parameters ORDER_HEADER_IN , ORDER_ITEMS_IN  ,ORDER_PARTNERS and ORDER_SCHEDULE_EX(for getting details),also i have assigned the sale document number ,custom document type(ZSO) in ORDER_HEADER_IN . while executing the BAPI I am getting the error external number range is not assigned for the document type ZSO . I am confused on seeing this error. It is possible to do availability check for existing sale order using this BAPI. Please explain how to achieve this.It will be really helpful if it is expalained with an example.   
    Regards,
    Shanmuga

    Hello, I think you may have been misinformed about this BAPI updating a sales order at item level. As far as I understand it this BAPI can be used to simulate the creation of a sales order which obviously would include and ATP check. This is why it is giving the error because it is simulating creation but you are entering a value in a field that should be automatically generated (i.e. the sales order number). For change the sales order at item level have you looked at BAPI_SALESORDER_CHANGE? I pretty sure this BAPI both updates sales order (header or item level) and can do an ATP first.
    Points are always welcome if you feel an answer has been helpful.

  • IS-OIL - Invalid ROLLBACK WORK in an update function module

    Hi,
    I am getting this dump which points to CL_PO_HEADER_HANDLE_MM========CP.
    In the system Update Records (SM13) there is an error for transaction O4NM for custom function ZOIJ_UPDATE_RELATED_DOCS.
    I have no experience with OIL module so any advice on how to go about tracing the cause of this error would be appreciated.
    Regards,
    Warren.

    Hi Christian,
    I am not sure how the update is being done. Am trying to hold of the documents that caused the error so that I can replicate it.
    You are correct, the dump only occurs occassionally and not every time.
    I have tried to find the sales doc number but unfortunately this is not in the dump.
    I did a where used list on the function and found one where it is called in update task which I think is where it is falling over:
    CODE:
    in cases where the nomination update is called
    from a CT contract, sales order etc
    we dont want to update the related document
    or it will cause locking issues and
    circular reference
    flag can be set in BAPI header
    Further to this
    there are cases where there are many nomination Idocs
    entering the system,
    the nomination update calls the
    OIJU_RD_UPDATE_OBJ_ENTRIES function
    the related document update calls the same function
    this is normally not a problem as the V2 update will
    not intefere with the normal V1 update
    but in the case of multiple nomiantions, even when called
    synchronously, the V2 update from the first related doc\
    update is causing issues with the secon nomination V1 update
    deadlocks ensue
    therefore - setting the flag to '1' in the BAPI header will e
    ensure the related document update is called in the same task
    in cases = '1' the update is called from validation
    routine in order for message handling
        CASE is_nom_header-zz_no_rel_upd.
          WHEN space.
    **>>> lock CT contracts to be updated in update task      "SD1K952062
    **--- exported in method DATABASE_UPDATE_PREPROCESSING
            import ZOIJ_EVENT to ct_nom_event from memory id 'ZOIJCTLOCK'
            delete ct_nom_event
               where cre_name eq space
               and   updkz    eq space.
    **>>> field changes which also need to be updated       
       into the related document (STO/PO/SO) will be
       updted into CT via the related doc i.e.
       BAPI update to STO/PO/SO
       other changes i.e. the event dates are updated
       directly from NOMI into the CT contract
       for those cases we need to lock the CT contract
       here
    **>>> check how the CT contract needs to be updated
       Nothing changed =  from NOMI directly
       Data changed    =  via related document
            call function 'ZOIJ_CHECK_DATA_CHANGED'
               EXPORTING  nomtk    = is_nom_header-nomtk
                          i_nomh   = is_cd_oijnomh_new
                          i_nomi   = lt_nomi
               CHANGING   chg_flag = chg_flag
               EXCEPTIONS nothing_changed = 4
                          data_changed    = 8
                          others          = 12.
            if sy-subrc eq 4 and                            
               chg_flag is initial.                        
    **--- direct update from NOMI if event dates have changed
       check if such changes and lock the CT contract
              call function 'ZOIJ_LOCK_RELATED_CONTRACTS'
                 tables it_oijnomi = lt_nomi
                        it_oijne   = ct_nom_event.
           endif.                                           
    **<<< end                                               
            CALL FUNCTION 'ZOIJ_UPDATE_RELATED_DOCS' IN UPDATE TASK
                 EXPORTING
                      nomtk    = is_nom_header-nomtk
                      mem_tab  = mem_tab
                      i_nomh   = is_cd_oijnomh_new
                      i_nomi   = lt_nomi
                 TABLES
                      it_oijne = lt_oijne                      
                 EXCEPTIONS
                      error    = 1
                      OTHERS   = 2.

  • Mobile number is not uploading for BP master data creation using BAPI ?

    Hi,
    I am creating Business Partner Master data in ISU/CCS using the BAPI "BAPI_ISUPARTNER_CREATEFROMDATA". Uploading data from Excel.
    Successfully uploading and creating new Business Partners apart from Mobile number, nick name,middle name, and name of birth fields.
    There are 2 issues i am facing:
    1. There is no field name is called Mobile number (data element AD_MBNMBR1) in structures of that BAPI.
    2. Nick, middle and birth names fields are there, but they are under the Expand(+ symbol) in FPP2 (FPP1) Tcode. That's why these fields are not uploading.
    How to upload them?
    Please help me out.
    Thanks
    Sarayu Parvathaneni.

    Hello Roopesh,
    Ususally, to make the BAPI update the database, you have to run BAPI
    BAPI_TRANSACTION_COMMIT after BAPI_PRDSRVAPS_SAVEMULTI2 is executed.
    In se37-> You may insert
    BAPI_PRDSRVAPS_SAVEMULTI2
    BAPI_TRANSACTION_COMMIT
    in the Menu-->function module >test>test sequences.
    Also as Mani said, if the update is successful the return parameter will be '0'.
    Regards,
    Ademola

  • BAPI - Locking the Material

    Hi Guru's,
    I'm using the BAPI_GOODSMVT_CREATE to do the Movement types 101.
    The problem is updating perfectly, but if i process the number of records at the same time with the same material number, it is giving the error as
    "The XXXX Data is locked by the user XXXX". I know this error is coming because the BAPI is still working on updating the material data for the previous movement, at the same time the program is trying to do the movement type.
    My question is hoe to check whether the BAPI is updating the Table or not???
    Thanks,
    Adi.

    write a select single to check if the bapi updated the table
    or in the bapi_transaction_commit use wait = 'X'.
    check [this discussion on SAP Fans|http://www.sapfans.com/forums/viewtopic.php?f=13&t=309992]
    MM BAPI Commit - Lock Issues

Maybe you are looking for