Skip to Content
avatar image
Former Member

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Aug 16, 2007 at 12:47 PM

    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á

    Add comment
    10|10000 characters needed characters exceeded