cancel
Showing results for 
Search instead for 
Did you mean: 

Batch of material is blocked by another user.

Former Member
0 Kudos

Hi all,

Batch maintenance is at Matreial level in our client.

When the user is trying to do any Matreial posting like GI, Inventory difference posting for the material in some plant, that batch and material is getting blocked for him . After seing in SM12 i can see all the tables related to material , batch etc.

Error " Batch xxx of material is already locked by user qqq"

It seems when one user is doing some inventory posting in some plant, its getting blocked by soem another user in another plant

Any expert solution.

Regards,

Satyendra

Accepted Solutions (1)

Accepted Solutions (1)

former_member223262
Contributor
0 Kudos

This is SAP standard setting..

I will try to give you an idea why this message is needed and that it got coded by SAP on purpose and to fix an error in an earlier release:

In some cases, when you make inventory postings for a material, the system writes the posting to the database (relevant tables) although the material is currently locked by another user.

As a result, the inventory posting is sometimes not made correctly.

e.g If you make a price change before the inventory posting and the posting of the price change is not complete, it is possible that the inventory posting is carried out with the old price and the price change is not correctly posted.

Hope this will clear your doubts.

Answers (3)

Answers (3)

Former Member
0 Kudos

I'm afraid that locks are necessary to prevent inconsistencies in system.

However, there is a note 1501121, which creates a new BAdI MATERIAL_READ on your system.

The idea behind is to provide a BAdI to influence the lock on the batch master dependend on customers need based on the circumstances (specific materials, specific plant, GI, GR) instead of modifying the system and set the lock on shared lock in any case.

This BAdI need to be correctly created on your system, any you need to create Implementation of BAdI MATERIAL_READ Method MATERIAL_READ if you want to post 2 batches of the same material at the same time.

So please add your customer own coding in this new BAdI to change the lock mode from E to S refer to your requirement, for example:

When the lock for existing batches should set to shared in any case

the implementation can look like this:

>> CV_LOCK_MODE = 'S'.

Please read the note 1501121 and the documentation of the BAdI carefully . In addition, I suggest you to implement the following note, which corrects a known side effect of note 1501121:

1513425 - Overwriting fields in batch

Hope the information help.

former_member223262
Contributor
0 Kudos

Also check the last session may be still getting used in SAP.

Please close the previous active session my using SM04/SM50/SM12

Former Member
0 Kudos

Thanks for your responses, but the user is saying that prior to upgrade they were not facing this issue.

Regards,

Satyendra

Former Member
0 Kudos

Hi

This error has nothing to do with sys upgrade. Because, according to my knowledge this error occurs when two users on same client are trying to do posting for same batch.

hope this helps !

Best Regards

Nishant

Former Member
0 Kudos

Hi

There is no solution as such. You have to wait till user exits from the transaction that he/she is working related to the batch you want to work on