BADI for MM02

Hi
Can anyone please let me know how to create a BADI for Save button in MM02 in ECC6.0?
Thanks
Senthil

hi
exits:
MGA00001
MGA00002
MGA00003
BADI
WRF_DISCONT_PARAMS_I
WRF_DISCONT_FACT_E
WRF_DISCONT_CHECKS_I
MG_MASS_NEWSEG
MATGRP_SKU_UPD
CDT_CHECK_MATERIAL
BADI_MM_MATNR
BADI_MAT_F_SPEC_SEL
BADI_CHECKS_PVS
BADI_MATERIAL_REF
BADI_MATERIAL_OD
BADI_MATERIAL_CHECK
BADI_GTIN_VARIANT
BADI_EAN_SYSTEMATIC
program of MM02 is SAPMMG01.
User exit (SE37): EXIT_SAPMMG01_*
but no user exit are found.
There is another way to solve your problem which is Workflow.
1. Please create your own object type (SWO1) and its super type should be BUS1001006.
2. Add your own method and attach your custom FM which actually updates the Z field of MARC table.
3. Create Task (PFTC_INS)
in basic data:
provide object type which you have created
provide method which you have added
goto triggering events tab
Choose Object Category as BOR object type
provide object type (better give BUS1001006)
provide event as CREATED/CHANGED
What exactly will happen is that whenever material is created, result of it fires CREATED event which starts the task of yours. Accordingly your custom FM will be called then updation of Z field of MARC table happens.
Please have look into very nice video blog which helps you to create your workflow.
blog: Creating your first SAP Business Workflow
perhaps a new approach is to make you're own custom material screen with the help of
BAPI_MATERIAL_SAVEDATA
since mostly 90% of all the values in all the tabs are fixed values I just wrote a screen input with the 10 fields in one screen which are necessary and let the bapi take care of all the other things.
it made life easier in training people, avoid stupid entry mistakes in the mm02 screen which causes troubles throughout the whole line , the manual went from 10 pages to 2 etc etc
if you are already in the process that you have you're own kind of Zfields then this step is not so strange if you look at the complexity of material management and the customizing of the screens around it for each material type etc etc...
Regards,
janani

Similar Messages

  • User Exit or BAdI for MM01/MM02

    Hi all,
    i need an user exit or badi for material master after data are saved.
    any suggestioon?
    thanks
    enzo

    Here are some exits
    MGA00001            Material Master (Industry): Checks and Enhancements 
    MGA00002            Material Master (Industry): Number Assignment       
    MGA00003            Material Master (Industry and Retail): Number Display
    Thanks

  • User Exit or BADI for Material,BOM,Customer,Vendor

    Dear All,
    I have requirement where if User A changes a Material X .It should go for approval by workflow.
    When the Material X is waiting for approval no other User should be able to change the material .It should give him a message
    and restrict him from changing the Material.
    Is there any User Exit or BADI to restrict him from changing the material. The exit or BADI should be called as soon as the Material is entered in MM02.
    I need exit or BADI for BOM, Vendor and Customer also.
    Thank you.

    Hi,
    You can go to Transaction SE80 and check in Function Group MATF. There have been two User Exits which are called during MM02 Transaction execution (via Analysis Transaction SE30) - MATERIAL_FIELD_SELECTION_NEW and MATERIAL_FIELD_SELECTION_COMB.
    BAdI called by FM MATERIAL_FIELD_SELECTION_NEW.
    Thanks and Regards,
    Prabhakar Dharmala

  • Badi for making gross weight field mandatory in MM01.

    Hi,
    Pls tell me the Badi for making gross weight field mandatory in MM01/MM02.
    Thanks in Advance.

    Hi!
    if it is not working with customizing I would do it in this userexit (CMOD)
    MGA00001
    it is the user exit before saving the material master data.
    have fun
    Flo

  • What are the badis for mm01

    Hi,
    Can i know what are badis exits for MM01/MM02/MM03.Can i know the procedure how to search badis.

    This are the available badis and exits for this t.code:
    Enhancement/ Business Add-in Description
    Enhancement
    MGA00001 Material Master (Industry): Checks and Enhancements
    MGA00002 Material Master (Industry): Number Assignment
    MGA00003 Material Master (Industry and Retail): Number Display
    Business Add-in
    MG_MASS_NEWSEG User-Specific Fields & Segments in Mass Maintenance
    MATGRP_SKU_UPD
    CDT_CHECK_MATERIAL Checks for Existence of a Material in a CDT
    BADI_MM_MATNR
    BADI_MAT_F_SPEC_SEL BAdI for Material Special Field Selection
    BADI_MATNR_CHECK_PVS
    BADI_MATERIAL_REF Addition of customer-defined default data for material
    BADI_MATERIAL_OD
    BADI_MATERIAL_CHECK Enhanced checks for material master table
    BADI_GTIN_VARIANT
    BADI_EAN_SYSTEMATIC
    o.of Exits: 3
    o.of BADis: 11
    Find the Exact exits and badis for ur requirement.
    How to fine the exact badi:
    1) Goto se24 (Display class cl_exithandler)
    2) Double click on the method GET_INSTANCE.
    3) Put a break point at Line no.25 (CASE sy-subrc).
    Now
    4) Execute SAP standard transaction
    5) Press the required button for which you need to write an exit logic, the execution will stop at the break point.
    6) Check the values of variable 'exit_name', it will give you the BADI name called at that time.
    7) This way you will find all the BADIs called on click of any button in any
    transaction
    Regards

  • User Exit or BADI for Material master

    When save in MM1 or MM02,  we need a user exit or Badi to <u><b>get ECM data</b></u> (which is saved in AENR or AEOI table). Please help for this.

    Hi Krishna,
    Enhancement/ Business Add-in            Description
    Enhancement
    MGA00001                                Material Master (Industry): Checks and Enhancements
    MGA00002                                Material Master (Industry): Number Assignment
    MGA00003                                Material Master (Industry and Retail): Number Display
    Business Add-in
    MG_MASS_NEWSEG                          User-Specific Fields & Segments in Mass Maintenance
    MATGRP_SKU_UPD
    CDT_CHECK_MATERIAL                      Checks for Existence of a Material in a CDT
    BADI_MM_MATNR
    BADI_MAT_F_SPEC_SEL                     BAdI for Material Special Field Selection
    BADI_MATNR_CHECK_PVS
    BADI_MATERIAL_REF                       Addition of customer-defined default data for material
    BADI_MATERIAL_OD
    BADI_MATERIAL_CHECK                     Enhanced checks for material master table
    BADI_GTIN_VARIANT
    BADI_EAN_SYSTEMATIC
    o.of Exits:          3
    o.of BADis:         11
    These ar ethe avilable exits and badis.
    Rgds,
    P.Naganjana Reddy

  • Reg. Exit/BADI for changing item data of PO in ME22N

    Hi all,
    My requirement is to update the field LABNR (Order Ack.) of few specific line items of a PO, in the Transaction ME22N, using Exit/BADI.
    I have tried the BADI  ME_PROCESS_PO_CUST. But the PROCESS_ITEM method of this BADI processes only the line item which has been changed/inserted in ME22N transaction. But my requirement is to update line items irrespective of whether that line item was "changed/not changed" during the process in ME22N screen.
    Could you please suggest me some suitable Exit/BADI for this requirement.
    Regards,
    Anbarasan K

    Thanks Martin.
    Problem solved by implementing the method Process_Header.
    1. Get the items from Header                              -  im_header->get_items
    2. Loop the item list and get the line item record   - re_item-item->get_data
    3. <- Logic to Update the line item - >.
    4. Update the line item                                       - re_item-item->set_data
    Thank you very much.. Martin.
    Regards,
    Anbarasan K

  • Do you have any idea what is the BADI for creation of Purchase Order?

    Hi Gurus, I would like to ask regarding the BADI for the P.O creation in SRM. I have a requirement that if the Account Assignment Type is "asset" it should tick the checkbox (goods receipt/confirmation of performance of service) in the related documents tab of item.  Thanks a lot. I hope you can help me gurus.

    Thanks for the help.

  • User Exit/ BADI for PO release

    Hi Experts,
    Can anyone please tell me about the User Exit or BADI for Sub contract PO release.Also tel me how to proceed for the following 2 requirement ,
    i have to send an IDOC as & when the Sub contract PO releases.
    And automatically resent if changes are made in PO with the repeat output function in ME22N.
    Regards,
    Nik

    Hi,
      Use trx SE19 to implement your BADI: create an ZME_PROCESS_PO_CUST using ME_PROCESS_PO_CUST as definition.
    Now in Interface Tabs you can see the METHODs you can use as "user-exit", in particular there's PROCESS_ITEM to manage items data.
    You have to write your code into this method.
    This method has IM_ITEM like parameter in its interface, and it's like the type IF_PURCHASE_ORDER_ITEM_MM.
    This type has the method IF_LONGTEXTS_MM~SET_TEXT, you can try to use it to set your text in item.
    This is code for example:
    DATA: TLINE TYPE MMPUR_T_TEXTLINES.
    CALL METHOD IM_ITEM->IF_LONGTEXTS_MM~SET_TEXT
    EXPORTING
    IM_TDID = <YOUR ID>
    IM_TEXTLINES = TLINE.
    So you should read the text you want to copy and pass it to TLINE.
    You can use the METHOD PROCESS_HEADER to read the text you need. This METHOD has IM_HEADER as parameter and it's like the type IF_PURCHASE_ORDER_MM, this type has the method IF_LONGTEXTS_MM~GET_TEXT to read header logn text.
    Anyway while you're in implementation of the BADI go to:
    GoTo->Sample Code
    Here you can try an example how to implement the method you need to use.
    Regards

  • User exit / BADI for training and event management

    Hi all,
    Can anybody tell me if there is any user exit / BADI for training and event management module?
    Thanks & regards,
    LOI

    Hi
    BADI's for Training and Event Management
    HRTEM00MASTERDATA      HR: Training and Event Management - Master Data
    HRTEM00NET_ACTIVITY      Determine Activities of an Attendee (e.g. ESS PV8I)
    HRTEM00NET_WEBST      Set Cancellation Reason in ESS PV8I
    HRTEM_CORR_NOTIF_REQ      Customer Enhancement:Confirmation on Send (R/3 Mail, E-Mail)
    HRTEM_HANDLE_BOOKING      HR-TEM BAdI: Employee Leaves Company - Update TEM Data
    HRTEM_INT_ZW           HR-TEM: Badi for Integration TEM - Time Management
    HRTEM_READ_OBJECT      Customer Enhancement: Name Format
    RHPV0001 Customer      Enhancement for Additional Checks for Booking
    Enhancemnet Spot:
    HRTEM00MASTERDATA      HR: Training and Event Management - Master Data
    ~~~Ganesh Kumar K.

  • How to create a BADI for the sceanrio

    Hi abapers,
    I have a scenario as follows.
    I create a Transaction where in i put the details of the product and quantity for a particular project's site. The amount gets calculated based on the products  unit value and its displayed in net value field. Now the user saves the transaction and a number gets generated. If the net value amount is less than 500 then the user can approve , if its greater than 501 and less than 1500 then a mail should be generated to his superior who is able to approve and ifs amount is greater than 1501 then a mail should be generated to the top of hierarchy who should approve it.
    Now the real challenge is if the same project card  has more than 1  new request and the amount is less than 500 the user should not be able to approve  instead it should generate a mail to his hierarchy for approval  since  the site has already been exceeded its limit of approval. bcoz earlier 500 and current 400 which will make it to greater than 500.similarly for the hiearchy.How do i go about  it.
    Now i want to create a BADI  on the save event of transaction to check the net value amount as well as check for earlier amounts saved for the particular site.
    Any help will be appreciated.
    Regards,
    Navin .

    hai navin
    r u using ECC 6.0 or 4.7 if 4.7 u can create badi defintiion directly form se18 transaction
    and define the interface and its methods , once u define them activate them
    and to use in ur code u create an instance of ur badi name
    and then use
                     cl_exithandler=>get_instance  method in instance name parameter just pass ur badi name and this will create a badi defintion in ur code, and an oen can implement it
    if u r usign ecc6.0 then u can either create new badis usign enhancments or classical badis
    for clasical badis just go to menu  utilites and create classical badis and follw the sam eprocedure
    regards
    m.a

  • Regarding Error message in ME_PROCESS_PO_CUST badi for validation.

    hi Friends,
    I am Using ME_PROCESS_PO_CUST badi for validation in Purchase order (ME21N),
    For that I implemented PROCESS_ITEM method which fires during each row now i  add another validation in same implementation for plant  should be same through out the all line item. Now following code is woking fine but when for second line item user changese plant then it shows error message as per logic which is fine but even after changing plant to correct one the error message is still coming why is it so?
    following is my current validation code
    method IF_EX_ME_PROCESS_PO_CUST~PROCESS_ITEM.
      DATA:ls_poitem TYPE mepoitem,
           ls_poitem_set TYPE mepoitem.
      DATA:ls_poheader TYPE MEPOHEADER.
      DATA:lm_poheader TYPE ref to IF_PURCHASE_ORDER_MM.
      DATA:w_mara TYPE mara.
      DATA:IT_ZMMTBL039 TYPE STANDARD TABLE OF ZMMTBL039 ,
           WA_ZMMTBL039 TYPE ZMMTBL039 .
      DATA:ls_poitem1 TYPE mepoitem.
      DATA:V_KUNNR1 TYPE KNA1-KUNNR.
      DATA:V_KUNNR2 TYPE KNA1-KUNNR.
      DATA:W_WERKS(4),
           w_werks_tmp(4),
           w_flag(1).
      ls_poitem = im_item->get_data( ).
      lm_poheader = im_item->GET_HEADER( ).
      ls_poheader = lm_poheader->GET_DATA( ).
      IF ls_poitem-werks IS NOT INITIAL.
        w_werks = ls_poitem-werks.
        import w_flag to w_flag from MEMORY ID 'FLAG'.
        if w_flag is initial.
          w_flag = 'X'.
          EXPORT w_werks_tmp FROM w_werks TO MEMORY ID 'MEMO1'.
          export w_flag from w_flag to MEMORY ID 'FLAG'.
          clear: w_flag.
        endif.
      ENDIF.
      IMPORT w_werks_tmp TO w_werks FROM MEMORY ID 'MEMO1'.
    break swaroopb.
      IF ls_poitem-werks NE w_werks.
          MESSAGE E010(zparts) with 'Different plants are not allowed in single PO.'.
      ENDIF.
      CLEAR: WA_ZMMTBL039,w_mara.
      REFRESH:IT_ZMMTBL039[] .
      SELECT *
        INTO TABLE IT_ZMMTBL039
        FROM ZMMTBL039
       WHERE bsart EQ ls_poheader-bsart.
      IF sy-subrc EQ 0.
        CLEAR: WA_ZMMTBL039,w_mara.
        SELECT SINGLE *
          INTO w_mara
          FROM mara
         WHERE matnr EQ ls_poitem-MATNR.
        IF SY-SUBRC EQ 0.
          READ TABLE IT_ZMMTBL039 INTO WA_ZMMTBL039 WITH KEY  bsart = ls_poheader-bsart
                                                              mtart = w_mara-mtart
                                                              spart = w_mara-spart.
          IF SY-SUBRC NE 0.
            MESSAGE E009(zparts) WITH ls_poitem-MATNR w_mara-spart ls_poheader-bsart .
          ENDIF.
        ENDIF.
      ENDIF.
    end method

    Hello Swarup
    Since you want to compare all items together (having the same plant) I would suggest to implement this logic either in method CHECK or POST of the interface.
    However, if you want to make your checks within the PROCESS_ITEM method then you should change your logic.
    It does not make sense to work with the ABAP memory within a BAdI implementing class because the class itself is your "memory".
    I would use the following logic to implement your validation:
      lo_poheader = im_item->get_header( ).  " retrieve header instance
      lt_items = lo_poheader->get_items( ).   " retrieve all items
      ls_detail_x = im_item->get_detail( ).  " details of currently processed item
      LOOP AT lt_items INTO ls_item.
        ls_detail = ls_item-item->get_detail( ).
        IF ( ls_detail-werks NE ls_detail_x-werks ).  " validation failed
        " do something...
       ENDIF.
      ENDLOOP.
    However, I would prefer to do this kind of validation in CHECK or POST method.
    Regards,
      Uwe

  • Project settlement to CO-PA and BAdI for automatic creation of rules

    Hello SAP experts!
    I have managed to implement settlement rule strategy to CO-PA for sales project WBS-elements, which automatically creates the settlement rules for WBS-elements with billing indicator. One or more sales order items are assigned to the WBS-elements. When the system derives settlement rules, it generates profitability segments that contain the characteristic values of the WBS elements and the sales orders assigned to them. The problem is, that only one single settlement receiver is determined for each WBS-element. And if more that one sales order item is assigned to the same WBS-element only those characteristics are copied to the settlement rule that are same in all sales order items.
    For example; it products are different in all sales order items, the automatically created settlement rule does not contain the characteristic value product or neighter other caracteristics derived from product.
    Do You have experience of using BAdI for influencing the generation of settlement rules? What it actually makes possible?
    Br, Nina

    Dear Waman,
    thank you for your reply !
    Yet - this still does not solve our problem. In that note (and also in the related note 201445) there is no valuable information included concerning transaction currency:
    Our WBS elements (and also other cost objects, e.g. sales order items) are being debited in all of the three currencies.....but the credit (during settlement) only takes place in two of them:  object and CO area currency.
    I really appreciate additional help on this. It would be hard to believe that we are the only SAP customer having this kind of problem.
    Best regards,
    Thomas

  • Need exit or Badi for updating Warranty data in IE02 while Prod Order conf.

    Hi All,
    I need a user exit or Badi for updating the Warranty data in IE02(Equipment Master) while production order confirmation(CO15)?
    I need to update the Begin guarantee date from Production order and warranty master type in IE02 while confirming the production order.
    Thanks,
    Sudha

    Hi,
    Are you saying first create notification,then service order
    and then Sales order.
    But the requirement is create notification then sales order and when you go in va02 and while modifying the sales order and create service order.
    Thanks & regards,
    chetan.

  • BADI for Claims search in trade promotion management

    Hi Experts,
    I am enhancing the Claims search in trade promotion management with a custom field. I added a custom field in the search screen of claims.
    I want to filter the records based on that custom field. The component is BT311S_CSR and the search query is BTQCSR.
    Is there any BADI for claims so that I can filter the records.
    I tried to put a breakpoint in the badi CRM_BADI_RF_Q1O_SEARCH and searched but it is not stopping.
    Does this badi works for claims? Or first do i have to create a implementation with the filter object as BTQCSR then try to check whether it will stop in the badi while searching the claims.
    Please suggest me.
    Regards,
    Dinesh.

    Hi Dinesh,
    Now this becomes tricky. Since your requirement is very specific there is no way that standard sap can help. You may end up in enhancing n number of classes.
    I can propose a solution though Please put of in front of your business/ functional team and then go ahead..
    Now we will change our approach...Please follow below steps:
    1. Add a altogether new field to your claim transaction using AET for sales office (description as 'Sales Office').
    2. Make this field search and result relevant.
    3. Whenever a sold to party is selected for claim transaction, based on the sold to party you would set value of this field.
    4. Since your field is search relevant it will automatically appear in your search query (control this in view configuration.)
    5. You may or may not display this field to end user in claim detail screen, You can control this by configuration.
    6. Depending on your requirement you can show/hide standard sales office field in search query.
    If you follow this approach then it will serve the purpose.
    Trust this solves your issue. Give points if it helps.
    Regards,
    Bhushan

Maybe you are looking for

  • Report to fetch the text information from customer master sales data

    Dear Experts, We have come up with a requirement where the business want a report/list of the customers for whom a particular text is not maintained in customer master -sales data. There are many Z text id are configured and are maintained in Sales d

  • Submit buttons not working....:o( - ANY IDEAS??

    okay i got a form - ApplicantForm.jsp and that has two buttons on it... 'ACCEPT' and 'REJECT' the next page - CurrentStatus.jsp - should be brought up but its just not working! whenever a button is pressed a blank screen with just the buttons is bein

  • Low Broadband speed = line fault?

    Hi, We have had a very slow download speed since the high winds started last week (live in a rural area about 1 mile from exchange). I have run through the BT Broadband speed wizard & not improved the speed. ADSL Speedtest results are: Download speed

  • Is there a way do find out to which package a file belongs?

    If pacman tries to install a package it is normally aware of files beeing already installed and puts out an error message. Is it possible to encounter to which package a file belongs, t.m. which package did install it?

  • Content searching fails, indexing yields empty or nonexistent index files

    If I remove the content index by issuing these commands in succession: "sudo mdutil -i off /" and "sudo mdutil -E /", then turn indexing back on with "sudo mdutil -i on /", the needed index files in /.Spotlight-V100 are either empty or nonexistent (s