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

Former Member
0 Likes
848

Dear all,

I want to know that how to use standard BADI and how to write the code inside the existing BADI.

Or it is is not available then how to create new one and how to call that.

I want a BADI for MIGO. I want some parameter after saving the goods recipt.

Thanx in advance.

--umesh

Dear all,

I want to know that how to use standard BADI and how to write the code inside the existing BADI.

Or it is is not available then how to create new one and how to call that.

I want a BADI for MIGO. I want some parameter after saving the goods recipt.

Thanx in advance.

--umesh

4 REPLIES 4
Read only

Former Member
0 Likes
798

Hi,

For viewing and writing a code in BADI you need to go through transactions SE18 and SE19.

SE18 - is transaction where in you can view a standard implementation provided by SAP. So once you are very sure that for a particular transaction say VF31, you need to write a BADI to do some checks in invoice printings,

then you can go to transaction SE19, create your own implementaion starting with Z_name_of_badi.

On doing this the system shall prompt you to add an existing standard BADI. So once you choose that standard BADI, your new implementation will extend the standard implementation BADI and then the system creates an adapter class for your implementation. Under this adapter classes you shall find out the methods. On double clicking the methods, you shall be taken into the editor where in you can write your abap code for triggering any checks.

For MIGO the standard BADI is MB_MIGO_BADI.

Lakshminarayanan

P.S.Mark all helpful answers for points.

Read only

0 Likes
798

Check the BADI MB_MIGO_BADI in SE18.You will get the parameter MBLNR(material document number) from there.When you will create a Goods receipt in MIGO transaction Table MKPF will be updated

Read only

Former Member
0 Likes
798

Hi Umesh,

These are all the BADI's available for MIGO,

MB_CIN_LMBMBU04

posting of GR

MB_CIN_MM07MFB7

BAdI for India Version exit in include MM07MFB7

MB_CIN_MM07MFB7_QTY

Proposal of quantity from Excise invoice in GR

MB_DOCUMENT_BADI

BADIs when creating an article document

MB_DOCUMENT_UPDATE

BADI when updating article document: MSEG and MKPF

Goto tcode SE18 check one of the above BADI's methods. choose one and goto SE19 to implement BADI (to write code for your requirement)

let me know if you have any questions

regards,

ram

Read only

Former Member
0 Likes
798

Hi Umesh,

You can give your own implementation to the existing BAdI .Also you can create your own BAdI definition and implementation.

You can create a BAdI definition in SE18. When you give a BAdI definition name, an interface will be automatically for you.

For eg: if the name is ZSP_BADIDEF then the created interface name will be ZIF_EX_SP_BADIDEF.

In the interface, you can define the various methods for performing various operations.

You can provide the implementation for the Definition in SE19. When implementation name is given, it will ask for the defintion name. Upon giving the defn. name, a class implementing the interface will be created.

You can give the coding to each and every method in the interface through the class.

Now you must activate everything including the implementation to enable the changes to be reflected.

To provide implementation for standard transaction, you have to find if BAdIs exist for them. In System->Status, you will get the program implementing the transaction.

There search for CL_EXITHANDLER=>GET_INSTANCE. There from the importing parameter(INSTANCE) , find the interface name involved in the BAdI definition. From there remove IF_EX_ and you will get the BAdI definition name.

Goto SE19 and give the implementation and defintion name.

You will get a class , which will implement your set of codes. You can code in the methods of the class.

Refer these documents .

http://www.esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt

http://www.esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf

http://www.esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc

http://www.esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc

Regards,

SP.