Skip to Content
author's profile photo Former Member
Former Member

Problem to update the Version details using BAPI_PO_CHANGE.

Hi,

I'm facing an issue with using FM:BAPI_PO_CHANGE.

Actually My requirement is ,i need to update the po items with Delete Indicator as 'L' for PO items.when i update these items ,bapi will create a new version and same version would be saved in EREV table.Suppose if Poitems are assignind to Delete indicator as 'L'.these items will be displayed with delete icon(Status) at ME23N T.code.If i undelete the same PO Items(at ME23N) then i click on save button it will ask for updating the version details again.for this i was using the below code.

w_poitem-po_item = w_final-ebelp.

w_poitem-delete_ind = 'L'.
APPEND w_poitem TO t_poitem.

* Itemx table to update
w_poitemx-po_item = w_final-ebelp.
w_poitemx-po_itemx = 'X'.
w_poitemx-delete_ind = 'X'.

APPEND w_poitemx TO t_poitemx.

w_versions-post_date = sy-datum.

w_versions-completed = 'X'.
w_versions-reason = '0009'.
w_versions-description = 'Auto'.
w_versions-req_by = p_werks."w_ekpo-werks.

CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = v_po
versions = w_versions
TABLES
return = t_bapiret2
poitem = t_poitem
poitemx = t_poitemx
allversions = t_all_versions.

I Can able to update the version for some of the PO's.in few cases only i'm not getting updated the version.Bapi is not throwing any error messages.can any body help me what could be the reason?

Thanks

Satya.N

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Nov 15, 2012 at 10:33 AM

    Hi Satya ,

    Have you checked the values in t_bapiret2

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.