cancel
Showing results for 
Search instead for 
Did you mean: 

Too many object lock EFMAVCT

Former Member
0 Kudos

Dear all,

Currently, I am not able to get an effective answer via OSS and I would like to try to check if the following question can be discussed effectively in this forum. Hence, please find my current conversation below and I will appreciate very much if you can share with me. Note: I have removed some irrelevant conversation lines from the original conversation.

Question to SAP.

My developers have built a program to generate FI documents using the

following standard BAPIs.

 

'BAPI_ACC_DOCUMENT_CHECK' - checking

'BAPI_ACC_DOCUMENT_POST' - posting

 

My concern is that, during the program run, these BAPIs will lock

thousand of objects (as attached in SM12) and result in many failure of

update postings (from other areas) during office working hours. This is

not desirable as there are only 10-20 FI documents generated at the end

of the program run. Each document consists of full line items.

 

Since this program is a must to be run during the office working hours,

appreciate if you can advise alternatives to skip this locking issue in

the BAPI. It seems that these standard BAPIs are not built to cater for

mass processing during office hours.

Reply from SAP

Since most of locked object are FMBAS_S_OBJNR and EFMAVCT, I forwarded

to PSM component for further check.

Reply to SAP

Version as below:

SAP_APPL          604          0006          SAPKH60406

However, the questions raised from my end is related to the

following standard BAPI. Currently, the fund checking embedded in the

standard program "BAPI_ACC_DOCUMENT_CHECK". This BAPI is causing

performance issue if we were to run mass processing on document posting.

So, if we were to skip the AVC from this BAPI, do you have any advice on

how to do so?

Reply from SAP

You should do a COMMIT WORK in your custom code, after posting each new

document.

The COMMIT WORK will remove the shared locks.

In case of errors or when doing some test run, you should call

ROLLBACK WORK.

 

And another advice - you should limit the number of lines in

each document. Posting documents with more than 1000 lines during

business hours is not a good advice. You have to avoid this.

Reply to SAP

My developer stated below:

There are 2 BAPIs in this program which are causing the program a lot of running time.

One is BAPI BAPI_ACC_DOCUMENT_CHECK and the other one is

BAPI_ACC_DOCUMENT_POST.

I'm afraid that the checking BAPI doesn't need 'Commit Work', while we've

already called BAPI_TRANSACTION_COMMIT and BAPI_TRANSACTION_ROLLBACK after

each document posting.

Also, each document posting consists of maximum 950 lines due to FI document restriction. So, this is less than 1000 lines. Are there any other better approach on this issue?

Can anyone help?

Thank you in advance.

Regards,

Ben Ng

Accepted Solutions (0)

Answers (1)

Answers (1)

iklovski
Active Contributor
0 Kudos

Hi,

I don't quite understand the problem as the response of SAP seems logical to me. I have been in a different projects where we used this BAPIs for document posting and never experienced any problems with locking. Of course, technically speaking, you can skip AVC check - there is a possibility for this - but is it something that functionally correct for you? I mean, do you actually wan posting FI documents with no update of AVC? Is it some sort of one-time posting?

Regards,


Eli

Former Member
0 Kudos

Hi Eli,

1. Yes, we have skipped the AVC check using the tolerance profile. However, the program is still locking the object for no logical reason.

2. We are posting the FI documents without the AVC checking and this is functionally expected.

3. The program is run periodically because the FI postings are related to cost allocation adjustment due to the business nature here. Program can be run successfully after office hours when there are no other postings incurred other than this program itself. Although it is working well in midnight, this program is expected to run during office hours to shorten the time length for month end closing.

4. During the program run, it is found in transaction SM12 that thousand of lines like EFMAVCT and FMBAS_S_OBJNR are appearing as locked. As the result, if there are any FI postings outside of the program will failed during daytime by creating short dump.

Please do not hesitate to ask me for further details on the problem, thank you.

Ben

iklovski
Active Contributor
0 Kudos

By 'skipping' I mentioned BADI implementation. Assigning tolerance profile does not skip the procedure of AVC check. You can use this class: CL_EXM_IM_FMAVC_ENTRY_FILTER (BADI FMAVC_ENTRY_FILTER)

Former Member
0 Kudos

My developers came back with a reply "BADI was tested last Friday and we found that the BADI FMAVC_ENTRY_FILTER cannot be triggered when the checking and posting BAPI are called".