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

Problem when using BAPI_PO_CHANGE

Former Member
0 Likes
1,084

Hi ABAPers

I'm trying to change a line item of a PO (service) using fm BAPI_PO_CHANGE, but it is returning message as

'Instance <po number> of object type PurchaseOrder could not be changed'

what is the reason for this and how could i overrcome this.

please advise.

Regards

Prabumanoharan

6 REPLIES 6
Read only

Former Member
0 Likes
768

1. Someone may be editing the PO

2. or the PO status is closed ( just try whether you are able to modify manually in ME22N)

Regards

Sasi

Read only

0 Likes
768

Hi Sasi

Tks for your reply

(a) There were some validations using BADI, is there any way to overcome this .

(b) How to find out a PO is closed..

Regards

Prabumanoharan

Read only

0 Likes
768

(a) There were some validations using BADI, is there any way to overcome this .

You can't overcome. If you want you have to modify the badi coding according to your requirement

(b) How to find out a PO is closed..

Some times its not necessary the po needs to be closed, based on config If delivery completed than we can' t change the PO that's what i told that Just try with same po in ME23N and edit manually

And check it is possible to change the po or not, If manually also not possible than we can come to conclude there is no error in the BAPI_PO_CHANGE calling routine

Regards

Sasi

Read only

0 Likes
768

Hi Sasi

Tks again for the quiker reply

I could change the PO manually, also, i'm able to change using the BAPI, if i satisfy the conditions of badi.

Regards

Prabumanoharan

Read only

Former Member
0 Likes
768

Hi,

In this case, make sure that none of the linked objects to PO such as PR or Sales order are left open. And also you can try it by enqueuing/dequeuing the PR/Sales Order before and after the PO change.

Regards,

Prasana.

Read only

Former Member
0 Likes
768

Thanks for all ur replies