Application Development and Automation 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: 
Read only

BAPI_PO_CHANGE

Former Member
0 Likes
599

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

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
Read only

Former Member
0 Likes
551

Call the BAPI BAPI_TRANSACTION_COMMIT after BAPI_PO_CHANGE.

Read only

0 Likes
551

its not working

Read only

Former Member
0 Likes
551

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