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: 

problem with BAPI_PO_CHANGE

Former Member
0 Kudos

we have sap ver. 4.7

i want to do small change to the order in order to activate bw exstractor

( after save in me28)

so i try to do small change to order that been save now ,

i try to do it with : BAPI_PO_CHANGE

but i when run the function , i get the following problem :

Changing of PO using Enjoy BAPI unsuccessful

Purchase order still contains faulty items

No finans data for vendor

Change GR non-valuated could not be effected

i sow some message her that talk about BAPI_PO_CHANGE that it

not fit for sap ver. 4.6 and above , but in the item level

the bapi done the change with out any problem

this is my code , i try to change the company code :

DATA EBELN LIKE EKKO-EBELN.

DATA POHEADER LIKE BAPIMEPOHEADER.

DATA POHEADERX LIKE BAPIMEPOHEADERX.

DATA RETURN LIKE BAPIRET2

OCCURS 0 WITH HEADER LINE.

DATA POITEM LIKE BAPIMEPOITEM

OCCURS 0 WITH HEADER LINE.

DATA POITEMX LIKE BAPIMEPOITEMX

OCCURS 0 WITH HEADER LINE.

EBELN = '4500001235'.

POHEADER-PO_NUMBER = '4500001235' .

POHEADER-COMP_CODE = '1001' .

POHEADERX-COMP_CODE = 'X' .

  • POSCHEDULE = POSCHEDULE

  • POSCHEDULEX = POSCHEDULEX

  • POHEADERX

CALL FUNCTION 'BAPI_PO_CHANGE'

EXPORTING

PURCHASEORDER = EBELN

POHEADER = POHEADER

POHEADERX = POHEADERX

TABLES

return = return

  • poitem = poitem

  • poitemx = poitemx

.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

  • EXPORTING

  • WAIT =

IMPORTING

RETURN = RETURN.

1 REPLY 1

Former Member
0 Kudos

Hi!

Have you tried with another PO number? If both of them are not working, then your program is wrong, if the another is working, then something is bad in the first PO.

Regards

Tamá