USE OF BAPI_PO_CHANGE

Hi,
   How can i use to close purchase order with the help of bapi_po_change and purchase request with help of BAPI_PR_CHANGE..
Please elaborate the solution.
regards
kamal
Moderator message: please do your own research before asking.
Edited by: Thomas Zloch on Jan 9, 2011 4:50 PM

hi,
Could you please send me the full code so that i can correct it.
Or u can check the following things.
Here in bapi f.m. u have to pass the 'X' for each parameter alongwith the original hdr / item data.
First read the loop of itab and pass the header data to the same Bapi structure and then pass the bapi structure workarea to the f.m.
try it or let me know the exact problem and error occuring code.

Similar Messages

  • Closing Purchase order using BAPI : BAPI_PO_CHANGE

    Hi ABAPers,
    I have a requirement to develope a new report program which should accept a file which contains a list of PO and related Line Items to be closed. Basically the u201CDelivery completedu201D (EKPO-ELIKZ) check-box should be ticked and the PO should be saved.
    I know I have to use BAPI: BAPI_PO_CHANGE.
    But I am not aware how the parameters of this BAPI is populated.
    Please let me know how to populate the parameters of this BAPI in order to Close the list of POs from file.
    Input for this BAPI - I have only PO number, item number.
    Thanks,
    ~Sachin

    >
    Sachin Dandekar wrote:
    > Hi all,
    >
    > Now I am able to close the PO using BAPI BAPI_PO_CHANGE.
    >
    > Here I have one requirement to stop triggering messages while closing PO.
    > Please tell me how to stop triggering of output type if I close PO using this program.
    >
    > Thanks,
    > ~Sachin
    check parameter to BAPI
    NO_MESSAGING = 'X'

  • How to add New LineItems in PO using BAPI - BAPI_PO_CHANGE

    I have gone thru sdn but didnt get any clear solution......
    I am trying to add New Line Items in a PO using BAPI- BAPI_PO_CHANGE, but getting the following errors.....
    E BAPI             003      Instance 83000625 of object type PurchaseOrder could not be changed
    E MEPO           000      Purchase order still contains faulty items
    E SE                026      You cannot maintain service specs. due to incomplete transfer structure
    E ME                003      Plant cor not defined (please check your input)
    suggest any solutions
    here I am trying to add '00040' line item in the Existing PO & add a Service line in the added line item...
      itemx-po_item = '00040'.
      itemx-po_itemx = c_x.
      item-pckg_no = '0000000001'.
      append item. clear item.
      clear service[].
      service-pckg_no = '0000000001'.
      service-line_no = '0000000001'.
      service-subpckg_no = '0000000002'.
      service-from_line = '1' .
      append service. clear service.
      service-pckg_no = '0000000002'.
      service-line_no = '0000000001'.
      service-ext_line = '0000000040'.
      service-quantity = wa_datatab-col10 .
      service-short_text = wa_datatab-col9 .
      service-GR_PRICE = wa_datatab-col12 .
      service-USERF1_NUM  = wa_datatab-col13 .
      append service. clear service.
    then calling 'BAPI_PO_CHANGE' with item, account, condition, services data and its corresponding itemx,accountx,conditionx....
    Kindly send me if there is any code corrections....

    Hi Srikar,
            Check these threads on adding a line item using BAPI_PO_CHANGE
          [Re: FM BAPI_PO_CHANGE & new PO line items;
         [.BAPI_PO_CHANGE - ME 664;
    It may help you
    Regards,
    Pavan.

  • Adding a new schedule line for a line item using bapi_po_change

    hi experts,
    can i know how to add a new schedule line for a line item using<u> bapi_po_change</u>. what are the parameters that need to be filed. i filled poitem with total quantities and poschedule table with 2 different schedule lines and passing as the parameter.but then i get the error saying item 0000 doesnt exist

    Hi,
    Please check if you have properly populated the following fields in POSCHEDULE:
    PO_ITEM
    SCHED_LINE
    and the other fields required for your schedule line such as delivery date and quantity, etc.
    After that, make sure to properly populate fields in POSCHEDULEX:
    PO_ITEM -> same value as found in POSCHEDULE
    SCHED_LINE -> same value as found in POSCHEDULE
    All other values populated in POSCHEDULE should be ticked as 'X' in POSCHEDULEX.
    Kind Regards,
    Darwin
    Kind Regards,
    Darwin

  • I want to change the amount in condition sheet using bapi_po_change

    hi experts:
    i want to use the bapi_po_change to change the amount in condition sheet in me23n.
    the parameter i set is below:
    DATA:
    lt_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE, "返回内容
    lt_poheader like bapimepoheader,
    lt_poheaderx like bapimepoheaderx,
    ls_pocondheader like BAPIMEPOCONDHEADER occurs 0 with header line,
    ls_pocondheaderx like BAPIMEPOCONDHEADERX occurs 0 with header line,
    ls_pocond like BAPIMEPOCOND occurs 0 with header line,
    ls_pocondx like BAPIMEPOCONDX occurs 0 with header line,
    lt_POITEM LIKE BAPIMEPOITEM OCCURS 0 WITH HEADER LINE,"
    lt_POITEMx LIKE BAPIMEPOITEMx OCCURS 0 WITH HEADER LINE,
    l_flag(1),
    g_text(50) TYPE c.
    CLEAR: l_flag.
    lt_POITEM-po_item = '00020'.
    lt_poitem-NET_PRICE = '15.10'.
    APPEND lt_POITEM.
    CLEAR lt_POITEM.
    lt_POITEMx-po_item = '00020'.
    lt_POITEMx-po_itemx = 'X'.
    lt_POITEMx-NET_PRICE = 'X'.
    APPEND lt_POITEMx.
    CLEAR lt_POITEMx.
    ls_pocond-condition_no = '0000006887'.
    ls_pocond-itm_number = '000001'.
    append ls_pocond.
    ls_pocondx-condition_no = '0000006887'.
    ls_pocondx-itm_number = '000001'.
    append ls_pocondx.
    CALL FUNCTION 'BAPI_PO_CHANGE'
    EXPORTING
    purchaseorder = '4500000002'
    TABLES
    return = lt_return
    POITEM = lt_POITEM
    POITEMx = lt_POITEMx
    POCOND = ls_pocond
    POCONDX = ls_pocondx.
    but it doesn't work ,it goes to change the net price, how should i set the parameter? hunger for ur advice!!

    Hi,
    are you using BAPI_TRANSACTION_COMMIT or a COMMIT WORK after the bapi call?
    Have a look at the code of fm ME_CCP_TPO_PRICE_CHANGE maybe that can help.
    Best regards
    Edited by: pablo casamayor on Jun 6, 2008 10:15 AM

  • Warning in BAPI_PO_CHANGE using a custom field

    Hi all,
       I have a custom field called 'zpoblock' added to the header level in the purchase order.   I have added the new field to the 'Include CI_EKKODB'.    I need to use the BAPI_PO_CHANGE in order to unblock the purchase orders.
    When I ran my custom program to unblock the po, i got a warning as shown below though the program updated the PO successfully.
    W  ME  887   Error transferring ExtensionIn data for enhancement CI_EKPODB
    S  06   023  Standard PO 450012345 changed.
    I have assigned the structure to ExtensionIn.
    There are some custom fields at the PO line items which are not relevant for my changes.
    Is this warning acceptable in the program ?  What can i do to resolve it ?  Would anyone have a sample program that can show me how to mass unblock purchase orders using  BAPI_PO_CHANGE for a custom field ?
    thanks
    Joyce

    Hi,
    BAPI's and BAdI's are two quite different things. You'll find quite a lot of information on both of these on SDN - BAdI's for example:
    https://wiki.sdn.sap.com/wiki/display/ABAP/EnhancementsandModifications-BADI,EnhancementFramework,UserExits,+BTE
    https://wiki.sdn.sap.com/wiki/display/ABAP/ConceptsandWorkingwithBADI
    Hope that helps, regards, David

  • Unable to Update PO Customerdata tab at Item level using BAPI_PO_CHANGE

    Dear Experts,
    I am unable  to Update PO customer tab data at item  level using BAPI :BAPI_PO_CHANGE.
    I am passing the data structure  through  EXTENSIONOUT is refered with BAPIPAREX structure.
    Can any one help on this.
    Best regards,
    Venkata Siva.

    Hi Venkat,
    Check this note 1033925.[Using Extension|Update EKKO table for the custom field through BAPI;
    Regards,
    Madhu.

  • Re-price a PO using BAPI_PO_CHANGE

    Hi All,
    I want to reprice a PO using FM BAPI_PO_CHANGE. Can anyone help me on this or provide a piece of code.
    Thanks in advance.
    Regards,
    John

    check the prgm
    http://www.sap-img.com/abap/sample-abap-code-on-bapi-po-change.htm

  • Delivery cost not created during GRN of PO using BAPI

    I have a customized program which use BAPI - BAPI_PO_CREATE1 to create PO, PO was created successully.
    then program will use BAPI - BAPI_PO_CHANGE to update condition pricing, which is also executed succesfully. all condition pricing (KONV) updated correctly.
    Lastly, the program will use BAPI - BAPI_GOODSMVT_CREATE to create GRN and update delivery cost. However in my case, the delivery cost is not update, EKBZ table record is not created, as well as GRN item line table MSEG table is not updated with delivery cost.
    Anyone face this type of problem before?What is the possible causes?
    Any help and suggestion is greatly appreciated.

    Lai,
    you should try asking this on ABAP forum thread. You will get a response. May be there is another BAPI u should use or may be you the usage of BAPI is incomplete. Pl confirm with ABAP forum.
    Rgds

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

  • BAPI_PO_CHANGE taking default values for zaro value Condition update

    Hi,
    I am using std BAPI_PO_CHANGE for line item condition type value update.
    I want to update the condition value with zero, however it is picking some default value 10 $.
    I want to know from where it is picking that value.
          wa_item-po_item   = ls_po_detail-line_item_number.
                  wa_item-final_inv = c_x.
                  APPEND wa_item TO lt_item.
                  wa_itemx-po_item      = ls_po_detail-line_item_number.
                  wa_itemx-po_itemx     = c_x.
                  wa_itemx-final_inv    = c_x.
                  APPEND wa_itemx TO lt_itemx.
                wa_cond-itm_number = ls_po_detail-line_item_number.
                wa_cond-cond_type  = ls_po_detail-condition_type.
                wa_cond-cond_value = ls_po_detail-unit_price .
                wa_cond-currency   = c_curr.
                wa_cond-change_id  = c_insert.       
                APPEND wa_cond TO lt_cond.
                wa_condx-itm_number   = ls_po_detail-line_item_number.
                wa_condx-itm_numberx  = c_x.
                wa_condx-cond_type    = c_x.
                wa_condx-cond_value   = c_x.
                wa_condx-currency     = c_x.
                wa_condx-change_id    = c_x.
                APPEND wa_condx TO lt_condx.
       CALL FUNCTION 'BAPI_PO_CHANGE'
                EXPORTING
                  purchaseorder = wa_po_no-ebeln
                TABLES
                  return        = lt_return
                  poitem        = lt_item
                  poitemx       = lt_itemx
                  pocond        = lt_cond
                  pocondx       = lt_condx.

    Hi,
    Did you check what is there in  ls_po_detail-unit_price ??
    Check this links might help you.
    Re: BAPI_PO_CHANGE not updating Condition Price
    http://www.sap-img.com/abap/sample-abap-code-on-bapi-po-change.htm
    Regards and Best wishes.

  • Issue in BAPI_PO_CHANGE

    Hi Gurus,
    I am using the BAPI_PO_CHANGE to change the account assignment categeory from blank to cost center 'K'. The BAPI is throwing an error :
    "Account 50010101 requires an assignment to a CO object".
    but I have already passed the CO objects.
    BTW,
    1: i have simulate the data which passed via ME22N,it work perfectly.
    2:i also check the data in debug mode.it has been passed into the function correctly
    3:i also populated the parameters into the BAPI import parameters poaccountx
    4:i try to change the other datas such as delivery schedule,price,quantity.the BAPI also work.
    does anybody have any hints to solve this issue? kindly thanks in heart.

    Hi niraj gadre:
    for the account data,i passed the below:
        MOVE-CORRESPONDING it_po_account TO lt_po_account.
        lt_po_accountx-po_item = it_po_account-po_item.
        lt_po_accountx-serial_no = it_po_account-serial_no.
        lt_po_accountx-po_itemx = 'X'.
        lt_po_accountx-serial_nox = 'X'.
        lt_po_accountx-delete_ind = 'X'.
        lt_po_accountx-quantity = 'X'.
        lt_po_accountx-net_value = 'X'.
        lt_po_accountx-gl_account = 'X'.
        lt_po_accountx-costcenter = 'X'.
        lt_po_accountx-co_area = 'X'.
        lt_po_account-asset_no = 'X'.
        lt_po_account-orderid = 'X'.

  • Materials Management - Purchase Order. FUNCTION 'BAPI_PO_CHANGE'

    Hello!
    How to use FUNCTION 'BAPI_PO_CHANGE'?
    Required paramiter only PO number?
    I need to change POITEM.
    Somebody hav example / description?

    Hi,
    refer to the link below for sample code :
    [http://www.sap-img.com/abap/sample-abap-code-on-bapi-po-change.htm]
    Regards,
    Surinder

  • BAPI_PO_CHANGE Question

    Hello All,
    Is it possible to uncheck certain indicators, such as the delivery complete indicator (ekpo-elikz) using the BAPI_PO_CHANGE?  For example, the Purchase Order has the delivery complete checked (ekpo-elikz = 'X') and we want to remove the check (ekpo-elikz = ' ').  Is there a way to do this using this BAPI?  Thanks for your help in advance.
    John

    Hello Sandip,
    Thanks for the response.  I was testing the BAPI in SE37 but once I created a test program, everything worked as expected.  Thanks.
    John

  • BAPI_PO_CHANGE: Realease group is set to blank

    Hi,
    I have a custom report which is used Bapi BAPI_PO_CHANGE to update the delivery date.
    I got the weird issue is that after updating using this Bapi, the Realease Strategy tab disappeared (It was there before).
    This means the Realease group is set to blank.
    Please advise me any OSS note or a solution to fix this problem.
    Thanks,
    Khanh

    Hi,
    This is my testing code:
    data: begin of s_pohdr.
            include structure bapimepoheader.
    data: end of s_pohdr.
    data: begin of s_pohdrx.
            include structure bapimepoheaderx.
    data: end of s_pohdrx.
    data: begin of t_bapimsg occurs 0.
            include structure bapiret2.
    data: end of t_bapimsg.
    data: begin of t_poschedule occurs 0.
            include structure bapimeposchedule.
    data: end of t_poschedule.
    data: begin of t_poschedulex occurs 0.
            include structure bapimeposchedulx.
    data: end of t_poschedulex.
    data: begin of t_itemtext occurs 0.
            include structure bapimepotext.
    data: end of t_itemtext.
    parameters: p_ebeln type ebeln,
                p_ebelp type ebelp.
    s_pohdr-po_number = p_ebeln.
    s_pohdrx-po_number = 'X'.
    t_poschedule-po_item = p_ebelp.
    t_poschedule-sched_line = '1'.
    t_poschedule-delivery_date = '11/20/2010'.
    append t_poschedule.
    t_poschedulex-po_item = p_ebelp.
    t_poschedulex-sched_line = '1'.
    t_poschedulex-delivery_date = 'X'.
    append t_poschedulex.
    t_itemtext-po_number = p_ebeln.
    t_itemtext-po_item = p_ebelp.
    t_itemtext-text_id = 'F06'.
    t_itemtext-text_form = '*'.
    t_itemtext-text_line = 'Testing'.
    append t_itemtext.
    call function 'BAPI_PO_CHANGE'
      exporting
        purchaseorder   = p_ebeln
        poheader        = s_pohdr
        poheaderx       = s_pohdrx
        no_messaging    = 'X'
        no_message_req  = 'X'
        testrun         = ' '
        memory_complete = ' '
      tables
        return          = t_bapimsg
        poschedule      = t_poschedule
        poschedulex     = t_poschedulex
        potextitem      = t_itemtext.
    call function 'BAPI_TRANSACTION_COMMIT'.

Maybe you are looking for

  • Wlst offline - create a new domain in weblogic portal 10.2

    Hi, Any one have automation script to create weblogic portal domain, create portlet data base ( not point base).and Domain resources: Machines,Servers, Clusters and data sources. I tried the one which comes with installation ( wlst offlie domain crea

  • Zone Base Forewall for VPN connections does not work after IOS upgrade

    Hi all, We use cisco router 2911 as corporate gateway - there is Zone Based Firewall implemented - I upgraded IOS to last version (15.2(2)T1) - originaly version 15.1(4)M1 - to solve issue with Anyconnect connections (bug CSCtx38806) but I found that

  • Itunes plays songs, but ipod doesn't

    I am having a huge problem with my ipod! This is since I uploaded my songs to my computer and back to my ipod using eph pod. All of my songs seem to be on the ipod in formats that are okay, ie mp3 or m4p, but most of them are skipped by the ipod when

  • HT201364 I have a MacBook Pro 17" that meets all criteria on this list but it still won't let me upgrade... Help.

    I have a MacBook Pro 17" that meets all criteria on this list but it still won't let me upgrade... Help. To install Mavericks, you need one of these Macs: MacBook Pro (15-inch or 17-inch, Mid/Late 2007 or later)  **** Maybe my MacBook Pro is early 20

  • I can't get my update !

    hi i have nokia c3-00 i saw the last update is V 08.63 in the web and when i test update my phone by pc i use nokia suite and Nokia Software Updater They said the last updated is V 07.20 and i have this update in my phone ! please help my