Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 7790

BAPI_PO_CHANGE doesn't change MATNR

$
0
0

Hi experts,

 

I'm using BAPI_PO_CHANGE to modify the material in several PO but it doesn't work. If I modify it using ME22N it works fine, but I need to do it massively and so I can't use ME22N.

 

The code I'm using is:

 

MOVE gwa_data-ebelp TO gwa_poitem-po_item.

CONCATENATE lv_matnr 'N' INTO gwa_poitem-material. "lv_matnr is the old material

APPEND gwa_poitem TO gt_poitem.


MOVE gwa_data-ebelp TO gwa_poitemx-po_item.
MOVE 'X' TO gwa_poitemx-po_itemx.
MOVE 'X' TO gwa_poitemx-material.
APPEND gwa_poitemx TO gt_poitemx.


CALL FUNCTION 'BAPI_PO_CHANGE'
         EXPORTING
           purchaseorder = gwa_data-ebeln
         TABLES
           return = gt_return
           poitem = gt_poitem
           poitemx = gt_poitemx.


The messages I get are:


 

But nothing is changed in the PO.

 

Thanks for your help.

 

Carles


Viewing all articles
Browse latest Browse all 7790

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>