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 and lock entries?

Former Member
0 Likes
2,048

Hi everybody,

I am using BAPIs BAPI_ENTRYSHEET_CHECK and BAPI_ENTRYSHEET_CREATE in a customer report. While testing, I found that the lock entries are not always removed by the BAPIs. For instance, if BAPI_ENTRYSHEET_CHECK returns an error, the purchase order remains locked. Do I always have to call FM BAPI_TRANSACTION_COMMIT/ROLLBACK to ensure that all lock entries will be removed? Although I would not expect a 'CHECK' BAPI to perform database changes?

Thank you for any suggestions, kind regards, Kathrin.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,522

Hi kathrin,

1. In all cases, whether ok or error,

call BAPI_TRANSACTION_COMMIT

so that all

finishing touches are given to the

pending tasks.

regards,

amit m.

Hi everybody,

I am using BAPIs BAPI_ENTRYSHEET_CHECK and BAPI_ENTRYSHEET_CREATE in a customer report. While testing, I found that the lock entries are not always removed by the BAPIs. For instance, if BAPI_ENTRYSHEET_CHECK returns an error, the purchase order remains locked. Do I always have to call FM BAPI_TRANSACTION_COMMIT/ROLLBACK to ensure that all lock entries will be removed? Although I would not expect a 'CHECK' BAPI to perform database changes?

Thank you for any suggestions, kind regards, Kathrin.

6 REPLIES 6
Read only

Former Member
0 Likes
1,523

Hi kathrin,

1. In all cases, whether ok or error,

call BAPI_TRANSACTION_COMMIT

so that all

finishing touches are given to the

pending tasks.

regards,

amit m.

Read only

Former Member
0 Likes
1,522

Hi

Yes! The commit releases all blocks, but if you know the block you can try to remove the block using its fm DEQUEUE_<BLOCK>.

Max

Read only

Former Member
0 Likes
1,522

Hi,

you need to call <b>BAPI_TRANSACTION_COMMIT</b> after your bapi call . so that every thing will be updated.

Regards

vijay

Read only

christian_wohlfahrt
Active Contributor
0 Likes
1,522

Hi Kathrin!

Quite often I have some lost locks after using BAPI_MATERIAL_MAINTAINDATA_RT (and commit work!), e.g. locks on level of EAN-code.

FM DEQUEUE_ALL is a reliable helper in all this cases.

Regards,

Christian

Read only

Former Member
0 Likes
1,522

Hi,

You will have to call BAPI_TRANSACTION_COMMIT.

Regards,

Shashank

Read only

Former Member
0 Likes
1,522

hi

You need to call BAPI_TRANSACTION_COMMIT.

This will handle both the cases.

If success then a commit will save data in database,

else it will rollback without any change in database.

So calling BAPI_TRANSACTION_COMMIT is a must.

Regards,

Richa