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: 

Alternative for BAPI_REQUISITION_CHANGE, to run this in update process.

Former Member
0 Kudos

Hi,

I'm using BAPI_REQUISITION_CHANGE, to change a purchase requisition Qty related to a purchase order. This Bapi is used in a report program which inturn is triggered by an output type, on Purchase Order creation.

Now, when this BAPI is executed, it ends up in dump saying "Invalid COMMIT WORK in an update function module".

The search criterion it gave was ..

"COMMIT_IN_POSTING" C

"SAPLBAPT" or "LBAPTU05"

"TRANSACTION_END"

And the error analysis as

Calling a COMMIT WORK in an update process is not allowed

because the function modules triggered in a Logical Unit

of Work cannot then be processed correctly.

This clearly shows that commit is being done inside the BAPI. Is there any other way that I can update Purchase Requisition Qty?

Thanks for your time on this.

Regards,

Srikanth Peri

1 REPLY 1

Former Member
0 Kudos

Hi,

This issue is now resolved. I have found BAPI_PR_CHANGE and tried using it. It works perfectly in update mode.

Thanks and apologies for your time on this.

Regards,

Srikanth Peri