Updation in synchronous mode using bapi

hi all ,
       i have a requirement to update master table using bapi /SAPMP/BAPI_MATERIAL_SAVEDATA  where has it is taking more time can any one of you sugguest what will be the best approach which i can improve the execution time and can u tell me whether i can execute bapi in synchronous mode.
with regards,
abaper

Hi,
You can go for either BDC or LSMW also.
Regards,
Renjith Michael.

Similar Messages

  • Planner group is not updated in service notification using BAPI

    Hi,
    Planner group is not updated in service notification using BAPI BAPI_ALM_ORDER_MAINTAIN.
    I have written the below code, but planner group is not updated in the service notification.
    Please advice which parameters do i need to pass to update planner group in the service notification.
              wa_methods-refnumber      = '000001'.
              wa_methods-objecttype     = 'PARTNER'.
              wa_methods-method         = 'CREATE'.
              wa_methods-objectkey      = wa_subscr1-aufnr.
              APPEND wa_methods TO i_methods.
              wa_methods-refnumber      = '000002'.
              wa_methods-objecttype     = 'HEADER'.
              wa_methods-method         = 'CREATE'.
              wa_methods-objectkey      = wa_subscr1-aufnr.
              APPEND wa_methods TO i_methods.
              wa_methods-refnumber      = '000000'.
              wa_methods-objecttype     = ' '.
              wa_methods-method         = 'SAVE'.
              APPEND wa_methods TO i_methods.
              REFRESH i_partner.
              CLEAR wa_partner.
              wa_partner-orderid        = wa_subscr1-aufnr.
              wa_partner-partn_role     = 'VW'.
              wa_partner-partn_role_old = ''.
              wa_partner-partner        = wa_subscr1-parnr.
              wa_partner-partner_old    = ''.
              APPEND wa_partner TO i_partner.
              REFRESH i_planrgrp.
              CLEAR wa_planrgrp.
              wa_planrgrp-orderid        = wa_subscr1-aufnr.
              wa_planrgrp-plangroup      = wa_subscr1-ingpr.
              APPEND wa_planrgrp TO i_planrgrp.
              REFRESH i_planrgrp_up.
              CLEAR wa_planrgrp_up.
              wa_planrgrp_up-orderid     = wa_subscr1-aufnr.
              wa_planrgrp_up-plangroup   = 'X'.
              APPEND wa_planrgrp_up TO i_planrgrp_up.
    *----Change order details with Technician name
              CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
                TABLES
                  it_methods   = i_methods
                  it_header    = i_planrgrp
                it_header_up = i_planrgrp_up
                  it_partner   = i_partner
                  return       = i_return.
    Thanks & regards,
    Krishna

    Try this way
    CALL FUNCTION 'BAPI_SERVNOT_CREATE'
    EXPORTING
    * EXTERNAL_NUMBER =
    notif_type = 'S3'
    notifheader = ls_notif_h
    * TASK_DETERMINATION = ' '
    * SENDER =
    * ORDERID =
    IMPORTING
    NOTIFHEADER_EXPORT = ls_notif_e
    TABLES
    * NOTITEM =
    * NOTIFCAUS =
    * NOTIFACTV =
    * NOTIFTASK =
    * NOTIFPARTNR =
    * LONGTEXTS =
    * KEY_RELATIONSHIPS =
    return = lt_return
    * IF lt_return IS INITIAL.                                               " <<< Comment this lie
    read table  lt_return into ls_return with key type = 'E'. " << Change
    if sy-subrc ne 0.                                                             " << Change
    COMMIT WORK AND WAIT.
    write: / ls_notif_e-NOTIF_NO.
    ELSE.
    LOOP AT lt_return INTO ls_return.
    WRITE:/ 'errors'.
    * ls_return.
    ENDLOOP.
    endif.

  • Updating T'code ME23N using BAPI's

    Dear All,
    I am updating T'code ME23N using BAPI  " BAPI_PO_CHANGE". First i m tried in SE37 there its not updating it giving error like " PO could not be changed using the Enjoy-BAPI"  for this  i m trying in 4.6c.
    Here i have to update only two check boxes those are NO_MORE_GR(ELIKZ) and FINAL_INV(EREKZ).
    Please tell me any one there are  any other BAPI's are  avialable or how to slove this porblem.
    Best Regards,
    Srinivas.

    Hello
    I just have run this code in 4.6C. It working fine.
    DATA: xreturn  like BAPIRET2      occurs 0 with header line,
          xpoitem  like BAPIMEPOITEM  occurs 0 with header line,
          xpoitemx like BAPIMEPOITEMX occurs 0 with header line.
    xpoitem-po_item = p_ebelp.  " set position here
    xpoitem-no_more_gr = 'X'.
    xpoitem-final_inv = 'X'.
    append xpoitem.
    xpoitemx-po_item = p_ebelp. " set position here
    xpoitemx-no_more_gr = 'X'.
    xpoitemx-final_inv = 'X'.
    append xpoitemx.
    CALL FUNCTION 'BAPI_PO_CHANGE'
         EXPORTING
                  purchaseorder    = p_ebeln "set ebeln here
         TABLES
                  return           = xreturn
                  poitem           = xpoitem
                  poitemx          = xpoitemx.
    if sy-subrc = 0.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
           EXPORTING WAIT = 'X'.
    endif.

  • Issue in material master update from presentation server  using BAPI....

    Hi Guru's...
    i am trying to change the material master from presentation server (desktop flat file)
    using BAPI(BAPI_MATERIAL_SAVEDATA) ....
    while executing my program i am getting the message like material had changed...
    but while in mm02 i am un able to fine the updates...
    please find below program logic and correct me if any mistakes....
    thanks in advance...
    *& Report  ZAREPAS36
    REPORT  zarepas36.
    DATA : gs_bapimathead             TYPE  bapimathead,
           gs_clientdata              TYPE  bapi_mara,
           gs_clientdatax             TYPE  bapi_marax.
    TYPES : BEGIN OF gty_itab1,
            matnr(18),
            matkl(9),
            spart(2),
            ntgew(13),
            gewei(3),
            meins(3),
            END OF gty_itab1.
    DATA : gt_itab1 TYPE STANDARD TABLE OF gty_itab1,
           gwa_itab1 TYPE gty_itab1.
    TYPES: BEGIN OF gty_itab2,
           abc(132),
           END OF gty_itab2.
    DATA: gt_itab2 TYPE STANDARD TABLE OF gty_itab2,
          gwa_itab2 TYPE gty_itab2.
    flat file at selection screen
    PARAMETERS: p_files TYPE string.
    CALL METHOD cl_gui_frontend_services=>gui_upload
      EXPORTING
        filename = p_files
        filetype = 'ASC'
      CHANGING
        data_tab = gt_itab2
      EXCEPTIONS
        OTHERS   = 8.
    LOOP AT gt_itab2 INTO gwa_itab2.
      IF gwa_itab2-abc(1) = 'S'.
        gwa_itab1 = gwa_itab2-abc(132).
        APPEND gwa_itab1 TO gt_itab1.
      ENDIF.
    ENDLOOP.
    loop at gt_itab1 into gwa_itab1.
    *Material
    gs_bapimathead-material    = gwa_itab1-matnr.
    *Material details at client data
    *material group.
    gs_clientdata-matl_group = gwa_itab1-matkl.
    gs_clientdatax-matl_group = 'X'.
    *Division
    gs_clientdata-division = gwa_itab1-spart.
    gs_clientdatax-division = 'X'.
    *Net Weight
    gs_clientdata-net_weight = gwa_itab1-ntgew.
    gs_clientdatax-net_weight = 'X'.
    *Unit of Weight
    gs_clientdata-unit_of_wt = gwa_itab1-gewei.
    gs_clientdatax-unit_of_wt = 'X'.
    *Base Unit of Measure
    gs_clientdata-base_uom = gwa_itab1-meins.
    gs_clientdatax-base_uom = 'X'.
    endloop.
    *calling BAPI for making changes in material and saving thru BAPI.
    CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
      EXPORTING
        headdata    = gs_bapimathead
        clientdata  = gs_clientdata
        clientdatax = gs_clientdatax.
    IF sy-subrc NE 0.
      CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
      WRITE: / 'Error occured while changing material'.
    ELSE.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
      WRITE: / 'material',gs_bapimathead-material,'changed'.
    ENDIF.

    hi hello Guru's
    i resolved the issuee..
    pleaso go thru the below proram logic for your reference..........
    *& Report  ZAREPAS36
    REPORT  zarepas36.
    DATA : gs_bapimathead             TYPE  bapimathead,
           gs_clientdata              TYPE  bapi_mara,
           gs_clientdatax             TYPE  bapi_marax.
    TYPES : BEGIN OF gty_itab1,
            matnr(18),
            matkl(9),
            spart(2),
            ntgew(13),
            gewei(3),
            meins(3),
            END OF gty_itab1.
    DATA : gt_itab1 TYPE STANDARD TABLE OF gty_itab1,
           gwa_itab1 TYPE gty_itab1.
    TYPES: BEGIN OF gty_itab2,
           abc(132),
           END OF gty_itab2.
    DATA: gt_itab2 TYPE STANDARD TABLE OF gty_itab2,
          gwa_itab2 TYPE gty_itab2.
    DATA:ls_return         TYPE bapiret2,
         lt_bapiret2       TYPE standard table of bapiret2.
    flat file at selection screen
    PARAMETERS: p_files TYPE string.
    CALL METHOD cl_gui_frontend_services=>gui_upload
      EXPORTING
        filename = p_files
        filetype = 'ASC'
      CHANGING
        data_tab = gt_itab2
      EXCEPTIONS
        OTHERS   = 8.
    LOOP AT gt_itab2 INTO gwa_itab2.
      IF gwa_itab2-abc(1) = 'S'.
        gwa_itab1 = gwa_itab2-abc(132).
        APPEND gwa_itab1 TO gt_itab1.
      ENDIF.
    ENDLOOP.
    LOOP AT gt_itab1 INTO gwa_itab1.
    *Material
      gs_bapimathead-material    = gwa_itab1-matnr.
    *Material details at client data
    *material group.
      gs_clientdata-matl_group = gwa_itab1-matkl.
      gs_clientdatax-matl_group = 'X'.
    *Division
      gs_clientdata-division = gwa_itab1-spart.
      gs_clientdatax-division = 'X'.
    *Net Weight
      gs_clientdata-net_weight = gwa_itab1-ntgew.
      gs_clientdatax-net_weight = 'X'.
    *Unit of Weight
      gs_clientdata-unit_of_wt = gwa_itab1-gewei.
      gs_clientdatax-unit_of_wt = 'X'.
    *Base Unit of Measure
      gs_clientdata-base_uom = gwa_itab1-meins.
      gs_clientdatax-base_uom = 'X'.
    ENDLOOP.
    *calling BAPI for making changes in material and saving thru BAPI.
    CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
      EXPORTING
        headdata    = gs_bapimathead
        clientdata  = gs_clientdata
        clientdatax = gs_clientdatax
      IMPORTING
        return      = ls_return.
    LOOP AT lt_bapiret2 INTO ls_return.
      EXIT.
    ENDLOOP.
    IF sy-subrc = 0.
      CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
      WRITE: / 'Error occured while changing material'.
    ELSE.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
      WRITE: / 'material',gs_bapimathead-material,'changed'.
    ENDIF.

  • IS-RETAIL: How to update custom enhancement field using BAPI?

    Hi gurus,
    Like ECC BAPI: BAPI_MATERIAL_SAVEDATA,
    This BAPI(BAPI_MATERIAL_MAINTAINDATA_RT) is specific for IS-RETAIL to create and update material master data.
    But now If I append one custom field "ZFIELD" to end of table MARA, my question is how to update this custom enhancement field(ZFIELD) using BAPI(BAPI_MATERIAL_MAINTAINDATA_RT)
    Thanks in advance!

    Hi DongHai,
    I suggest you create your own BAPI. Just copy the codes in BAPI_MATERIAL_MAINTAINDATA_RT and add your custom fields. If you want to append the data of the custom field in table MARA, first, you have to create a structure table then goto SE11, type MARA and display. Click the APPEND STRUCTURE then choose the structure that you've created. Hope this will help.
    Rewards if useful
    Regards,
    Mark

  • Start InfoPackage in dialog mode using BAPI

    Hi all,
    I need to start an InfoPackage in the dialog mode using ABAP coding report. The InfoPackage has to load data from a csv-file from the Client-Substation, therefore it can be started only in dialog mode (“Start Data Load Immediately” is chosen in Schedule tab).
    I use BAPI_IPAK_START functional module for this purpose. But I receive an error “An upload from the client workstation in the background is not possible”, and a message “InfoPackage ZPAK_EUSCSC3BAGELE4JAI3HRM5PHJ could not be started by Bapi_ipak_start”.
    It seems that BAPI_IPAK_START tries to start InfoPackage in the background, regardless of choosing “Start Data Load Immediately” option.
    It is possible to start InfoPackage in the dialog using BAPI?
    Thank you.

    Your problem is, that an Infopackage can only use local files, while it is attached to a running dialog. It has to access your local disc to get the data. If you want to use the Infopackage in a process chain you have to transfer your file to a location where the application server has access. The BAPI_IPAK_START just starts the Infopackage. It does not know where your local environment is, so it cannot find your local disc and cannot access the file.
    You have to options:
    1. Use your local file and start the infopackage by hand. No automation possible.
    2. Put the file somewhere where you can find it via transaction AL11. Then you can access this file without trouble.
    Kind regards,
    Jürgen

  • How to update the Weekly data using BAPI for MD61

    Hi All,
    i have used two BAPI's in my Z program to upload data from flat file to sap-system (BAPI_REQUIREMENTS_GETDETAIL and BAPI_REQUIREMENTS_CHANGE) and i uploaded the Monthly Data from the flat file on sap system successfully.
    but i have to also upload the Weekly Data on the sap system using BAPI.
    is there any BAPI for the same or what can be the solution for the uploading weekly data on sap system ?
    Please reply me.
    Thanks in advance..
    Edited by: Prajapati_Shyam on Dec 29, 2010 4:19 PM

    Hi Jovito,
    thanks for your reply,
    i developed a Z program to upload monthly data as well as weekly data into tcode MD61 by selecting the radio button weekly or monthly but i am not able to upload the weekly data as i didnt' get any BAPI OR any other logic to upload weekly data Or not able to use the existing BAPI BAPI_Requirement_create , because the upload file is in monthly format.
    MD61 tcode can be used for both data (Monthly or weekly data).
    can you suggesst me any BAPI to upload the weekly data or any other logic for the same
    thanks & regards
    Prajapati

  • Update the Oracle Table using BAPI

    Hi All,
        I would like to update Oracle Data Base with my custom BAPI using the Business Logic Transaction.
    Could any one please give me some logic how to do it?.
    Thanks
    R M

    RM,
    Please follow the steps below:
    1) Create and Configure the Data Server for the database you want to access/update (basically
        you are creating a database connection here).
    2) Save and test the connection by clicking the 'Status' button
    3) Create new query template with template type as 'SQL Query' and select the server you have
        configured in step#1
    4) Select the mode as 'Command' and type-in your Insert/Update statements in the 'Fixed Query'
        tab. For example: insert into yourtable values ('[Param.1]','[Param.2]')
    5) Test the query by passing parameters from the 'Parameters' tab. You are supposed to get a
        'Command Execution Successful'  message if the data is successfully posted to the database.
    6) Create a 'SQL Query' action block in your Business logic transaction to access the above query
        and map your Param.1, Param.2 etc. to your BAPI result (on the Link Editor).
    Hope this helps.
    John

  • Batch not updating while creating delivery using bapi

    Hi
    I have used following bapi to create delivery BAPI_DELIVERYPROCESSING_EXEC and passed the following parameters into bapi
    lt_request-document_type = 'A'.
            lt_request-document_numb = deltab-vbeln.
            lt_request-document_item = deltab-posnr.
            lt_request-batch        = deltab-charg.
            lt_request-material = deltab-matnr.
            lt_request-plant = '3200'.
            lt_request-quantity_base__uom = deltab-kwmeng.
            lt_request-delivery_date = sy-datum.
    CALL FUNCTION 'BAPI_DELIVERYPROCESSING_EXEC'
    EXPORTING
    DELIVERY_EXTEND =
    TECHN_CONTROL =
          TABLES
          request = lt_request
          createditems = lt_createditems
          return = lt_return.
    here i am able to create delivery successfully but the batch which i passed in bapi is not getting updated in vl02n to do PGI.
    again i need to go to vl02n and give batch and quanitty manually to do PGI.is there anyway that batch gets updated in vl02n also.
    Regards,
    Venkat.

    Hi
    My answer is pure assumption.
    Please check the following OSS notes
    Note 758810 - BAPI_PO_CHANGE vendor batch and batch not visible
    Note 1230268 - Field Vendor Batch never filled for PO BAPIs
    Please take help from BASIS and SAP, before implementing the OSS note
    Regards
    Madhan D

  • Material Master: Update the Z fields using BAPI

    Hi to all,
    My requirement is simple. But I do not have much knowledge on BAPI. I have got some information that we can extend th BAPI and update the Z fields in material master. I have added the z fields in MARA. So when I call the bapi z fields has to get update.
    Which BAPI can i use? I have got one BAPI - BAPI_MATERIAL_SAVEDATA.   plz suggest me to do it.
    1. how do i enhance the BAPI or extend th BAPI.
    2. Is ther any approch to do it.
    thnks
    Yerukala Setty

    Hi,
    Append the z fields to BAPI_TE_MARA and BAPI_TE_MARAX structures using append structures.
    Populate two structures for the fields in BAPI_TE_MARA and BAPI_TE_MARAX.
    To BAPI_MATERIAL_SAVEDATA, under EXTENSIONIN parameters, pass structure name as BAPI_TE_MARA and Value Part1, 2, 3, 4 with the filled structure info.
    Similarly append X structure as well.
    Regards,
    Ganga

  • How to update j_1ipart1 j_1ipart2 by using bapi BAPI_GOODSMVT_CREATE

    i want to update records in j_1ipart1 , j_1ipart2 , rg1  as it gets updated when posting in MIGO with refer to excise incoice.
    i want to do the same  by using the bapi BAPI_GOODSMVT_CREATE.  Any one who can help me out , for what are the steps involved .
    thanks in advance

    Hi,
    Refer the following SAP notes.
    1. Note 485557 - BAPI_REQUISITION_CREATE: 'EXTENSIONIN' customer enhancements
    2. Note 584902 - BAPI_REQUISITION_CHANGE: ExtensionIn not connected
    3. Note 792132 - EBAN, EBKN: user-defined fields are not filled
    Regards,
    Harish

  • Update the table SCMG_T_CASE_ATTR using BAPI

    Hi Experts,
    I have query regarding bapi BAPI_DISPUTE_ATTRIBUTES_CHANGE.
    what are the values to be passed in attribute of tables section.
    I have pass field name as 'closed_by' (of table SCMG_T_CASE_ATTR) in parameter of bapi (ATTR_ID).
    And attr_value field with 'test'.
    Please help me to update a field value like 'closed_by' of SCMG_T_CASE_ATTR using this bapi.
    Thanks in advance,
    Sahil

    Hi Cristobal,
    Thanks for helping me, however the function does not give me any results, the problem is that this document is a linked object, and not an attachment.
    Thanks for your help.
    Best regards,
    Adriana

  • Problem with updating DB table in using BAPI

    HI,
    The code below does not update the DB table even if the commit work is executed... is there something wrong or missing??? Thanks a lot!
    Technically complete process Order
           CALL FUNCTION 'BAPI_PROCORD_COMPLETE_TECH'
             IMPORTING
               return = i_messages
             TABLES
               orders = i_orders.
             IF i_messages-type NE c_error.
               REFRESH i_messages3.
               CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
                 EXPORTING
                   wait   = 'X'
                 IMPORTING
                   return = i_messages3.
            ENDIF.

    Hi this is your code right.
    You have to check the return table not messages.
    Check the return table is there any message type is there with 'E' .
    if it is there then the commit work won't give the result in fact the BAPI function is not executed successfully.
    If you got any Error message in return table please have a look into that table errors and take the necessary action.
    Pass the required paramaters for the BAPI function module.
    Regards,
    Madan.

  • In MM02 I want to update in Costing2 tab using BAPI

    Hello,
    I am asked to update certain values in MM02 t.code, Costing2 tab. I am asked to do this via BAPI.
    Recording techniques like CATT and BDC doesnt work since the recording cannot capture mouse scrolls which is needed to reach Costing2 tab.
    Can some one advice me on this. I have not worked on BAPI's.
    Thanks in advance,
    CMV

    Hi,
         BAPI_MATINSPCTRL_SAVEREPLICA
    <b>Reward points</b>
    Regards

  • How to update Sales Order status using  BAPI_SALESORDER_CHANGE

    Hi,
    I want to update Sales Order status using BAPI_SALESORDER_CHANGE, this BAPI is called from middle ware, but there is no parameter to pass the status value to this function, please help me how to update sales order status using BAPI only.
    Thanks
    RK

    Hi,
    Can u give me details of what status u would like to update in sales order.
    If we are able to update the status from VA02, Then BAPI will assist for the same.
    Regards.

Maybe you are looking for

  • Getting Pixel values from a RenderedOP

    Hi, I'm trying to run thru the pixels of finalmage : RenderedOp finalImage = JAI.create("subtract",pbSubtracted); and add the the pixels x and y to an array if the colour of the pixel isnt black, what shud i be using, i tried setting it up as a buffe

  • How can I moving Closed Captioning from one stage video to another?

    Someone mistakenly included an MP4 video in a Captivate project. The project won't publish a SWF file (Your computer does not have sufficient memory resources to publish your file), and there are too many Closed Caption items on the stage video to re

  • Film Impact plugins are in the right folder but I'm not seeing them in my effects folder in PP?

    I have properly installed "Film Impact (ver1) Plug ins into the right folder for Premier Pro, (Library/Application Support/Adobe/Common/Plug-ins/7.0/MediaCore) but I don't see them in my "effects" folder in Premier Pro.  BTW, I'm using Premier Pro CC

  • YouTube mobile no longer works

    Android 4.4.2 Firefox 36.0.1 YouTube mobile now sends me back to 'what to watch' whenever I click play. The non mobile site works for the most part except that some vids demand flash. In chrome it works fine. And it was all working fine a while ago.

  • If I do a back up of Mac HD using CCC, will that save everything in Parallels?

    I wish to migrate to a different computer and preserve everything on it as is. For the Windows part, I have Parallels 7. It seems to work well. I usually back up the Mac partition (Mac HD) by cloning with Carbon Copy Cloner, and then using Migration