‎2007 Apr 01 4:44 AM
Hi friends,
I got a task to do .
Populated Goods Movement details in a custom Z table each time a goods movement is created through MIGO or PGI by using MB_DOCUMENT_BADI
Could anyone tell the process to do..
With regards,
Naren
‎2007 Apr 01 6:00 AM
Hi,
MB_DOCUMENT_BADI is a BADI. You can see this BAPI using transaction SE18. These two methods in this BADI
<b>1</b>. MB_DOCUMENT_BEFORE_UPDATE - Exit after Writing a Material Document. Not in 'update task'
<b>2</b>. <b>MB_DOCUMENT_UPDATE</b> - When Writing a Material Document. In 'Update task'.
You should use the second method "MB_DOCUMENT_UPDATE " because this is called where all validation are finished and data is being updated.
To use this method first you will have to create a implementation of this BADI. Follow these steps to implement BADI.
--> Go to transaction SE19.
--> Enter Implementation name "Z_MB_DOCUMENT_UPDATE" ( you can enter any other meaningful name too) and hit create.
--> When asked for "definition name" , enter "MB_DOCUMENT_UPDATE".
--> On the screen which opens, enter meaningful description. and hit save.
--> When asked, enter your custom development class and create a transport request.
--> Now, select "interface" tab.
--> Here you can do two things. <u><b>a).</b></u> double-click on method "MB_DOCUMENT_UPDATE" and it will directly take you to the place where you write your code to update custom Z table. <b>OR</b> <u><b>b).</b></u> Double-click on the "implementation class" . This you will fine under interface name and it would be line "ZCL_IM__MB_DOCUMENT_UPDATE".
--> If you double-click on "implementation class", it will take you to the screen ( this is same as SE24 screen where you implement can see classes and interfaces ) where you can see method, what parameters are available etc. From here also you can double-click on method and do to the place where you can implement you code.
For more information on BADI, please refer to this link.
http://help.sap.com/saphelp_46c/helpdata/EN/ee/a1d548892b11d295d60000e82de14a/frameset.htm
Let me know if you have any question.
Regards,
RS
‎2007 Apr 01 6:00 AM
Hi,
MB_DOCUMENT_BADI is a BADI. You can see this BAPI using transaction SE18. These two methods in this BADI
<b>1</b>. MB_DOCUMENT_BEFORE_UPDATE - Exit after Writing a Material Document. Not in 'update task'
<b>2</b>. <b>MB_DOCUMENT_UPDATE</b> - When Writing a Material Document. In 'Update task'.
You should use the second method "MB_DOCUMENT_UPDATE " because this is called where all validation are finished and data is being updated.
To use this method first you will have to create a implementation of this BADI. Follow these steps to implement BADI.
--> Go to transaction SE19.
--> Enter Implementation name "Z_MB_DOCUMENT_UPDATE" ( you can enter any other meaningful name too) and hit create.
--> When asked for "definition name" , enter "MB_DOCUMENT_UPDATE".
--> On the screen which opens, enter meaningful description. and hit save.
--> When asked, enter your custom development class and create a transport request.
--> Now, select "interface" tab.
--> Here you can do two things. <u><b>a).</b></u> double-click on method "MB_DOCUMENT_UPDATE" and it will directly take you to the place where you write your code to update custom Z table. <b>OR</b> <u><b>b).</b></u> Double-click on the "implementation class" . This you will fine under interface name and it would be line "ZCL_IM__MB_DOCUMENT_UPDATE".
--> If you double-click on "implementation class", it will take you to the screen ( this is same as SE24 screen where you implement can see classes and interfaces ) where you can see method, what parameters are available etc. From here also you can double-click on method and do to the place where you can implement you code.
For more information on BADI, please refer to this link.
http://help.sap.com/saphelp_46c/helpdata/EN/ee/a1d548892b11d295d60000e82de14a/frameset.htm
Let me know if you have any question.
Regards,
RS