Application Development and Automation 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: 
Read only

BAPI_PO_CHANGE Error

former_member224444
Participant
0 Likes
3,272

Dear All,

We want to tick the delivery completed checkbox and give version for collection of Purchase Order.  We cannot do this in BDC because we are going to do this change for last 60 days PO as per requirement. So we used BAPI_PO_CHANGE. But the change is not happening. When checking in debug mode,  i can see following errors in Return Table:

Below is my code snippet:

CALL FUNCTION 'BAPI_PO_CHANGE'

   EXPORTING

     PURCHASEORDER                = P_EBELN

    VERSIONS                     = I_VERSION


  TABLES

    RETURN                       = IT_RETURN

    POITEM                       = I_POITEM

    POITEMX                      = I_POITEMX

           .

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

* EXPORTING

*   WAIT          =

* IMPORTING

*   RETURN        =

           .


Please help me in solving this issue.


Regards,

Rithika.

7 REPLIES 7
Read only

0 Likes
2,226

Hi Rithika,

Your image is not visible properly. Please attach it again.

Read only

0 Likes
2,226

Dear Shailesh,

Below is the error which i get:

1WME887Error transferring ExtensionIn data for enhancement CI_EKKODB000000CI_EKKODB
2EBAPI003Instance 4500000361 of object type PurchaseOrder could not be changed000000PurchaseOrder
3EMEPO002PO header data still faulty000000
4I06684Releases already effected are liable to be reset000000G
5ESG105Enter rate INR /  rate type M for 28.01.2014 in the system settings000000INR

______________________________

Regards,

Rithika

Read only

0 Likes
2,226

Hi Rithika,

Some mandatory data is missing in your internal table. Consult with your MM consultant and check all mandatory fields.

Read only

0 Likes
2,226

Hi Rithika,

Use the FM 'BAPI_PO_GETDETAIL' to get the detail and then pass everything with your changes to 'BAPI_PO_CHANGE'.

This way you will not miss any mandatory parameters which needs to be passed.

Regards,

Munesh.

Read only

former_member187748
Active Contributor
0 Likes
2,226

Hi Rithika,

you have commented

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

* EXPORTING

*   WAIT          =

* IMPORTING

*   RETURN        =

           .


please use it as


CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

  WAIT          = w_wait

IMPORTING

  RETURN        = return.

           .

Read only

Former Member
0 Likes
2,226

Hi Rithika,

I think you need to pass the below parameters for the BAPI to be effective. Because in the error it says header data still faulty.

CALL FUNCTION 'BAPI_PO_CHANGE'

    EXPORTING

      PURCHASEORDER = LS_POHEADER-PO

      POHEADER      = LS_POHEADER

      POHEADERX     = LS_POHEADERX

    TABLES

      RETURN        = LT_BAPIRETURN

      POITEM        = LT_BAPI_POITEM

      POITEMX       = LT_BAPI_POITEMX.

Best Regards,

K.Srikanth Reddy.

Read only

Former Member
0 Likes
2,226

Hi,

The error is coming due to the extension in structure! Check the data before passing to the BAPI.

Once again verify the customizing tabs/fields in PO