ME21N ( BADI OR USEREXIT )

HAI ALL,
please help me for me21n ( validations ) .system should not allow preparation of purchase order for a plant
which is not assigned to company code
Ex:company code 2000 and plant is 2010 it is correct.
     company code 2000 and plant is 2020 sytem should send error message.

Hi Asish,
Please try the badi
ME_PROCESS_PO_CUST Enhancements for Processing Enjoy Purchase Order: Customer
in se18 -> ME_PROCESS_PO_CUST  -> click on documentation tab to learn more
Also check the methods
PROCESS_HEADER
PROCESS_ITEM
Regards
Byju

Similar Messages

  • BADI or Userexit for ME2Xn for VERSION

    Hello,
    I want to know which is the BADI or USerexit for which in ME22n what ever the changes made in PO,Netprice or Delivery date it should create a NEW VERSION number,only if the Netprice is changed,new version is getting genarated....can any one help me regarding this please?
    Moderator message: please work yourself first on your requirement, search for available information.
    Edited by: Thomas Zloch on Dec 1, 2010 11:43 AM

    List of all U-Exists for ME22N:
    AMPL0001            User subscreen for additional data on AMPL
    LMEDR001            Enhancements to print program
    LMELA002            Adopt batch no. from shipping notification when posting a GR
    LMELA010            Inbound shipping notification: Transfer item data from IDOC
    LMEQR001            User exit for source determination
    LMEXF001            Conditions in Purchasing Documents Without Invoice Receipt
    LWSUS001            Customer-Specific Source Determination in Retail
    M06B0001            Role determination for purchase requisition release
    M06B0002            Changes to comm. structure for purchase requisition release
    M06B0003            Number range and document number
    M06B0004            Number range and document number
    M06B0005            Changes to comm. structure for overall release of requisn.
    M06E0004            Changes to communication structure for release purch. doc.
    M06E0005            Role determination for release of purchasing documents
    ME590001            Grouping of requsitions for PO split in ME59
    MEETA001            Define schedule line type (backlog, immed. req., preview)
    MEFLD004            Determine earliest delivery date f. check w. GR (only PO)
    MELAB001            Gen. forecast delivery schedules: Transfer schedule implem.
    MEQUERY1            Enhancement to Document Overview ME21N/ME51N
    MEVME001            WE default quantity calc. and over/ underdelivery tolerance
    MM06E001            User exits for EDI inbound and outbound purchasing documents
    MM06E003            Number range and document number
    MM06E004            Control import data screens in purchase order
    MM06E005            Customer fields in purchasing document
    MM06E007            Change document for requisitions upon conversion into PO
    MM06E008            Monitoring of contr. target value in case of release orders
    MM06E009            Relevant texts for "Texts exist" indicator
    MM06E010            Field selection for vendor address
    MMAL0001            ALE source list distribution: Outbound processing
    MMAL0002            ALE source list distribution: Inbound processing
    MMAL0003            ALE purcasing info record distribution: Outbound processing
    MMAL0004            ALE purchasing info record distribution: Inbound processing
    MMDA0001            Default delivery addresses
    MMFAB001            User exit for generation of release order
    MRFLB001            Control Items for Contract Release Order
    best regards.

  • BADI or userexit for MM01 and MM02

    Hi All,
    My requirment is that when the user create a new material, the profit center field should be auto populated from the input Plant. For example, if the plant for this new material is A, then profit center PCA will be populate. The mapping between plant and profit center is very simple.
    Furthermore, when the user try to save the material with invalid profit center, the system should create a warning message and automatically change the profit center to the valid one as well.
    Right now, i'm looking for either BADI or userexit that would be suitable for my requirement. Does anyone know which BADI or userexit, I should use. Thanks in advance

    Hi
    Check the following
    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
    CDT_CHECK_MATERIAL                      Checks for Existence of a Material in a CDT
    BADI_MM_MATNR                           Modification-Free Archiving Enhancement of MM_MATNR
    BADI_MAT_F_SPEC_SEL                     BAdI for Material Special Field Selection
    BADI_MATNR_CHECK_PVS                    Check Material for Use in iPPE
    BADI_MATERIAL_REF                       Addition of customer-defined default data for material
    BADI_MATERIAL_OD                        Integration of New Objects in Material or Article Master
    BADI_MATERIAL_CHECK                     Enhanced Checks for Material Master Tables
    BADI_GTIN_VARIANT                       User Exit for Customer-Specific GTIN Variant Check
    BADI_EAN_SYSTEMATIC                     BAdI for Internal Control of EAN Logic
    WRF_DISCONT_PARAMS_I                    BAdI: Parameters in Fashion Discontinuation
    WRF_DISCONT_FACT_E                      BAdI: Follow-Up Actions in Discontinuation
    WRF_DISCONT_CHECKS_I                    BAdI: Scope of Check in Material Reorganization
    MG_MASS_NEWSEG                          User-Specific Fields & Segments in Mass Maintenance
    MATGRP_SKU_UPD                          BAdI for Article Hierarchy Connection
    Reward points if useful
    Regards
    Anji

  • BADI or userexit for QP01

    Hi
    After creation or change of Inspection plan (QP01 and QP02) i need to start some additional process. Is there any BADI or userexit?
    Thanks all,
    Branko

    HI,
    Check the below enhancements.
    QPAA0001  Enhancements: Formula checking / editing
    QPAA0002  Customer exit - info fields
    QPAA0004  Enhancement for transferring mstr insp. char. to task lists
    QPAA0005  Deactivation of functions for insp. char. maintenance
    QPAA0006  Additional consistency checks - inspection characteristics
    QPAP0002  Enhancement for material/plan assignment, plan selection
    QPAP0003  Conversion of sample unit of measure to material unit
    CNEX0026  Customer enhancement for general inspection of material
    QAPP0001  User exit QAPP 1 (create inspection point)
    QAPP0002  User exit QAPP 2 (create inspection point & other data)
    QAPP0003  User exit QAPP 3 (IDI: inspection point and other data)
    QEEM0002  User exit add. functions after reading inspection features
    QEEM0006  User exit: add. functions after closing inspection characs
    QEVA0002  Calculation of share of scrap in inspection lot
    QEVA0003  Calculate "Next inspection date" for batch
    QMSB0001  User exit after reading in inspection catalog data
    QMSC0001  User exit after reading in inspection method data
    QMSC0002  User exit for search field entry in the inspection method
    QMSC0003  User exit after saving inspection method data
    QMSD0001  User exit after importing master inspection charac. data
    QMSD0003  User exit after saving master inspection charac. data
    QPAA0003  Additional (auth.) check in plan (inspection chars.)
    QPAA0006  Additional consistency checks - inspection characteristics
    QPL10003  Sample calculation for inspection lot without plan
    QVDM0003  Determ. of deliv. type for inspection lots from deliv. note
    Thanks,
    Ramakrishna
    Message was edited by: Ramakrishna Prasad

  • BADI or Userexit For QM01(Quality Notification)

    Dear Experts,
    I want to add some extra fields in QM01 .
    Is there is any BADI or userexit available for QM01(Quality Notification).
    Please give me some solution.
    Regards,
    Sanket.

    Hi,
    SPRO-->Quality management >Notification> Overview of notification types-->Select the notification & 90 give the customer specific screen area
    this is the process where we will add the screen...
    Go to Function group is XQQM  in SE80....create the screen which you have added in config...example 0090 ....
    No wgo to includes tab you will see one z*TOP include there you declare the fields you want on this custom screen ....
    example : dist type char3.
    In the PBO and PAI validations you can make for the added fields as we do in normal Module pool.
    In the PAI event create a module and pass the values to the structure VIQMEL.
    for example if your added field is dist.
    Pass as
    VIQMEL-dist  = dist.
    Go to cmod create a project ,give the enhacement QQMA0001.
    In the exit   EXIT_SAPMIWO0_009
    Pass those values to the req structure which needs to be populated.
    example :
    i_viqmel-dist = dist.
    move-corresponding i_viqmel to e_viqmel.
    -->  Go to standard table where the values need to be updated(qmel) add one append structure with the req fields
    Thanks,
    Shailaja Ainala.

  • BADI or USEREXIT For VL31N

    Hai everyone,
    Could Anyone Pls Tel me the BADI or USEREXIT  for VL31N while Saving the inbound Delivery .
    REgards,
    EKadevi.S

    HI Ekadevi ,
    following are the Badi's
    DLV_CHECK_APO_UPD
    DELIVERY_PUBLISH
    Following are the user Exits :
    V50PSTAT
    V02V0004
    V02V0003
    V02V0002
    V02V0001
    VMDE0004
    VMDE0003
    VMDE0002
    VMDE0001
    V53W0001
    V53C0002
    V53C0001
    V50S0001
    V50R0004
    V50R0002
    V50R0001
    V50Q0001
    Hope this will help to you.
    Regards,
    Nikhil

  • ME21N BADI get BSART VALUE

    Hi,
    How do I get in ME21N Badi the selected value of BSART
    Thx

    Hi,
    In case the transaction is ME21N  after saving the document only the document number will be generated so we can not use select statements in side the BADI implementation.
    Write the code like below.
    data :i_header    TYPE REF TO if_purchase_order_mm,
            i_ekko TYPE mepoheader.
    CALL METHOD im_item->get_header
          RECEIVING
            re_header = i_header.
        CALL METHOD i_header->get_data
          RECEIVING
            re_data = i_ekko.
    In I_ekko structure BSART value will be there.
    Regards,
    Surendar Reddy.

  • BAdI or USEREXIT for changing data of purchase order header - ME21N

    hello all,
    I would like to ask you any way to change the field "reason for change" of the Purchase Order  header.
    I tried implementing the method PROCESS_HEADER of IF_EX_ME_PROCESS_PO_CUST
    or changing reason_code of structure ekko in user exits EXIT_SAPMM06E_006 and EXIT_SAPMM06E_006
    but it seems not to work.
    How can i do?..
    sap. v. ecc 6.0

    >
    Shiva Kumar wrote:
    > Use the user exit : EXIT_SAPMM06E_012: This is triggered on saving of a PO...and user can add validations etc in the exit...
    > Cheers
    It doesn't work...
    >
    Martin Voros wrote:
    > you get reference to object IM_HEADER in method PROCESS_HEADER of BADI ME_PROCESS_PO_CUST. On this object you can call two methods - GET_DATA and SET_DATA. GET_DATA returns structure with type MEPOHEADER. You can change your field here and then call method SET_DATA with your modified structure. This should work.
    > Cheers
    ..same thing for this solution...
    the field that i want to change is RSCOD inside structure EREVGRID...it seems to have also get_data and set_data methods ( IF_REVISION_ITEM_DCM ),
    but I don't know which BAdI to implement that has a object type ref to EREVGRID...
    Edited by: E_M on May 13, 2008 11:08 AM

  • Need Badi or UserExit during Delivery creation

    Hi,
    I have a requirement to create PGI automatically after delivery is created.
    So i am looking for Userexit or BADI which is called immediately after delivery is created so that I can used delivery number and call logic to create PGI.
    I have searched the sdn for same requirement but the badi LE_SHP_DELIVERY_PROC or BADI DELIVERY_PUBLISH and user exit MV50AFZ1 wont suffice .
    Please suggest.
    Thanks & Regards,
    Swapnil.

    Hi,
    to check which BADI are presents during the execution of your trx, just put a break point in the method "get_instance" of the class "cl_exithandler".
    Watch the "sxs_inter" variable (that contains the name of the BADI interface).
    Run the trx and just watch what u can implement.
    Hope it helps
    Bye
    Andrea
    Pls reward if it helps

  • ME21N badi ME_GUI_PO_CUST - not working in PO creation

    Hi All,
    I am working on badi ME_GUI_PO_CUST to create a custom tab on PO header. I have implemented the BADI with custom fields in the custom screen. However, in ME21N, this new tab is not appearing. At the same time, it is appearing in ME23N. If i take a PO in display mode, the tab appears and then switch to chaneg mode, the tab disappears.
    Any solution for this pleas.??
    Regards,
    Arun.

    Hi Arun,
    You can use MM06E005 exit for adding the tab for item level in ME21n transaction. In general, you go to smod and you give this exit there and then press on documentation then you will find all the information regarding function module exits.
    Give this exit in SMOD and then press Attributes--> click on Components, then you will find all the function module exits and subscreen areas where you can add your custom field on the subscreens.
    I am giving you the subscreen :
    SAPMM06E 0111 CUSTSCR1 SAPLXM06 0111 Subscreen: PO item
    Function module exit:
    EXIT_SAPMM06E_018 Import Data from Customer Subscreen for purchasing document
    Then you start adding the custom field in Custom include of EKPO table and then you go to SE51 and then you import I mean ( Get from dictionary ) that particular Z field and then activate it. These all the thing you need to create a project and implement in CMOD transaction.
    Then you write the respective code in Functionmodule exit to populate the data to the database.
    Thanks,
    Swamy Kunche
    Edited by: Swamy Kunche on Dec 7, 2009 10:58 AM

  • ME21N  ~~BADI - ME_GUI_PO_CUST ,can we have more than cust feilds.

    Hi Experts.....
    I have implemented a BADI named ME_GUI_PO_CUST and ME_PROCESS_PO_CUST in ME21N Transaction to add custom fields. With this I could get an extra custom tab in which I have included 7 Custom fields.
    Now my new req is to get add 8 more new feilds . but in the second method of the BADI -ME_GUI_PO_CUST i.e ....MAP_DYNPRO_FIELDS we have only 10 customer feilds available to be mapped .i ,e MMMFD_CUST_01 --- MMMFD_CUST_02 -
    MMMFD_CUST_03 .....to ......MMMFD_CUST_10 .
    So the Problem is how to map my remaining 5 feilds ..
    Is it possible to add more than 10 feilds in the Customer subscreen .If so please help me do it .
    Thank you in advance

    Subodh ,
    Yes You can use the BADI for header area as well .
    In the BADI Implementation , the first method in the interface - IF_EX_ME_GUI_PO_CUST~SUBSCRIBE
    there is an check for wether the BADI is meant for header or item .
    Code----
    we want to add a customer subscreen on the item detail tab
      CHECK im_application = 'PO'.
      CHECK im_element     = 'ITEM'.
    Code----
    And i have debugged , it triggers for header as well.
    so just change CHECK im_element  = 'ITEM'. to CHECK im_element  =  'HEADER'.
    It will work for header as well.
    Regards ,
    Rajesh .

  • Problem in ME21N BADI method

    Hi Experts,
    In my earlier thread, I asked which method to choose for ME_PROCESS_PO_CUST for ME21N Tcode.
    I got my answer as "CHECK" method, and I closed that thread.
    Now when I am writing a code there in CHECK method and activate it and going to create purchase order, I am not able to block save data.
    My query is to how I can make a check in SAVE button, when user left "PLANT or TINNO" fields blank, so that it will not be able to save the data to generate PO number.
    I am writing a code as :
    DATA : ls_mepoheader TYPE REF TO if_purchase_order_mm.
      DATA : l_header TYPE mepoheader.
      INCLUDE mm_messages_mac. "useful macros for message handling
      l_header = ls_mepoheader->get_data( ).
      IF SY-UCOMM EQ 'MESAVE' OR SY-UCOMM EQ 'MECHECKDOC'.
          IF l_header-plant EQ ' ' OR l_header-tinno EQ ' '.
            mmpur_message_forced 'E' 'ZMSG' '012' '' '' '' ''.
          ENDIF.
      ENDIF.
    Now when I am creating a PO from ME21N, it is showing an erorr message that i have given, but when click on SAVE button, it is saving the data and generate PO number.
    So I am confused which method to choose... so that it will not let save data.
    and also Please check the code i have given.
    Thanks,
    Deepanshu

    Hi ,
    you need call method INVALIDATE to stop users from saving ...check BADI-->sample/default codes to get some idea ...or read its documentation
    DATA : ls_mepoheader TYPE REF TO if_purchase_order_mm.
      DATA : l_header TYPE mepoheader.
      INCLUDE mm_messages_mac. "useful macros for message handling
      l_header = ls_mepoheader->get_data( ).
      IF SY-UCOMM EQ 'MESAVE' OR SY-UCOMM EQ 'MECHECKDOC'.
          IF l_header-plant EQ ' ' OR l_header-tinno EQ ' '.
            ls_mepoheader->INVALIDATE()."Call this method..... 
           mmpur_message_forced 'E' 'ZMSG' '012' '' '' '' ''.
          ENDIF.
      ENDIF.

  • In MIGO FI Documents post BADI or USEREXIT

    hi,
    In MIGO I wnat to update update Translatn date with Document date befor save, is there any USEREXIT or BADI for that please help.
    Regards
    Deepak

    Use this BADI .
    MB_MIGO_BADI
    MB_MIGO_ITEM_BADI

  • Custom screen for ME21n - BADI issue

    hi,
    I had implemented BADI ME_GUI_PO_CUST for ME21n/me22n. The control is going to Subscribe and Map Dynpro methods but the control is not going to other methods like TRANSPORT_FROM_MODEL, TRANSPORT_TO_DYNP, TRANSPORT_FROM_DYNP and TRANSPORT_TO_MODEL.
    Please explain how we can make the control to move to these methods. not sure what is missing in the implementation

    "Customer Data" on ME21N/ME22N uses the SMOD enhancement MM06E005. Screen 0101 is used for Header Customer Data. So, when you navigate through this screen it doesn't go through the TRANSPORT* methods.
    You can also use the BADI ME_GUI_PO_CUST to add your additional tabs in ME21N. You need to use the method SUBSCRIBE to set the Program, Subscreen number and other details. When you do the subscribe method, it would call the TRNSPORT* methods. Check the example code given in the class CL_EXM_IM_ME_GUI_PO_CUST.
    Regards,
    Naimesh Patel

  • BADI of USEREXIT for MIRO

    I need to automaticaly change Payment conditions depending on some conditions on item level. There is algorithm which we got from our customer for this calculation. So, i need userexit or badi where I can implement enhancement.

    Hello,
    Following user exits are present in MIRO
    LMR1M001            User exits in Logistics Invoice Verification
    LMR1M002            Account grouping for GR/IR account maintenance
    LMR1M003            Number assignment in Logistics Invoice Verification
    LMR1M004            Logistics Invoice Verification: item text for follow-on docs
    LMR1M005            Logistics Inv. Verification: Release Parked Doc. for Posting
    LMR1M006            Logistics Invoice Verification: Process XML Invoice
    MRMH0001            Logistics Invoice Verification: ERS procedure
    MRMH0002            Logistics Invoice Verification: EDI inbound
    MRMH0003            Logistics Invoice Verification: Revaluation/RAP
    MRMN0001            Message output and creation: Logistics Invoice Verification
    No of Exits:         10
    Saurabh

Maybe you are looking for