Triggerring user exit when Total shelf life in MARA is changed

I want to trigger some code only when the Total Shelf life in MARA-MHDHB is changed in MM02. Is there a way to do this. I have a program that I use to find out all the user exits and BADIs for a transaction code but could not find a point where I could use the change of total shelf life as a condition to trigger some 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 Displ
Business Add-in
MG_MASS_NEWSEG                          User-Specific Fields & Segments in Mass Maintenance
MATGRP_SKU_UPD                          BAdI for the Article Hierarchy Connection
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 mater
BADI_MATERIAL_OD
BADI_MATERIAL_CHECK                     Enhanced checks for material master table
BADI_GTIN_VARIANT
BADI_EAN_SYSTEMATIC

Hi
I think you can try MGA00001 and i hope this should work only for MM02.
Inside the ZXMG0U02 basically you can try the below code.
data : w_mhdhb type mara-mhdhb.
select single mhdhb  into w_mhdhb from mara where matnr = mara-matnr.
if sy-subrc = 0.
    if w_mhdhb ne mara-mhdbh
You can write your code
    endif.
endif.
Regards
Madhan D

Similar Messages

  • CJ20N BADI or user-exit when back without saving

    Dear all,
    I am looking for a BADI or a user-exit when the user press the back button in transaction CJ20N.
    Please note that the user don't want to ave in this case.
    Thank you for your help.
    Regards,
    Kevin MICHEL
    Moderator message: please (re)search yourself before asking, make use of available information/documentation.
    Edited by: Thomas Zloch on Oct 22, 2010 11:23 AM

    Hi venkatesh,
    put a breakpoint into method GET_INSTANCE of class cl_exithandler.
    Then do what you want to supervise. The method is called for all BADIs triggered. You will find out which one can be used.
    Please excuse the generic nature of my answer. I didn't know what you already tried.
    Regards,
    Clemens

  • How to find the ME29N 'USER EXIT' when our save the release PO after.

    How to find the ME29N 'USER EXIT' when our save the release PO after.
    which user exit will be used?
    thanks.
    alex.

    Hi,
      process :
        go to tranx code :   ME29N ,
           System---->Status , here copy the program name (SAPLMEGUI),
         go to abap editor and specify the program name SAPLMEGUI and find the package "ME".
         tranx code : CMOD ,  Utilites--->Sap Enanchement,
                                         specify the package name : ME
                                          and execute, displays a list of exits ,
                                 and find out our suitable exit based on requirement.
    check these :   EXIT_SAPMM06E_021
    reg
    Siva

  • Total Shelf Life and Batch Management Indicator

    Can anyone pleas confirm if a value of zero is a valid value in the Total Shelf Life field (MHDHB) if you have set the Batch Management Flag (XCHPF)?

    you can well use batch management without using shelf life functionality.  Hence you will have batches without total shelf life.
    In customizing you define whether you use shelf life management in general, and per material you specify in the storage location view if you do it for this individual material.
    Please check the docu.

  • User Exit/BADI to Lock Sales order for any changes in VA02 (Excluding Prici

    Hi All,
    I am looking for an User Exit or BADI which disallows any kind of changes in Sales Order on a particular condition.
    This can't b controlled through Authorization, so have to look for an exit. Please suggest.
    If possible, please provide the example.
    Thanks

    Hi,
    Check the user exit MV45AFZZ in this exit u will be finding the Lot of stages where we can control the VA01 or VA02 . Please find the exit with the name SAVE before. Try to check any changes For sales order in CDHDR and CDPOS and give some error message .
    Thanks and Regards,
    Srinivas.

  • FB70: User exit when the save button (for posting) has been click

    Hi ABAP Gurus,
    With regard to FB70, can anyone provide me the name of the user exit that will be triggered when the save button (for posting) has been clicked?
    Thanks!
    <b>
    Best Regards.
    Brando</b>

    Hello Brando,
    With FB70 I recommend you implement the user-exit via the Business Add-In (BADI) way and avoid SMOD exits if possible.
    The list below are the BADIs that are called by the <b>ECC6.0</b> system after you click the <b>Save</b> button to post a document. <u>They are listed in the order which they are called before the actual post</u>. You'll have to find the right one as per your requirement - you can view their definition via transaction SE18 then after you find the right one you need to use that definition to create an implementation via SE19. Here again, you'll have to choose the right method that suits your requirement. You'll find the method and class documentation in some cases with examples on how to implement, you need to write the code between the Method..EndMethod statement using the parameters provided by the Method.
    1. PPA_CUST_BADI
    2. FI_RES_ITEM_CURRENCY
    3. AC_QUANTITY_GET
    4. BADI_PRKNG_NO_UPDATE
    5. FM_POP_CORE
    6. FMRI
    7. FMRE_BUS_PROCESS
    8. FAGL_SET_SEGMENT
    9. EXIT_XFMPR1_001
    10. BUAVC_CHECK_RESTRICT
    11. UKM_R3_ACTIVATE
    12. CO_DOCUMENT_INFO
    I spent a bit of time debugging FB70 to find this info for you, please appreciate by rewarding points (or else
    Good luck.
    Cheers,
    Sougata.

  • Updating custom field in table EKKO within user exit when PO is saved

    I am trying to update a custom field in table EKKO when a PO is saved.  I am using FM EXIT_SAPMM06E_013, within enhancement MM06E005.  Since EKKO is not a table that can be updated with this user exit, I am using a technic that I read about on SDN where I assign a field symbol to the calling program variable and then am able to access data within EKKO table.  But when I pass this data back into the field symbol, for some reason this field is not getting saved when the PO is saved.  In debug mode, it looks like this field is getting updated, but when I look in the table after the PO is saved, it is not there.  My code sample is below.  What I am doing wrong?
    data:
      CHAR(50) VALUE '(SAPLMEPO)EKKO-ZHDRCSTCENTER',
      g_zhdrcstcenter like ekko-zhdrcstcenter,
      FIELD-SYMBOLS <F1> type any.
    if i_ekko-ekorg = '5401'.
      ASSIGN (char) to <F1>.
      g_zhdrcstcenter = <F1>.
      move '0000113322' to g_zhdrcstcenter.
      <F1> = g_zhdrcstcenter.
    endif.
    Thanks!
    Sarah Smyth.

    Firstly, have you investigated using EXIT_SAPMM06E_008 to set any custom fields you have added in the EKKO_CI / CI_EKKODB structure?.. that might work more easily.
    In terms of doing an assign back into a calling program's memory, it can work but it's probably worth setting a break point in your code then stepping through watching the values in EKKO - sometimes you can find subsequent code that re-writes an earlier copy of values back into the structure, thereby preventing you doing your change...  SAP does warn this method is for "internal use".  Also check in your debugger that it's SAPLMEPO and not SAPMM06E you need.

  • Processing of a BDC  in background which internally triggers user exits

    Hi experts,
    I have a req. where in a BDC program would internally trigger a user exit to update values.The program is running well in the foreground and in display with errors.But in background it throws a "System error when creating a control".Can you please let me know the exact reason for this.
    Thanks and Regards,
    Anitha

    i think there is one option 'After Job' in SM36
    this might be helpful to you
    regards
    if you are creating your jobs via SM36, you should be able to to create the second job using
    'After Job' option with the 'Start Status Dependent' checkbox switched on. This way the
    second job will not start unless the first job finishes successfully.
    Message was edited by: Surpreet Singh Bal

  • User Exit when save Purchase Requisition (ME51N and ME52N)

    Hy Everyboby,
    I want to know an enhancement point/user exit activated when saving a Purchase requisition to control all item amount for a budget check.
    So anyone can help me ?
    Thanks in advance.

    Hi All,
    i am working on an enhancement where in i need to enhance the transactions ME41,42 , ME51n, 52n and ME21n and ME22n.
    the requirement is whenever a PR is created/modified (ME51/52) and a business document is attached to it, then the same business document should be available in the RFQ created for this PR as an attachment. and the same flow should happen while creating the PO using the RFQ. I am unable to find a correct user exit for this requirement. kindlyreply me if you have any solutions for it.
    your help is very much appreciated.
    thanks,
    Mohan

  • Need user exit when deleting an invoice using MIR6 transaction

    Hi all,
    I m trying to delete an Invoice using MIR6 transaction. And I need a user exit to be triggered  on deletion of an Invoice.
    Can anybody help me and let me know if any user exit is available there?
    Points will be rewarded.
    thanks
    Ashish

    Hi
    Business Add-Ins
    Business Add-Ins are a new SAP enhancement technique based on ABAP Objects. They can be inserted into the SAP System to accommodate user requirements too specific to be included in the standard delivery. Since specific industries often require special functions, SAP allows you to predefine these points in your software.
    As with customer exits (SMOD/CMOD [Page 40]), two different views are available:
    • In the definition view, an application programmer predefines exit points in a source that allow specific industry sectors, partners, and customers to attach additional software to standard SAP source code without having to modify the original object.
    • In the implementation view, the users of Business Add-Ins can customize the logic they need or use a standard logic if one is available.
    In contrast to customer exits, Business Add-Ins no longer assume a two-system infrastructure (SAP and customers), but instead allow for multiple levels of software development (by SAP, partners, and customers, and as country versions, industry solutions, and the like). Definitions and implementations of Business Add-Ins can be created at each level within such a system infrastructure.
    SAP guarantees the upward compatibility of all Business Add-In interfaces. Release upgrades do not affect enhancement calls from within the standard software nor do they affect the validity of call interfaces. You do not have to register Business Add-Ins in SSCR.
    The Business Add-In enhancement technique differentiates between enhancements that can only be implemented once and enhancements that can be used actively by any number of customers at the same time.
    In addition, Business Add-Ins can be defined according to filter values. This allows you to control add-in implementation and make it dependent on specific criteria (on a specific Country value, for example). All ABAP sources, screens, GUIs, and table interfaces created using this enhancement technique are defined in a manner that allows customers to include their own enhancements in the standard.
    A single Business Add-In contains all of the interfaces necessary to implement a specific task. In Release 4.6A, program and menu enhancements can be made with Business Add-Ins. The actual program code is enhanced using ABAP Objects. In order to better understand the programming techniques behind the Business Add-In enhancement concept, SAP recommends reading the section on ABAP Objects
    DEFINING THE BADI
    1) execute Tcode SE18.
    2) Specify a definition Name : ZBADI_SPFLI
    3) Press create
    4) Choose the attribute tab. Specify short desc for badi.. and specify the type :
    multiple use.
    5) Choose the interface tab
    6) Specify interface name: ZIF_EX_BADI_SPFLI and save.
    7) Dbl clk on interface name to start class builder . specify a method name (name,
    level, desc).
    Method level desc
    Linese;ection instance methos some desc
    8) place the cursor on the method name desc its parameters to define the interface.
    Parameter type refe field desc
    I_carrid import spfli-carrid some
    I_connid import spefi-connid some
    9) save , check and activate…adapter class proposed by system is
    ZCL_IM_IM_LINESEL is genereated.
    IMPLEMENTATION OF BADI DEFINITION
    1) EXECUTE tcode se18.choose menuitem create from the implementation menubar.
    2) Specify aname for implementation ZIM_LINESEL
    3) Specify short desc.
    4) Choose interface tab. System proposes a name fo the implementation class.
    ZCL_IM_IMLINESEL which is already generarted.
    5) Specify short desc for method
    6) Dbl clk on method to insert code..(check the code in “AAA”).
    7) Save , check and activate the code.
    Some useful URL
    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
    www.sapgenie.com/publications/saptips/022006%20-%20Zaidi%20BADI.pdf
    http://www.sapdevelopment.co.uk/enhance/enhance_badi.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/e6/d54d3c596f0b26e10000000a11402f/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c2/eab541c5b63031e10000000a155106/frameset.htm
    Now write a sample program to use this badi method..
    Look for “BBB” sample program.
    “AAA”
    data : wa_flights type sflight,
    it_flights type table of sflight.
    format color col_heading.
    write:/ 'Flight info of:', i_carrid, i_connid.
    format color col_normal.
    select * from sflight
    into corresponding fields of table it_flights
    where carrid = i_carrid
    and connid = i_connid.
    loop at it_flights into wa_flights.
    write:/ wa_flights-fldate,
    wa_flights-planetype,
    wa_flights-price currency wa_flights-currency,
    wa_flights-seatsmax,
    wa_flights-seatsocc.
    endloop.
    “BBB”
    *& Report ZBADI_TEST *
    REPORT ZBADI_TEST .
    tables: spfli.
    data: wa_spfli type spfli,
    it_spfli type table of spfli with key carrid connid.
    *Initialise the object of the interface.
    data: exit_ref type ref to ZCL_IM_IM_LINESEL,
    exit_ref1 type ref to ZIF_EX_BADISPFLI1.
    selection-screen begin of block b1.
    select-options: s_carr for spfli-carrid.
    selection-screen end of block b1.
    start-of-selection.
    select * from spfli into corresponding fields of table it_spfli
    where carrid in s_carr.
    end-of-selection.
    loop at it_spfli into wa_spfli.
    write:/ wa_spfli-carrid,
    wa_spfli-connid,
    wa_spfli-cityfrom,
    wa_spfli-deptime,
    wa_spfli-arrtime.
    hide: wa_spfli-carrid, wa_spfli-connid.
    endloop.
    at line-selection.
    check not wa_spfli-carrid is initial.
    create object exit_ref.
    exit_ref1 = exit_ref.
    call method exit_ref1->lineselection
    EXPORTING
    i_carrid = wa_spfli-carrid
    i_connid = wa_spfli-connid.
    clear wa_spfli.
    check the following user exits for MIR6
                                                                                    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      
    Regards
    Anji
    Message was edited by:
            Anji Reddy Vangala

  • User exit when saving the financial document (VX11N)

    Hi,
    We are creating financial document as a letter of credit using transaction code VX11N. User would like to have some checking on the fields based on some user defined logic. Is there any user exit that can be used to serve this purpose. I am looking to usre exit similar to when saving sales order (i.e: USEREXIT_SAVE_DOCUMENT in MV45AFZZ).
    Regards

    Hi,
    Check below link for all SD user Exits.
    https://wiki.sdn.sap.com/wiki/display/ERPLO/SDUserexits
    Best regards,
    Anupa

  • USER EXIT WHEN PO SAVED

    I need to update ztable with PO Quanity for respective vendor material when purchase order is saved. Kindly let me know the user exit to be used.
    Thanks

    Seshu
    When i double click on the include INCLUDE ZXM06U44 in the FM EXIT_SAPMM06E_013 to write my code i am getting the followin error. Where should i incorporate my logic in this FM ?
    Program names ZX... are reserved for includes of exit function groups
    You attempted to create a program name beginning with ZX but this name
    range is reserved only for includes of exit function groups (function
    groups containing only function exits).
    Thanks

  • User exits when posting purchase document and goods movement (GR)

    I want to update some custom tables when posting PO and goods movement (GR) .
    Please suggest user exits for both posting.

    Check the below exists
    FOR PO
    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
    AMPL0001            User subscreen for additional data on AMPL
    For Goods Movement
    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

  • Suggest the user exit when process order released then save

    Need to update batch value from component's batch field to FG batch field. Need at the time of process order released and saved. Can you please tell me which user exit to use?

    Hi,
    The following enhancements are available for process order management:
    For order maintenance:
    o   PPCO0006 to predefine entries for order header fields when creating
        an order
    o   PPCO0001 to provide information at the time of saving (for
        production orders and process orders)
    o   PPCO0007 to check or change header data when saving
    o   PPCO0002 to add additional checks that are to take place when
        setting the deletion flag or deletion indicator
    o   PPCO0003 to prevent changes in sales order items that would cause
        changes in the process order for static assembly processing
    o   STATTEXT to format the status line
    o   PPCO0008 to check components that have been changed or added
    o   PPCO0005 to change the storage location and the 'backflush'
        indicator in the reservation
    o   PPCO0013 to change the priority of the selection criteria for batch
        determination in production orders or process orders
    o   PPCO0014 to restrict the selection of process orders that are
        offered when creating external relationships
    o   PPCO0020 to display additional information for another tab page in
        the process order header
    Regards,
    Dhaval

  • User exit when saving the user profile

    Hi All,
    Is there any user exit exist which get triggered whenever any SAP user profile is saved.
    Thanks in advance,
    Harkamal

    Hi harkamal,
    <b>I dont think that any user exit is present for the code :SU01.</b>
    If you want to check the user exit. please find the below code and execute in SE38  you will get the Userexit related to the  TCode.
    *& Report Z7CC_USEREXIT_TRANSACTION_CODE
    report zuserexit no standard page heading.
    tables : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir.
             tables : tstct.
    data : jtab like tadir occurs 0 with header line.
    data : field1(30).
    data : v_devclass like tadir-devclass.
    parameters : p_tcode like tstc-tcode obligatory.
    select single * from tstc where tcode eq p_tcode.
    if sy-subrc eq 0.
       select single * from tadir where pgmid = 'R3TR'
                        and object = 'PROG'
                        and obj_name = tstc-pgmna.
       move : tadir-devclass to v_devclass.
          if sy-subrc ne 0.
             select single * from trdir where name = tstc-pgmna.
             if trdir-subc eq 'F'.
                select single * from tfdir where pname = tstc-pgmna.
                select single * from enlfdir where funcname =
                tfdir-funcname.
                select single * from tadir where pgmid = 'R3TR'
                                   and object = 'FUGR'
                                   and obj_name eq enlfdir-area.
                move : tadir-devclass to v_devclass.
              endif.
           endif.
           select * from tadir into table jtab
                         where pgmid = 'R3TR'
                           and object = 'SMOD'
                           and devclass = v_devclass.
            select single * from tstct where sprsl eq sy-langu and
                                             tcode eq p_tcode.
            format color col_positive intensified off.
            write:/(19) 'Transaction Code - ',
                 20(20) p_tcode,
                 45(50) tstct-ttext.
                        skip.
            if not jtab[] is initial.
               write:/(95) sy-uline.
               format color col_heading intensified on.
               write:/1 sy-vline,
                      2 'Exit Name',
                     21 sy-vline ,
                     22 'Description',
                     95 sy-vline.
               write:/(95) sy-uline.
               loop at jtab.
                  select single * from modsapt
                         where sprsl = sy-langu and
                                name = jtab-obj_name.
                       format color col_normal intensified off.
                       write:/1 sy-vline,
                              2 jtab-obj_name hotspot on,
                             21 sy-vline ,
                             22 modsapt-modtext,
                             95 sy-vline.
               endloop.
               write:/(95) sy-uline.
               describe table jtab.
               skip.
               format color col_total intensified on.
               write:/ 'No of Exits:' , sy-tfill.
            else.
               format color col_negative intensified on.
               write:/(95) 'No User Exit exists'.
            endif.
          else.
              format color col_negative intensified on.
              write:/(95) 'Transaction Code Does Not Exist'.
          endif.
    at line-selection.
       get cursor field field1.
       check field1(4) eq 'JTAB'.
       set parameter id 'MON' field sy-lisel+1(10).
       call transaction 'SMOD' and skip first   screen.

Maybe you are looking for

  • Shipping cost determination is incomplete

    HI to all I am an SD consultant, I am facing the following issue, I request you give some suggestion for solving the issue ISSUE: When I am creating billing document (delivery related) using VF01 - I am getting the ERROR: 0000500095 000010 Shipment 0

  • When will the ability to Air Display my desktop to my Apple TV become available?

    I know that I can Air Display to my iPad from my computer and then Air Play to my Apple Tv, but this seems like too much of a hassle and would just slow the connection feed. I would believe it is a simple process to add and would be thrilled to show

  • .Mac - galleries and caption

    I've searched the forum trying to figure out how I can add captions (actually I would like to use a combination of headline and caption) to photos in a web gallery but only found posts that suggest that this can only be done from iPhoto. I've tried a

  • Cannot clone my 750 GB HD - Pavillion Elite e9150t Desktop

    I have an HP Pavilion Elite e9150t PC (from July 2009) with 12 GB of RAM and a Seagate Barracuda 750 GB hard drive running Windows Vista Home Premium. I want to clone my 750 GB hard drive onto a new 3 TB Seagate Barracuda SATA 3 6 GB/s drive. For 6 m

  • How to hide a cmd.exe window while my app run

    When i start my application whit .BAT, console window show's too. How can i hide this console window?