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

Badi/exit while saving Material document in MIGO

Former Member
0 Likes
13,589

Hello all,

I want to restrict before material document get generated in MIGO transaction.

I searched Badi and exits but they are allowing to post the document.

I found badi MB_DOCUMENT_BADI but it is not allowing to put error messagess.

It is giving message type 'X' dump.

Thanks,

Paresh.

Hello all,

I want to restrict before material document get generated in MIGO transaction.

I searched Badi and exits but they are allowing to post the document.

I found badi MB_DOCUMENT_BADI but it is not allowing to put error messagess.

It is giving message type 'X' dump.

Thanks,

Paresh.

7 REPLIES 7
Read only

Former Member
0 Likes
4,949

Hi,

Check the badi MB_MIGO_BADI or Enhancement :MB_CF001.

Regards

Vinod

Read only

0 Likes
4,949

Hi Vinod,

I tried these badi . but they are not getting triggerd after I clicked on SAVE / POST button.

Thanks,

Paresh.

Read only

0 Likes
4,949

Hi,

Have you checked the enhancement "MB_CF001"

Regards

Vinod

Read only

0 Likes
4,949

Hi vinod,

Yes ,I checked the enhacement but it is not getting triggerd if i clicked on save or post.

the document is getting posted.

Do u know any enhacement spot for save..so I can put my code to restrict.

Thanks,

Paresh.

Read only

0 Likes
4,949

Mean while you can try to find a suitable BADI.

Befor clicking on 'SAVE' just put break point in the below class.

Go to the Transaction, for which we want to find the BADI, take the example of Transaction VD02. Click on System->Status. Double click on the program name. Once inside the program search for u2018CL_EXITHANDLER=>GET_INSTANCEu2019.

Make sure the radio button u201CIn main programu201D is checked. A list of all the programs with call to the BADIu2019s will be listed.

The export parameter u2018EXIT_NAMEu2019 for the method GET_INSTANCE of class CL_EXITHANDLER will have the user exit assigned to it. The changing parameter u2018INSTANCEu2019 will have the interface assigned to it. Double click on the method to enter the source code.Definition of Instance would give you the Interface name.

I think the enhancement should work:MB_CF001

See it's documentatyion in smod.:

The enhancement MB_CF001 includes a function module that is called up

immediately before the COMMIT WORK when a goods movement is posted.

--

Reddy

Read only

Former Member
0 Likes
4,949

Hi check these badis

MB_CHECK_LINE_BADI BAdI: Check Line Before Copying to the Blocking Tables

MB_DOCUMENT_BADI_SAP BADI for Creation and Changing of a Material Document

MB_DOCUMENT_UPDATE BADI when updating material document: MSEG and MKPF

MB_DOC_BADI_INTERNAL BAdIs During Creation of a Material Document (SAP Internal)

Read only

Former Member
0 Likes
4,949

have you tried to block creation of consecutive FI document with BTE 00001025 Function module SAMPLE_INTERFACE_00001025 documentation. If you raise a type 'E' message in this BTE this will rollback both FI and MM document and forbid posting of MM document :!