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: 

How to avoid two users using the LI21 transaction for storage type 999

0 Kudos

Hello Guys,

We have a requirement to avoid the parallel processing of users for transaction LI21.

For Ex if any user clearing the difference for the storage type 999 in LI21 so if another trying for the same bin then system should block the transaction.

Right now system is allowing to do that & system will generate the 2 different material document & that leads to go into LI21 again to clear the negative stock.

Could you please suggest how we can achieve this.

8 REPLIES 8

DominikTylczyn
Active Contributor
0 Kudos

Hello rahulcharde1988

I'm afraid you won't find a solution within SAP standard functionality here as LI21 doesn't lock data unless the differences are cleared.

Clearing physical inventory differences is a task that only few people should be authorized to do. I'd suggest to restrict access to LI21 and apply organizational measure to ensure that the transaction is not used simultaneously for the same warehouse number.

Best regards

Dominik Tylczynski

0 Kudos

Hello Dominik,

Is there any solution that we can do in custom as per business requirement. any logic can we build to achieve this?

DominikTylczyn
Active Contributor

Hello rahulcharde1988

LI21 calls report RLLI2110. So I guess you could easily implement your requirement by calling a custom enqueue lock either in START-OF-SELECTION block or DIFFERENCE_CLEAR depending when you want to block access to other users.

I'd recommend to create a new, custom lock object here based on a warehouse number.

Best regards

Dominik Tylczynski

0 Kudos

Hello Dominik,

Business requirement is not to block the entire warehouse but we need to block on storage bin level. We have checked with the ABAPER but could not able to found the logic at which event we need to trigger enqueue objects, how the program knows that particular user using the same bin in LI21.

Can you please help in this case & suggest.

DominikTylczyn
Active Contributor
0 Kudos

Hello rahulcharde1988

If you need to block on the storage bin level then you might consider to trigger enqueue in GET LAGP event - that is raised when storage bin data is read by the logical database S1L. So if you put lock here, you'll recognize the lock conflict early i.e. as soon as the selection hits a bin that is locked by another user.

Best regards

Dominik Tylczynski

0 Kudos

Hello,

Can you please elaborate this point:

that is raised when storage bin data is read by the logical database S1L.

DominikTylczyn
Active Contributor
0 Kudos

Hello rahulcharde1988

The RLLI2110 report uses S1L logical database to read WM stock data - see SAP Help on Logical Databases

A logical database sends data to a report with GET events:

The RLLI2110 report implements GET LAGP event but doesn't execute any processing - line 180:

*---------------------------------------------------------------------*
*       GET LAGP                                                      *
*---------------------------------------------------------------------*
get lagp.

Therefore I'd suggest to implement enqueue lock in this event.

Best regards

Dominik Tylczynski

0 Kudos

Hello Dominik,

I am really thankful for all your help.

As per your suggestion I have checked with our ABAPer & they said there is no exit points in the standard program RLLI2110 wherein we can insert our custom logic for this requirement.

Could you please help if this requirement is feasible or not.

If yes the how to achieve this? Is it possible to have lock on storage type level or is it good to have on storage bin level.

Your help really apprciable.

Thanks,

Rahul Charde