Application Development 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: 

BADI FOR MM02

Former Member
0 Kudos

Hi Folks,

I want to know is there any BADI through which we can update MARC-FEVOR when we call Transaction MM02. I have ipmlemented the BADI BADI_MATERIAL_REF which works only when u create a new material or u extend the material .

Can you tell me is there any BADI which updates this field and is called during MM02 tcode as well.

Regards,

Sumanjeet.

12 REPLIES 12

Former Member
0 Kudos

Hi,

Try the below link

[https://forums.sdn.sap.com/click.jspa?searchID=16904973&messageID=6037840]

Regards,

Surinder

Former Member
0 Kudos

Hi,

Find badi like this for MM02.

1) Go to the transaction SE37 to find your function module.

2) Locate the function SXV_GET_CLIF_BY_NAME.

3) Put a breakpoint there.

4) Now open a new session.

5) Go to your transaction.

6) At that time, it will stop this function.

7) Double click on the function field EXIT_NAME.

😎 That will give you name of the BADI that is provided in your transaction.

Rhea.

Former Member
0 Kudos

hi

The badi's in MM02 are:

BADI_EAN_SYSTEMATIC

BADI_GTIN_VARIANT

BADI_MAT_F_SPEC_SEL BAdI for Material Special Field Selection

BADI_MATERIAL_CHECK Enhanced checks for material master table

BADI_MATERIAL_OD

BADI_MATERIAL_REF Addition of customer-defined default data for material

BADI_MM_MATNR

CDT_CHECK_MATERIAL Checks for Existence of a Material in a CDT

MG_MASS_NEWSEG User-Specific Fields & Segments in Mass Maintenance

Former Member
0 Kudos

i have already implemented BADI_MATERIAL_REF but this does not get triggered from MM02 tcode.

0 Kudos

hi,

still awaiting answers.

0 Kudos

hi,

You can use this exit.

MGA00001.

You can use this structure .

*" VALUE(WMARC) LIKE MARC STRUCTURE MARC

0 Kudos

hi ,

" VALUE(WMARC) LIKE MARC STRUCTURE MARC this is a importing structure how will i update the value of marc using this structure

0 Kudos

hi,

i had done the same exit but for different requirement.

i have done this inorder to restrict duplicate material text of material.

check this sample code and u can do the same for your reuqirement using marc structure.

tables : mara,makt.

data : it_mara type mara occurs 0 with header line,

it_makt type makt occurs 0 with header line,

it_marc type marc occurs 0 with header line,

it_mbew type mbew occurs 0 with header line.

select * from mara into table it_mara .

if it_mara[] is not initial.

select * from makt into table it_makt for all entries

in it_mara where matnr = it_mara-matnr.

endif.

loop at it_makt.

if stext-maktx = it_makt-maktx.

if it_makt[] is not initial.

select * from marc into table it_marc for all entries

in it_makt where matnr = it_makt-matnr.

select * from mbew into table it_mbew for all entries

in it_makt where matnr = it_makt-matnr.

endif.

read table it_marc with key matnr = it_makt-matnr.

if wmarc-werks = it_marc-werks.

read table it_mbew with key matnr = it_makt-matnr.

if wmbew-bwtar = it_mbew-bwtar. " 'VAL_OPEX' or wmbew-bwtar = 'VAL_CAPEX'.

message e001(zmsg).

endif.

endif.

endif.

clear it_makt.

clear it_marc.

clear it_mbew.

endloop.

0 Kudos

hi ,

Thats what i said u r using the wbew structure as importing one and thrwoing an error message based on the value , but i want an exporting structure so that it can update MARC structure .

0 Kudos

Hi,

Still Awaiting Replies.

0 Kudos

use BADI_MATERIAL_CHECK

Former Member
0 Kudos

BADI_SCREEN_LOGIC_RT

use this badi

it will work for sure