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

Similar Messages

  • Issue With BAPI_PO_CHANGE and BAPI_PO_CREATE1

    Hi All,
    I am facing a strange issue while using the bapis Bapi_po_chnage and Bapi_po_create1.
    I am deleting STOs using BAPI_PO_CHANGE, calling it in a loop for each sto and commiting or rollback using bapi_transaction_commit with wait = x incase of no errors in return table or using bapi_transaction_rollback incase of errors in return.
    Now the issue is after the first commit is executed when i'm next time calling the BAPI i have the messages of previous STO too accumulated in the return,
    I am clearing all the tables and work areas being passed to the bapi each time.
    Also i'm creating new STOs in an entirely different subroutine using BAPI_PO_CREATE1 but its return table too is accumulating all the return messages of BAPI_PO_CHANGE too.
    Has anyone faced a similar kind of issue?
    Please guide.
    Thanks in advance.
    Regrads,
    Kartik

    I tried the similar scenario with BAPI_PO_CHANGE, after refreshing the RETURN INTERNAL table before each call, which worked perfectly ( ECC 5.0).

  • Issue with BAPI_PO_CHANGE: purchase order locked

    I'm experiencing problems with the following scenario:
    1. change purchase order with RFC BAPI_PO_CHANGE
    2. wait 30 seconds
    3. post goods issue using IDoc MBGMCR01
    When performing step 3, I get in 20% of the cases the error that the PO is still locked by the RFC user in the R/3 system (user PIREMOTE already processing purchase document 123456789). I have tried to extend the wait step to 10 minutes, but the same issues still remains.
    I've also tried executing BAPI_TRANSACTION_COMMIT (with and without wait) and BAPI_DOCUMENT_DEQUEUE between step 1 and 2. Neither worked.
    Debugging BAPI_PO_CHANGE using SE37 didn't give any results. I noticed that the PO was still locked even when the processing of BAPI_PO_CHANGE in SE37 had finished. Somehow R/3 is locking the purchase document for a very long time in 20% of the cases. During the execution of the module enough work processes are available and no jobs are running.
    Has anyone ever experienced something like this and has an idea where to look next?

    So that should be BAPI_TRANSACTION_ROLLBACK in my case, since I have to use remote enabled functions. What does this function do? It looks like it's rolling back the performed transaction, thus reversing the changes, and that's not my intention.
    Edited by: Iddo Rijsdijk on May 25, 2008 1:09 PM

  • Issue with BAPI_PO_CHANGE

    Hi All,
    I am using BAPI_PO_CHANGE to delete serial numbers assigned to PO line item.
    I have set delete_ind = X in serialnumber table and also delete_ind = X in serialnumberX table.
    Also, BAPI_TRANSACTION_COMMIT has been called after BAPI_PO_CHANGE.
    But, Serial number assignment is not getting deleted.
    What additional steps are required ?
    Regards,
    Ashish

    check the following link
    https://forums.sdn.sap.com/post!reply.jspa?messageID=7924872
    or
    example:
    form move_to_bapi.
    t_bapi_poheader-po_number = t_poheader-po.
      CLEAR t_bapi_poheaderx.
      PERFORM fill_check_structure USING c_bapimepoheaderx
                                         c_t_bapi_poheader
                                         c_t_bapi_poheaderx
                                         c_x.
      refresh : t_bapi_poitem,t_bapi_poitemx.
      loop at t_poitem where po = t_poheader-po.
        clear t_bapi_poitem.
        t_bapi_poitem-po_item = t_poitem-item.
        t_bapi_poitem-delete_ind = 'X'.
        CLEAR t_bapi_poitemx.
        PERFORM fill_check_structure USING c_bapimepoitem
                                           c_t_bapi_poitem
                                           c_t_bapi_poitemx
                                           c_x.
        t_bapi_poitemx-po_item = t_poitem-item.
        t_bapi_poitemx-po_itemx = c_x.
        APPEND t_bapi_poitem.
        APPEND t_bapi_poitemx.
        clear t_bapi_poitem.
        clear t_bapi_poitemx.
      endloop.
    endform.

  • Problem changing the Condition Value in Po using BAPI_PO_CHANGE

    Hi Experts,
    My issue is BAPI_PO_CHANGE is not changing the Condition value. and giving message in bapi return as 'cannot be processed manually'.
    Can anybody please help me on this.
    Thanks & Regards,
    Sudheer

    Check this link http://forums.sdn.sap.com/thread.jspa?threadID=652278
    Regards,

  • BAPI_PO_CHANGE not changing the item data

    Hi All,
    I am facing an issue with bapi_po_change......though the return message says that the po is changed but then also i am not able to see the changes via me22n/me23n . Below is the code  Can anyone please let me know how to resolve this issue .
    REPORT  ztest111.
    DATA: git_po_items       TYPE STANDARD TABLE OF bapiekpo ,
          git_bapimepoitem   TYPE STANDARD TABLE OF bapimepoitem,
          git_bapimepoitemx   TYPE STANDARD TABLE OF bapimepoitem,
          git_bapimepoheader   TYPE  bapiekkol ,
          git_bapimepoheader1   TYPE  bapimepoheader ,
          gwa_bapimepoitem   TYPE bapimepoitem,
          gwa_bapimepoitemx   TYPE bapimepoitem,
          gwa_po_items       TYPE bapiekpo.
    DATA lv_pur_ord          TYPE bapiekko-po_number VALUE '4500000201'.
    DATA lv_return TYPE TABLE OF   bapiret2 .
    CALL FUNCTION 'BAPI_PO_GETDETAIL'
      EXPORTING
        purchaseorder                    = lv_pur_ord
        items                            = 'X'
    TABLES
        po_items                         = git_po_items.
    LOOP AT git_po_items INTO  gwa_po_items.
      gwa_po_items-short_text = 'Text changed'.
      MOVE-CORRESPONDING gwa_po_items TO gwa_bapimepoitem.
      gwa_bapimepoitemx-po_item = gwa_po_items-po_item.
      gwa_bapimepoitemx-short_text = 'X'.
      APPEND gwa_bapimepoitem TO git_bapimepoitem.
      APPEND gwa_bapimepoitemx TO git_bapimepoitemx.
    ENDLOOP.
    CALL FUNCTION 'BAPI_PO_CHANGE'
      EXPORTING
        purchaseorder                = lv_pur_ord
    TABLES
        return                       = lv_return
        poitem                       = git_bapimepoitem
        poitemx                      = git_bapimepoitemx.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

    HI,
    Check this link
    [Sample Abap code on BAPI_PO_CHANGE |http://www.sap-img.com/abap/sample-abap-code-on-bapi-po-change.htm]
    [bapi_po_change   |Re: bapi_po_change]
    Edited by: Avinash Kodarapu on Mar 2, 2009 11:33 PM

  • BAPI_PO_CHANGE - Account assignment serial number issue

    Hi,
    I am modifying Service PO with BAPI_PO_CHANGE.
    I am passign A/c Assignment with WBS_Element value and serial number '01' for individual line.
    PO has A/c Assignment catagory P(Project).
    But the existing PO which i want to modify, had Serial number '02' for A/c assignemnt serial number.
    So it is giving Short dump with raising exception for the class of Account assignnment handler.
    What need to dofor such A/c assignment catagory in Service PO Case.?
    Regards,
    Manoj

    Hi,
    Please try to change the serial number manually in mE22N and see.
    Regards,
    Nagaraj

  • BAPI_PO_CHANGE, changing condition value in the purchase order

    Hi Friends,
    I have a requirement,
    a flat file is present in the application server that contains the information about PO,PO-ITEM,Condition type, movement type , condition value, plant, storage location .
    And i m calling the bapi "BAPI_PO_CHANGE" and passing the po number to it.
    the bapi returns the following tables, i_return, i_header,i_cond, i_item,i_itemx.
    But the purpose of calling the BAPI is, to check, if the condition value in the specified PO is '0', then it has to replace with the value of condition type present in the flat file.
    But when we check the tablei_return, its shows error type.
    And the PO is not updated with the new  condition value.
    Help me out in sorting this problem, by telling me
    what value is to be passed to the respective BAPI and what should i do to solve the issue?
    and after that i m using a BAPI " BAPI_GOODSMOVEMENT_CREATE".
    and it is for the purpose of creating the GR(Goods Receipt),
    when i go through the i_return table of the bapi, it si returning a message that "BAPI_201  Unable to create goods movement".
    Help me in proving the input to those bapi's and how can i get the expected output?
    And let me know, what the bapi's ,"BAPI_COMMIIT" and " BAPI_ROLLBACK" , will be doing?
    Edited by: kumar t on Aug 9, 2008 1:02 PM

    HI
    [Check the Link|http://abap.wikiprog.com/wiki/BAPI_PO_CHANGE]
    [Commit|http://abap.wikiprog.com/wiki/BAPI_TRANSACTION_COMMIT]
    [Roll Back|http://abap.wikiprog.com/wiki/BAPI_TRANSACTION_ROLLBACK]
    Regards
    Pavan

  • Using BAPI_PO_CHANGE to update PO with item actegory B

    Hi Experts,
    I have a requirement to update the PO with item category B which is created by referring  PR having account assignment category N(.( So I have a PO with Acc assignment N now have to update the item category with B ). I am using BAPI_PO_CHANGE to update the item category with B  .in me22n system will prompt the Limits ( overall limit , expected value) and Network details ( like GL acc and Network and activity code) so i am passing lt_poitem,lt_poitemx,lt_polimits,lt_poaccount,lt_poaccountx,lt_POSRVACCESSVALUES. System is issuing a message Buffer table is not up-to-date . Please let me know if any one updated the PO with item category B using BAPI_PO_CHANGE and please provide sample code for the same if possible. Thanks in advance.
    Thanks
    Pravee

    Hi Experts,
    I am passing the required structure as below .
    CALL FUNCTION 'BAPI_PO_CHANGE'
      EXPORTING
        purchaseorder = v_po
      TABLES
        return        = lt_return
        poitem        = lt_poitem
        poitemx       = lt_poitemx
        polimits      = lt_polimits
        poaccount     = lt_poaccount
        poaccountx    = lt_poaccountx
        POSRVACCESSVALUES = lt_POSRVACCESSVALUES
        POCONTRACTLIMITS = lt_POCONTRACTLIMITS
        POSERVICES    = lt_POSERVICES.
    Now i am getting a message below messages from BAPI :
    S     06     023     Indirect PO (ZSTA) 4506000481 changed
    I     ME     664     Change Item Category could not be effected
    I     ME     664     Change Item Category could not be effected
    I can see that the PO is not got updated with any of values.Please help me to resolve this issue.
    Thanks
    PRavee.

  • Issue with BDC of ME22N to change gross price of service.

    Hi,
    I have a requirement where I have to undelete the PO > services tab of the item details > change the gross price to the value thats calculated by the program  for each of the services of the PO > set the deletion indicator to the PO.
    The spec says to use a BDC of ME22N to acheive this but after creating the recording I have had several issues with some PO's that interrupt the BDC because they bejave differently from the recording I did.
    On most cases when im running the BDC in foreground after changing the gross price and pressing enter I get a new windowthat appears asking for the account assingment of service, on this window the G/L account information is ussualy passed automatically then the bdc clicks back and the process continues normally. On other services after changing the gross price and pressing enter I get the account assignment of service window but the G/L information is not passed and when the bdc clicks back the G/L account information gets passed instead of going back and the BDC stops, if I manually click back again the process will continue.
    With single service PO's the process is completing, this issue is happening with PO's that have multiple services.
    I know ME22 should be used for BDC and not ME22N, but the functional insists to correct the issues with the BDC of ME22N. Also I atempted to use BAPI_PO_CHANGE but I dont think this bapi can not update the gross price of each of the services, it can change the net price but this is not my requirement.
    Is there a bapi that can change the gross price of each of the services of the PO?
    Please advice me on this.
    Edited by: bodyboarder1 on Dec 2, 2010 3:33 PM

    Hi
    If you really need a BDC program, try to simulate ME22  instead of ME22N
    Max

  • Changing a Purchase Order with "BAPI_PO_CHANGE"

    Hi Experts,
    I am trying to change the Confirmation data for an existing PO using the BAPI "BAPI_PO_CHANGE".
    I am filling the PO Number in the "PURCHASEORDER" Import parameter.
    I am also filling the "CONF_TYPE", "DELIV_DATE" and "QUANTITY" fields in the "POCONFIRMATION" Table parameter which is specifically the data i need to add to the existing PO under the "Confirmations" tab of the PO.
    I am getting all the input data for the BAPI from a file on the presentation server. The file has details of Material Number, Purchase Order Number, Ship to Address, Delivery Date and Quantity.
    But i am not able to change any data in the Purchase Order when i test the BAPI. I am getting the following messages in the "RETURN" Tables parameter:
    T ID                   NUM MESSAGE
    W ME                   667 Max. line number reached (Please always first enter line number manually)
    E BAPI                 003 Instance 45317399 of object type PurchaseOrder could not be changed
    W ME                   178 Batch SURE not maintained for material 10013537 (please check your input)
    E 06                   218 Net price must be greater than 0
    I am not sure if i am missing to fill any parameter here.
    Kindly help me in resolving this issue.
    Thanks in advance.
    Regards,
    Keerthi

    Hello to all,
    that is just for documentation. SAP answerd the problem in OSS-304243 but this message is not accessable if you don't have powerful OSS-Users.
    This SAP-note might be interesting: 197958
    OSS-Message 652796 8.8.2011
    BAPI_PO_CHANGE
    We can not process confirmations by using the parameter poconfirmation.
    The Baps reports always S 06 022 - no data changed.
    In the SDN there are some hints telling that the BAPI_PO_CHANGE does notsupport processing of confirmations. More detailled infos should be in
    the OSS-Message 0000304243 but this message is not accessable for us.
    Can you confirm that the BAPI_PO_CHANGE does not support adding
    confirmations? We debugged the BAPI and there is no code for updating
    confirmations found.
    Best regards
    Bernhard Lascy
    09.08.2011 - 10:43:07 CET - Antwort von SAP
    Dear Bernhard,
    I regret to inform you that the functionality you request is not
    implemented in the R/3 standard system.
    Unfortunately it is not possible to change/load confirmations with the
    function module BAPI_PO_CREATE/BAPI_PO_CHANGE. Table POCONFIRMATION in
    BAPI interface is relevant for Display/List Vendor Confirmation in BAPI,not for update/insert Vendor confirmation in PO.
    Furthermore, we recommends that you use Idocs for automatically
    entering confirmations. The Message type to use is ORDRSP.
    You may read more about this topic in the online documentation.
    Please see also following attached note for your reference.
    456127 FAQ: Electronic Data Interchange (EDI) in purchasing
    Best regards,
    Pavel Olysar
    Support Consultant
    Global Support - Logistics

  • Payment Terms not saved using BAPI_PO_CHANGE

    Hi,
    We are using BAPI_PO_CHANGE to save changes to the PO.
    When I use a Payment Term with 'Day Limit' (i. e Day Limit not zero) the Payment term field in the PO header is blank after commit. This doesnt happen for other payment terms.
    Has anyone faced this issue?
    Any suggestions will be appreciated.
    Ramesh-

    Hi ramana ,
    How r u populating the two table s?
    POCOND
    POCONDX of the bapi , can i know the code
    here u have to populate all this
    COND_TYPE
    COND_VALUE
    CURRENCY
    COND_UNIT
    COND_P_UNT
    CHANGE_ID(I for insert a new condition ,U for Update , D for delete)
    pls checjk thios and Pls ask if u have any thing.

  • BAPI_PO_CHANGE: Email Message Output Not Sent (External Send)

    Hello,
    I'm hoping someone has seen this issue before.  In a Z-program within our ECC system, I am updating various fields via BAPI_PO_CHANGE and the changes are successfully saved and committed to the database.  When the output determination for the purchase order is "print", there are no problems - the print output occurs as expected based on the appropriate settings.  However, when I change a PO in the exact same way, but the output determination for the PO is "external send" (i.e. email) with the same fields etc... the messages are updated as having been generated, but the email is never sent from the system.  NAST shows the record of it as processed successfully as well.
    Does anyone have any idea why this might be occurring?
    Any help will be appreciated.
    Thanks in advance,
    Leslie

    Execute SCOT Transaction.
    FIrst
    From the Menu, View -> Node
    Expand the "SMTP" -> "INT" ->
    By default BASIS would have set it to your own company domain.
    The domain of the email address for example john.doe - at - yahoo - dot - com which is yahoo - dot - com should be listed in there.
    If it is not, then you have to work with your Basis team to set it up.
    Alternatively,
    From the Menu, View -> Routing
    You will see the list of domains it is restricted for.
    Second,
    Most emails coming from SAP get routed to your main email SMTP Server which is hosted using Microsoft Exchange.
    The emails from SAP get forwarded to this SMTP server for distribution.
    Check whether there is any filter or restriction setup for any emails coming from SAP.
    You may have to contact your Exchange Admins for this.
    Work with your Basis team to do it.
    Finally,
    Execute program RSCONN03 to do a routing test.
    Hope this helps.

  • Calling BAPI_PO_CHANGE in a loop, correct POs after faulty PO erroring out

    Hello Gurus!
    I have an issue while calling BAPI_PO_CHANGE.
    I'm looping on BAPI_PO_CHANGE with Purchase Orders one by one, and adding articles to the existing POs. It works fine if additional articles are correct
    The issue is, if one PO returns with error from BAPI_PO_CHANGE, because of say '0' quantity or 'Discontinued' status of an  article, the remaining POs after faulty PO error out too. The remaining POs are correct and update correctly if executed separately.
    I'm refreshing all required iTabs and program works fine in case the newly added articles are valid.
    I'm calling BAPI_TRANSACTION_COMMIT in case BAPI returns with successful PO change. In case of faulty BAPI returning with error, I've tried using BAPI_TRANSACTION_ROLLBACK. But it doesn't work.
    Here is the u2018error messageu2019 log:
    Faulty PO:
    Error processing PO: 60045904
    Instance 60045904 of object type PurchaseOrder could not be changed
    Purchase order still contains faulty items
    Status "Discontinued" of article 1000182864 does not allow external procurement
    Enter rate CAD / rate type M for 07/15/2011 in the system settings
    Correct PO but gets erroru2019d out too:
    Error processing PO: 60045909
    Instance 60045909 of object type PurchaseOrder could not be changed
    Enter rate CAD / rate type M for 07/15/2011 in the system settings
    I'd appreciate any help.
    Thank you,
    Farooq

    Hello Anuradha,
    yes, I used the BAPI Commit command but it did not work.
    Kind regards,
    Erkan

  • Message ME644 Reason for Ordering (BSGRU) in BAPI_PO_CHANGE

    I have a requirement to change the Reason for Order (EKPO-BSGRU) through BAPI_PO_CHANGE. I have populated neccessary input but the BAPI returns an Information message saying
    'Change Reason for Ord. could not be effected ' Type I; ID ME; Number 664.
    This seems to be a common problem I have seen several notes accross older versions that suggest applying program changes. We are using ECC6.0 any idea if there is a note to be applied?
    Thanks for your time.
    Edited by: Cyril Alex on Apr 8, 2009 10:59 PM

    Hi Alex ,
      Have you got the solution of this problem? Please share the solution b'coz I also have the same issue.
    Thanks

Maybe you are looking for

  • Hide sxmb_moni payload for a specific message interface to Display

    In sxmb_moni , I have a synchronous interface , I want to turn off sync logging for just one interface.In sxmb_adm , there is option to turn off entire logging for Sync with the Integration Engine Configuration DELETION - PERSIT_DURATION - SYNC - Set

  • Email not showing up in SOST

    Dear SRMers. System Information: SRM 4.0 I manually added an approver X in the approver flow and ordered the shopping cart. The approver flow says waiting for approver approval since 06-14-2007 9:51. When I go to SOST, I do not see the email listed t

  • Battery level not shown correctly

    Hi! After charging my iPhone5, display continues to show "low battery". If I switch off and on the phone, battery level is shown correctly and decreases correctly till low level; then it rests stuck again. Please help! Thanks!

  • Stored procedure with multiple Reference Cursors

    In Sybase and SQLServer, result sets are returned to the application implicitly. Oracle emulates this by passing back weak reference cursors to the application through an IN OUT parameter.The number of reference cursors must match the number of resul

  • Search help for material number in table control

    Hi I have a table which i have generated using table control wizard. I have used an interal table while creating the table control through wizard. In this internal table i have field matnr.Now my requirement is to have a search help for this field. I