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

Similar Messages

  • I want to update the Custom table using the data available in ITAB.

    Hi,
    I want to updaste the Custom Table which is created by me (Ztable) using the data available in itab.(which i got from defferent standard tables)
    I want to update the custom table using the itab data How is it possible?
    Is any possible by using Modify ?
    DPK.

    example here
    modifying datbase table useing internal table
    advises before updating this datbase table plz lock that table to avoid incosistency
    write the logic for modifying
    Modify the database table as per new dunning procedure
    MODIFY fkkvkp FROM TABLE lt_fkkvkp .
    and finally unlock the table
    example
    *To lock table for further operations
    constants: lc_tabname TYPE rstable-tabname VALUE 'FKKVKP' . "FKKVKP
    CALL FUNCTION 'ENQUEUE_E_TABLE'
    EXPORTING
    tabname = lc_tabname
    EXCEPTIONS
    foreign_lock = 1
    system_failure = 2
    OTHERS = 3.
    IF sy-subrc EQ 0.
    To fetch all the contract accounts for customers of the segment
    Households/SME.
    PERFORM fetch_contract_accounts using lc_tabname .
    ENDIF. " IF sy-subrc EQ 0.
    *wrote the logic
    Modify the database table as per new dunning procedure from internal table
    MODIFY fkkvkp FROM TABLE lt_fkkvkp .
    *unlock the tbale
    CALL FUNCTION 'DEQUEUE_E_TABLE'
    EXPORTING
    TABNAME = uc_tabname .

  • 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.

  • I want to update new tasks by using exit QQMA0014 the notification  qm01

    Hi ,
      i want update some mandatory task from custom table while creating or changing the QM notifiction through tcode QM01 or QM02 by using user exit QQMA0014. am trying to update but its giving one popup message "update was terminated received from author '
    Could you pls provide me solution to update the tasks by using exit. Thanks in advance.

    Please specify your requirement clearly. Are you updating a custom table of any fields in the standard table ?

  • 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

  • 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

  • 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.

  • 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

  • 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.

  • 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

  • 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

Maybe you are looking for

  • Receiving PDF attachment as inline text

    Hi - I recently set up Mail on my iMac with an IMAP account. It looks like the emails I receive with PDF attachments appear as inline text within the body of the email when I download them from the IMAP server. I am able to log onto the IMAP server v

  • 2 Centros needing to have the SAME contents

    I have used PALM for years. I have upgraded to a Centro to keep from having to carry 2 different hand held around (phone & palm). My husband also has a Centro. We would like to be able for our phones to have the exact same information. When I sync hi

  • Lightroom doesn't render final high quality images

    In Lightroom 3.3 rc it seem that I have many more times when Lightroom fails to render the final high quality image.  I see the inital low resolution version shown and the final high resolution version never appears.  Once this happens, I never get t

  • Conflict with Nikon D800 and CS6

    I have been having an issue with files from my D800 when opening them in Photoshop CS6. I should note that this issue has never been a problem with any other camera that I have owned and used with CS6 (D3200, D7000, D80, Kodak Pro SLR N, Hasselblad H

  • Lightroom 6 stops installation. "Installier cannpt be initialized, please download Adobe Support Advisor"

    Second day of the misery. No idea how to fix this. I downloaded the upgrade from Lightroom 5 to 6 and got serial and everything. However while running the setup, the installer stops with the error message  "Installier cannpt be initialized, please do