cancel
Showing results for 
Search instead for 
Did you mean: 

Calling BAPI_GOODSMVT_CREATE in BADI from MIGO transaction

0 Kudos

Hi,

My requirement is to run goods mvt. type 101 in MIGO and calling goods mvt. type 562 in background(after posting 101) simultaneously. I have made an update function module where I used BAPI_GOODSMVT_CREATE and called it in an implementation in MB_MIGO_BADI (method: POST_DOCUMENT) in update task. The material, plant and storage location is same for both processes.

The problem is the BAPI is returning the error 'Plant data is locked for this material by user (my userID).' I found out the locks are getting placed once I post 101 in MIGO. Any solutions on how I could bypass this?

Helpful << Text Removed >>

MSadri
Participant
0 Kudos

Hi,

Can you please elaborate on what are you trying to achieve by implementing such a scenario.

You are bringing stock in by movement type 101 and then removing it by 562?

Also, what about the Qty are you using same Qty with both movement type?

Regards

Murtuza

0 Kudos

Hi Murtuza,

So, according to my business process requirements (which I admit are complex), I have a requirement to process these two movement types simultaneously. In the entire sequence, I process a 101+ from MIGO, which triggers a 101+ and a 562- from BADI. Also, yes, the quantity should be same for these two movement types.

Any thoughts on the lock issue? It would really help if I can get a solution for that.

Regards,

Dev

Lakshmipathi
Active Contributor
0 Kudos

When you post a query and give further updates, please add the content under "Comments" and not under "Answer" as you were not answering to a query but only providing additional informations as asked by the members. Also, when you add the text under Comments, it will be intimated to the person to whom you are responding whereas, if you add the text under Answer, the member will not be intimated. By the way, your above answer has been converted as comment by me.

Lakshmipathi
Active Contributor
0 Kudos

Avoid adding text offering any reward

0 Kudos

Sorry for the trouble. Will be more careful.

Accepted Solutions (1)

Accepted Solutions (1)

fortian
Active Contributor
0 Kudos

You could avoid this issue by posting the 562 through a simple workflow after the 101 posting.
You could also create a custom output type to be triggered after the 101 and using a custom function module in order to post the desired 562.

0 Kudos

Can you please guide me on how I can use either of the above? I already made a custom function module for the 562. How do I create a custom output type here?

Answers (1)

Answers (1)

fortian
Active Contributor
0 Kudos

Hello Debatraya,

You will have to define a new output type for the application "ME - Inventory Management" (using medium 8 - Special function), add it to a procedure, etc... Have a look to transaction NACE.

I'm sure you can find many wiki pages explaining how to define an output type.

Best regards

Fortian