cancel
Showing results for 
Search instead for 
Did you mean: 

Follow-Up Action after UD Save

ravi_bhushan2
Explorer
0 Kudos

Hi All ,

I have a follow up action attached to UD code . We have code written to update batch characteristics inside the function module attached to follow up function.  The problem is sometime batch update is failing due to batch lock. Somehow system is able to lock the batch before the followup action completes thus the actual code fails to update required characteristics .

Is there any option to prevent the system/other user to lock the batch till my follow up action completes ? Or to prevent the UD save if follow up action fails to update ?

Thanks ,

Ravi Bhushan

Accepted Solutions (1)

Accepted Solutions (1)

subhrantbal
Participant
0 Kudos

Hi Ravi ,

In SAP standard function modules available and also the Abaper can write a custom function module so that when you start operation the batch and material will be locked by your user name and also if its open by any other User it will resrtict you to go further and give an error message  so that you will be stopped at the selection screen . that the material is locked by User XXX .

So you will be restricted in the selection screen at entry. And also you can restict the batch and lock it until next update , ask your abaper to use the proper FM.

Thanks

Subhrant

Answers (1)

Answers (1)

subhrantbal
Participant
0 Kudos

Hi Ravi,

Ask your Abaper to lock that material once you selected the material so that at same time any other user can not perform any action and it will display an error message as " Material is locked by User xxx" . dont apply lock logic to batch , directly lock the material and get the material by passing batch to MCHB .

Thanks

Subhrant.

ravi_bhushan2
Explorer
0 Kudos

Hi Subhrant ,

We have logic written to lock the the MCH1 table and MARA table for the material and batch. So, When update failes user do get mail like batch is locked by the user himself .

while  working on the issue, we found that batch can be locked by other user also. That is why now i am looking for an option to terminate UD save if follow up action fails to update the batch or prevent locking till my follow up action completes ?

Thanks

Ravi Bhushan