Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_PO_CHANGE

Former Member
0 Kudos

hi i am using finction BAPI_PO_CHANGE i am trying to change the stauts of Delvery comple or want to delete the line item whatever i give the input but when i run this bapi no change is done.

my PO is unreleased at the time of run.

LOOP AT i_pr.
     REFRESH i_poitem. CLEAR i_poitem.
**
     LOOP AT i_prpo WHERE ebeln = i_pr-ebeln.
       i_poitem-po_item    = i_prpo-ebelp.
       i_poitem-delete_ind = i_prpo-loekz.
       i_poitem-no_more_gr = i_prpo-ebakz.
**
       APPEND i_poitem. CLEAR : i_poitem, i_prpo.
     ENDLOOP.
**
     CALL FUNCTION 'BAPI_PO_CHANGE'
       EXPORTING
         purchaseorder = i_pr-ebeln
       TABLES
         poitem        = i_poitem.
   ENDLOOP.

abhishek

3 REPLIES 3

Former Member
0 Kudos

Call the BAPI BAPI_TRANSACTION_COMMIT after BAPI_PO_CHANGE.

0 Kudos

its not working

Former Member
0 Kudos

Although you are passing the deletion indicator in the BAPIMEPOITEM table you are not passing deletion indicator in the BAPIMEPOITEMX. You should set the DELETE_IND and PO_ITEMX to X in the BAPIMEPOITEMX table as well.

Regards,

Ravi

Note - Please mark all the helpful answers