Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8940

How to update the version in me22n using BAPI_PO_change

$
0
0

We need to tick the delivery completed checkbox and update the version

using the BAPI_PO_CHANGE, i am following the below steps:

 

1) I get the details of the PO such as header, item etc.. using

BAPI_PO_GETDETAIL1, see the code below:

 

CALL FUNCTION 'BAPI_PO_GETDETAIL1'

EXPORTING

PURCHASEORDER = P_EBELN

* ACCOUNT_ASSIGNMENT = ' '

* ITEM_TEXT = ' '

* HEADER_TEXT = ' '

* DELIVERY_ADDRESS = ' '

* VERSION = ' '

* SERVICES = ' '

* SERIALNUMBERS = ' '

* INVOICEPLAN = ' '

IMPORTING

POHEADER = I_POHEAD

POEXPIMPHEADER = I_POEXPIM

TABLES

RETURN = IT_RETURN1

POITEM = I_POITEM

 

and i pass the data such as I_POHEAD, I_VERSION, IT_RETURN, I_POITEM,

I_POITEMX

 

I_VERSION-REQ_BY = 'rAJ'.

I_VERSION-REASON = '0001'.

I_VERSION-COMPLETED = 'X'.

I_VERSION-DESCRIPTION = 'BAPI TEST'.

 

WA_POITEMX-PO_ITEM = '00010'.

WA_POITEMX-NO_MORE_GR = 'X'.

APPEND WA_POITEMX TO I_POITEMX.

CLEAR WA_POITEMX.

 

CALL FUNCTION 'BAPI_PO_CHANGE'

EXPORTING

PURCHASEORDER = P_EBELN

POHEADER = I_POHEAD

** POHEADERX = I_POHEADX

* POADDRVENDOR =

* TESTRUN =

* MEMORY_UNCOMPLETE =

* MEMORY_COMPLETE =

* POEXPIMPHEADER =

* POEXPIMPHEADERX =

VERSIONS = I_VERSION

* NO_MESSAGING =

* NO_MESSAGE_REQ =

* NO_AUTHORITY =

* NO_PRICE_FROM_PO =

* PARK_UNCOMPLETE =

* PARK_COMPLETE =

* IMPORTING

* EXPHEADER =

* EXPPOEXPIMPHEADER =

TABLES

RETURN = IT_RETURN

POITEM = I_POITEM

POITEMX = I_POITEMX.

 

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

* EXPORTING

* WAIT =

* IMPORTING

* RETURN =

.

 

But still i get error which i get below error in IT_RETURN:

 

W ME 887 Error transferring ExtensionIn data for

enhancement CI_EKKODB

E BAPI 003 Instance 4500000361 of object type PurchaseOrder

could not be changed

E MEPO 002 PO header data still faulty

I 06 684 Releases already effected are liable to be reset

W ME 658 Please also populate interface parameter

POHEADERX

E SG 105 Enter rate INR / rate type M for 07.02.2014 in

the system settings


Viewing all articles
Browse latest Browse all 8940

Trending Articles



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