SAP for Utilities Discussions
Connect with fellow SAP users to share best practices, troubleshoot challenges, and collaborate on building a sustainable energy future. Join the discussion.
cancel
Showing results for 
Search instead for 
Did you mean: 

DFKKLOCKS

Former Member
0 Kudos

i want to know if any lock is deleted manually then the entry of lock is removed from table but if locks validity is expires then entry remains in table .

Is this sap bug? what should i do?

4 REPLIES 4

Former Member
0 Kudos

Hi Ankit,

This is how SAP works. Though it was deleted from table DFKKLOCKS, you can get lock history in table DFKKLOCKSH.

Regards,

Rajesh

AmlanBanerjee
Active Contributor
0 Kudos

Hi Ankit,

When you are deleting a particular FI-CA lock, it triggers the FM FKK_O_LOCK_METHOD_DELETE, which checks for the Auth object F_KK_LOCK with activity type 06 (delete), which is turn is setting the parameter ls_ctrl_lock-x_lock_del as X, and the entry is getting deleted from DFKKLOCKS and is updated in DFKKLOCKSH.

However, in case of locks expiry, there is no such FM getting triggerred and hence the entry is not deleted from DFKKLOCKS.

This is as per SAP Standard, as because lock entries on table DFKKLOCKS are accessed by most FI-CA posting activities during runtime. Overtime, the entries in the table becomes so large that it adversely affects mass activity processing performance due to SQL selection on the table.So the deleted locks are transferred to the history table.

Also, if you want to move the expired locks to the history table DFKKLOCKSH, you can use program RLOCKS_2_HIST to transfer them.

So, going forward, in order to retrieve the active lock information, you need to query only DFKKLOCKS, where as if you want to retrieve expired or deleted locks, you can query DFKKLOCKSH.

Hope it helps...

Thanks,

Amlan

0 Kudos

Hi Amlan,

               thanks for detailed information ;but problem is that for BW reports they load data from SAP production server on Delta basis means any changes if happen but in this case once the lock is active they fecthed the data but after deletion they did not get the changes respective of that lock entry so the lock remain active at BW server.

In DFKKLOCKSH the contract account option is not there and that deleted Lock object is not available in DFKKLOCKS so for a CA any lock manually deleted how these two table should be used to do query for a particular contract account?  

0 Kudos

Hi Ankit,

From  BW prespective, if a lock entry is deleted from the table, it should be recorded as a change and should be pulled in the delta queue.If it is not, then you can raise an OSS with SAP for the same.

Also, the lock object itself comprises of the contract account and buisness partner if you have placed the lock at the contarct acount level (Lock Category-06).

Also, if the lock is placed at the document level (Lock Category-02), then the document no (opbel), along with repetation item (OPUPW), Item Number (OPUPK) and Subitem (OPUPZ).

So in DFKKLOCKSH, against the lock category 06, contarct account can be retrieved from the lock object. As BP is aleady there in the table so, if you remove the BP from the lock object by comparing the BP no,you get the CA number.

So alternatively, as workaround, I would suggest you to run the program RLOCKS_2_HIST on a daily basis before the BW delta upload. So this will make sure that table DFKKLOCKS only contain active locks, where as table DFKKLOCKSH would contain expired\deleted locks.

Then it will be easier to pull them into the BW at the info cube level..and then may be from there you can use logic to determine which have expired and generate the reports accordingly.

Hope it helps...

Thanks,

Amlan