Application Development and Automation 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: 
Read only

Post Auto GR while saving MIGO Transaction

Former Member
0 Likes
432

Hi,

My requirement is that 'When i post a material document in MIGO for a particular movement type, another material document of movement type '561' has to be posted automatically in the background'.

I have tried the following:

Have created an implementation for the BADI 'MB_DOCUMENT_BADI'.

Have called a FM in update task in the 'MB_DOCUMENT_BEFORE_UPDATE' method of the BADI. The function module has the code to post a Material document using the BAPI 'BAPI_GOODSMVT_CREATE'. Since i have used the BAPI, i have to commit using 'BAPI_TRANSACTION_COMMIT'. I get the error COMMIT_IN_POSTING and the update is terminated and neither of the documents get posted.

I have tried an customer exit also and am very much aware that a Explicit commit must not be used in a BADI. Is there any other way of doing this?

Thanks in Advance,

Regards,

Vimal

Hi,

My requirement is that 'When i post a material document in MIGO for a particular movement type, another material document of movement type '561' has to be posted automatically in the background'.

I have tried the following:

Have created an implementation for the BADI 'MB_DOCUMENT_BADI'.

Have called a FM in update task in the 'MB_DOCUMENT_BEFORE_UPDATE' method of the BADI. The function module has the code to post a Material document using the BAPI 'BAPI_GOODSMVT_CREATE'. Since i have used the BAPI, i have to commit using 'BAPI_TRANSACTION_COMMIT'. I get the error COMMIT_IN_POSTING and the update is terminated and neither of the documents get posted.

I have tried an customer exit also and am very much aware that a Explicit commit must not be used in a BADI. Is there any other way of doing this?

Thanks in Advance,

Regards,

Vimal

1 REPLY 1
Read only

Former Member
0 Likes
357

Hi Joseph,

Did you find any solution for this. Even i am having a similar requirement for the same BADI.

Thanks in Advance,

Best regards,

Prashant