Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

problem with BAPI_PO_CHANGE

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.

Tags:
Not what you were looking for? View more on this topic or Ask a question