BAPI to change PO

Hi,
Is there any BAPI to change existing POs?
Regards,
Arun Mohan

try this sample program
parameters :p_ebeln like ekko-ebeln.
data t_bapimepoitem type table of bapimepoitem .
data : wa_bapimepoitem like bapimepoitem .
data : t_bapimepoitemx type table of bapimepoitemx .
data : wa_bapimepoitemx  like  bapimepoitemx .
data : t_return type table of bapiret2.
wa_bapimepoitem-po_item = '00010'.
*wa_bapimepoitem-final_inv ='X'.
clear wa_bapimepoitem-delete_ind .
append wa_bapimepoitem  to t_bapimepoitem .
wa_bapimepoitemx-po_item = '00010'.
*wa_bapimepoitemx-final_inv = 'X'.
wa_bapimepoitemx-delete_ind ='X'.
append wa_bapimepoitemx to t_bapimepoitemx .
call function 'BAPI_PO_CHANGE'
  exporting
    purchaseorder                = p_ebeln
  POHEADER                     =
  POHEADERX                    =
  POADDRVENDOR                 =
  TESTRUN                      =
  MEMORY_UNCOMPLETE            =
  MEMORY_COMPLETE              =
IMPORTING
  EXPHEADER                    =
  tables
    return                       = t_return
    poitem                       = t_bapimepoitem
    poitemx                      = t_bapimepoitemx
  POADDRDELIVERY               =
  POSCHEDULE                   =
  POSCHEDULEX                  =
  POACCOUNT                    =
  POACCOUNTPROFITSEGMENT       =
  POACCOUNTX                   =
  POCONDHEADER                 =
  POCONDHEADERX                =
  POCOND                       =
  POCONDX                      =
  POLIMITS                     =
  POCONTRACTLIMITS             =
  POSERVICES                   =
  POSRVACCESSVALUES            =
  POSERVICESTEXT               =
  EXTENSIONIN                  =
  EXTENSIONOUT                 =
  POTEXTHEADER                 =
  POTEXTITEM                   =
  POPARTNER                    =
call function 'BAPI_TRANSACTION_COMMIT'
EXPORTING
  WAIT          =
IMPORTING
  RETURN        =
field-symbols : <fs_return> like bapiret2.
loop at t_return assigning <fs_return>.
  write :/ <fs_return>.
endloop.

Similar Messages

  • BAPI for changing delivery date and delivery time fields in LIKP table

    Hi All,
         Is there any BAPI or function module to change the delivery date and delivery time in LIKP table ?
    Please tell me experts if exists.
    Thank you,
    Raghu.

    try these:
    BAPI/FM to update LIKP and VTTK tables
    http://sap.ittoolbox.com/groups/technical-functional/sap-dev/bapi-for-changing-sales-headertable-likp-662800

  • Error in bapi while  changing  and add items in transparant table

    data : t_poitems type standard table of bapimepoitem,
           t_poitemx type standard table of bapimepoitemx,
           w_poitems type bapimepoitem,
           w_poitemx type bapimepoitemx,
           t_return type standard table of bapiret2,
           w_return type bapiret2.
    loop at t_modify_detail into w_modify_detail-ebeln.       * populating changing data
    *--&modifying fields
    w_poitems-po_item = w_modify_detail-ebelp.
    w_poitems-material = w_modify_detail-matnr.
            append w_poitems to t_poitems.
    w_poitemx-po_item = w_modify_detail-ebelp.
    w_poitemx-po_itemx = 'X'.
    w_poitems-material = 'X'.
            append w_poitemx to t_poitemx.
    endloop.
          call function 'BAPI_PO_CHANGE'
            exporting
              purchaseorder                =  w_header-ebeln
            POHEADER                     =
            POHEADERX                    =
            POADDRV
           tables
             return                        =     t_return
              poitem                       =    t_poitems
             poitemx                      =     t_poitemx
            POADDRDELIVERY               =      
    call function 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
      WAIT  
    ERROR IS:
    giving error : cl_po_item_handle_mm.................cp
    function in which error showing: mepo docitem_get

    Check this sample code
    http://www.sap-img.com/abap/sample-abap-code-on-bapi-po-change.htm
    BAPI PO CHANGE with MENGE
    Hope it helps to identify your requirement and fix accordingly.
    ashish

  • Can u tell me any predefined BAPI for change and creation of Material

    Hi,
        Can anybody tell me  predefined BAPI for change and creation of Materialmasterand Pricing?
    Thanks & regards,
    Gopianne.

    you can use the BAPI to BAPI_MATERIAL_SAVEDATA create as well as to change material master.
    When changing material master data, you need enter only the material
    number.
    In the header data, you must select at least one view for which data is
    to be created. Depending on the view selected, you must maintain other
    required parameters. If you do not enter values for all of the required
    parameters, the method is ended with an error message.
    The corresponding fields in the tables (such as CLIENTDATA) must first
    be supplied with data by the calling program. An indicator must also be
    set for each of these fields so that the data is written to the database
    by the method. This requires the calling program to supply the
    corresponding field with the indicator in a checkbox table (for example,
    CLIENTDATAX). Checkbox tables exist for tables that do not contain any
    language-dependent texts (MAKT, MLTX), International Article Numbers
    (MEAN), or tax classifications (MLAN). Several data records for a
    material can be created in these tables.
    regards
    vivek
    reward points if it helps

  • Function Module or BAPI for Change Customer Master in Background

    Hi,
    I would like to ask is there any Function Module or BAPI to change the Customer Master in the Background
    Thanks.

    Hi
    Please check the following link
    [FM|http://help.sap.com/saphelp_nw04/helpdata/EN/8f/53b67ad30be445b0ccc968d69bc6ff/content.htm]
    [FM for BAPI|Is there a BAPI or Function module can create a Customer Master record?]
    Hope this link helps you
    Regards,
    Rajani

  • FM or BAPI to change Operation data

    Hi,
    Is there any BAPI to change operation data? BAPI_ALM_ORDER_MAINTAIN is not useful in my case. I want to use   IBAPI_ORDER_OPERATION_CHANGE but not able to get proper documentation for same.Can anyone give me a sample code about how to use IBAPI_ORDER_OPERATION_CHANGE?
    My requirement is to tick check box 'Required Splitting' in operation if some conditions are met. I am planning to do this using cuatomer exit. Everything is working fine only i need to know how to use above BAPI. If this doesn't work then as a last option i will go with BDC.
    Regards,
    Kamal

    Hi Kamal,
    Unfortunately I can not see any BAPI which changes operation data of a production order.
    BAPI_PRODORD_CHANGE is available only for changing header details.
    BAPI_ALM_ORDER_MAINTAIN and IBAPI_ORDER_OPERATION_CHANGE are used for changing maintenance or service orders, and not production orders, most probablty this won't work or cause issues.
    I'm afraid BDC is the only option in this case.
    Regards,
    Marcelo Pacheco

  • Bapi to change travel expense report

    Hi,
       I am working on an program to create a travel expense report using the 'BAPI_TRIP_CREATE_FROM_DATA' FM and it is working fine.However,i am unable to change the trip created using this FM.When i use the SAP transaction TRIP,i am able to change the travel expense report created.I am passing the status approved as '3' and account as '1' in the BAPI.Is there any bapi's available to change the travel expense report created?I would appreciate any assistance.
    Regards,
    Rajiv C

    Dear there is no standard Bapi to change the same, However there is one to delete the same( <b>BAPI_TRIP_DELETE</b>) and then you can create the same.
    Why you not trying to write a new BApi to change the Trip ( as standard is not available).
    See other reply there is step by step process to write a custom bapi.
    Just start you will find it intersting.
    rewardif useful.
    Amit Singla

  • BAPI to change the posting data of invoice document

    Hello All,
          I need a BAPI to change the posting date of the invoice document (Type : RE, Generated from MIRA transaction). Do let me know if you can across a BAPI to do it.
    Thanks,
    Siva.

    BAPI_INCOMINGINVOICE_CHANGE

  • Suggest BAPI for change notification IW52

    Hi,
    Kindly suggest BAPI for change notification IW52.
    Regards,
    Tanaya

    How to find function module or Bapi for particular transaction in sap?
    If you mean that you need to know what BAPI's a particular tranx uses, which I can only assume that's what you mean, then you should access the code behind the transaction and search for 'CALL'. That normally is the standard method that think that most people use. 
    Suppose you want to find the bapi for creating a sales order, you usually use transaction VA01 for this. 
    1. Find out the package of the transaction. 
    Start Va01 go to system --> status. 
    Double click on transaction 
    Package is VA 
    Open this package in SE80 
    Open business engineering-->Business object types 
    Find the BO which sounds the most appropriate 
    I would suggest BUS2032 Sales Order 
    Double click. 
    Open methods. 
    Find the released method with from data or something similar in the name 
    , Createfromdat2 
    Position the cursor in it and click the program button 
    Scroll down to find the bapi used in this method 
    With this way you can also find out programs and FM's 
    2. Start va01 go to system-->status 
    Double click transaction VA01 
    Double click on package 
    Read the application component. (this is SD-SLS Sales) 
    Then open the transaction BAPI 
    Sales and distribution>Sales>sales order 
    createfromdat2 
    Answer: This is  the BAPI for your mentioned   transaction code BAPI_GOODSMVT_CREATE.
    thanks,
    Sankar M

  • Bapi for change work center data

    HIi All
                    I need BAPI to change work center data for all categories and work center change transactions .....IR02 ,CNR2,CR02.
    Thanks in advance .

    Hai,
    Try the fm CRAP_WORKCENTER_CREATE
    BAPI_BUS2054_CHANGE_MULTI
    CRAP_WORKCENTER_CREATE
    Regards,
    Venkat

  • BAPI for Change Customer

    Hi Experts,
    We have a requirement to change the details of a customer. We are using BAPI, "BAPI_CUSTOMER_CHANGEFROMDATA". Change is happening when we try to change details like name, But when we try to change 'country' field, we are getting error saying  "Personal address diffrent from comapany address; change not allowed"..... Can anybody help me with this,,, or can somebody suggest any other BAPI for change customer....
    Thanks and regards,
    Mahendra R

    Hi Mahendra,
    CHek the link below[using BAPI_CUSTOMER_CHANGEFROMDATA1;

  • BAPI for change documents like FB09

    Hi
    I need to change the Assignment Number (ZUONR) Field for several document positions just like FB09 ,
    Does somebody knows a BAPI for change document positions (BSEG) ?
    Regards
    Frank

    Hi,
    Please see this link, It may help you.
    Add documents to materials via BAPI
    Regards,
    Shamma

  • BAPI for "Change Base Planning Object"

    Hi
    Is there any BAPI for "Change Base Planning Object" ( TC KKE2).
    I need to change the Price of a Resource in the Cost Items for a Base Planning Object.
    So if any one know the BAPI for this topic please let me know, and if possible send me your code also it will be really help full.
    Regards

    I didn't find a BAPI to do this. I had to do it by a Batch Input.

  • BAPI for  ""Change Cost Element / Activity Input Planning ""

    Hi
    Is there any BAPI for  ""Change Cost Element / Activity Input Planning "" ( TC KP06) as there is BDC for that but is goes through lot of steps . ( TC OKKS, KP04, KP06 )
    So if any one know the BAPI for the same please let me know,  and if possible send me your code also it will be really help full.
    Regards

    o   OBJECT_INDEX - Index uniquely identifying the row and thus the           
        object. The index must be greater than zero and may only appear once     
        in the table. If the index does not exist in INDEXSTRUCTURE, the row     
        is ignored.                                                                               
    o   COSTCENTER    - Cost center that includes the activity.                                                                               
    o   ACTTYPE       - Activity type that includes the activity. You must       
        fill this together with COSTCENTER. You only need it for an activity     
        input that is activity-dependent.                                                                               
    o   CO_BUSPROC - Business process that includes the activity.                                                                               
    o   ORDERID       - Order that includes the activity.                                                                               
    o   WBS_ELEMENT  - WBS element that includes the activity                                                                               
    You may fill one object only,for example COSTCENTER, CO_BUSPROC,             
    ORDERID, or WBS_ELEMENT.                                                     

  • Bapi to change Standard Values

    Hy,
    can anyone tell me if exists a BAPI to change standard values (times) for production order.
    tks,
    Tiago

    Hello Tiago,
    try with BAPI_PRODORD_CHANGE.
    Best Regards, Dirk

  • BAPI to change STO & Delivery

    hi gurus,
    is there a standard BAPI to change the stock transfer order quantity and delivery quantity in the delivery already created.
    thanks in advance.

    Hi,
    BAPIs are suppose to have same behavior as online transaction. If you can change in ME21N or ME21, BAPI_PO_CHANGE1 and BAPI_PO_CHANGE would behave same way. This behavior has to be consistent.
    thanks,
    Sanjeev

Maybe you are looking for

  • Is it possible to have 64-bit 11g Full Install and 32-Client on 1 computer?

    Here's why I ask: I have installed a full 64-bit 11g R2 install on my Windows 7 D: drive, installed two DB's, worked great. Then I realized application I need to support (Cognos 10.1) requires 32-bit client (for drivers) so I installed the 11g client

  • How can I implement a CUSTOM POPUP (create_popup_2_confirm)

    Hello, I try to implement a Confirm Popup from type custom. All works fine instead of the result. I don't get the supposed values. Every time I select on of the two button I get as result = 'CUSTOM_BTN' ls_button-id = 'AG'.       ls_button-text = 'An

  • Values not saved in "Global Authentication Setup" page

    Hi, I searched a bit in this forum but I couldn't find a related topic. So here is my problem. We are trying to deploy a small NAC lab environment. We use NAC Appliance v4.1. Now the problem is, that I like to set the values for PEAP and EAP-TLS in t

  • 17" display fragments, jitters etc

    I have a recurring problem with my 17" Apple Studio display that I'm running on an older G4 Tower. The display starts to fragment, jitter, etc. as I am using it. It seems to happen more when it has been running for some time, esp. when it goes to sle

  • Classic Debugger

    Hi - Every time I run the debugger, I have to click on "Debugger / Classic Debugger" to switch to the classic, which I prefer.  Is that a way for me to have it default to the Classic Debugger so I don't have to do this every time I start up a debugge