User Exits & BAPI in MIRO transaction.

Hi all,
We have a scenario as below.
We are raising PO (Say PO No.1) with upper delivery tolerance as 10% at item level. The quantity upto 10% tolerance level is received via movement type 101.
The quantity received above 10% but upto 20% is received via separate movement type say Z01 & PO No. 2 is getting created automatically.
The quantity received above 20% is received via separate movement type say Z02 & PO No. 3 is getting created automatically.
Now consider that Rs. 500 received through 101 movement. Rs. 200 received through Z01 movement & Rs. 100 received through Z02 movement.
Now our requirement is as below.
1. At the time of MIRO,  user will give  PO No. 1 as input. System should through throw message to select PO No. 2 & PO No. 3 also.
2. Following entries should get passed.
101 movement :   Vendor A/C Cr.   500
                             GR/IR A/C    Dr.           500
Z01 movement     Vendor A/C Cr.  200
                             GR/IR A/C    Dr.           200
Z02 movement     Provisional GL A/C Cr.  100
                             GR/IR A/C               Dr.            100
As regards the Z02 movement, we are passing it via GL account tab in MIRO transaction.
After the above entries are passed, system should also raise a debit note for 50% amount of Z01 movement as below.
Provisional GL A/C  Cr.  100
Vendor A/C              Dr.          100
Can any one suggest suitable user exits/BADI/BAPI to satisfy above requirement.
Shripad

Hi
1. In my opinion, there is no mechanism by which you can tag PO 1/2/3... So, while entering PO1 in MIRO, I dont think there is any mechanism by which you can get a message for Po 2 and 3
You can still try your hand at BAPI_ACC_INVOICE_RECEIPT_POST.... Or go to T code BAPI and explore the right BAPI
2. Regarding other requirements of Z02 and Z01, you can create a Z t code using a BDC for F-02 or BAPI_ACC_DOCUMENT_POST
br, Ajay M

Similar Messages

  • User exits, Bapi , badi ?

    Hi Gurus,
    What are user exits, BAPI and BADI ?
    Short and sweet answers would be appreciated.
    Thanks in advance.

    BAPI
    BAPI stands for Business API(Application Program Interface).
    A BAPI is remotely enabled function module ie it can be invoked from remote programs like standalone JAVA programs, web interface etc..
    You can make your function module remotely enabled in attributes of Function module but
    A BAPI are standard SAP function modules provided by SAP for remote access. Also they are part of Businees Objest Repository(BOR).
    BAPI are RFC enabled function modules. the difference between RFc and BAPI are business objects. You create business objects and those are then registered in your BOR (Business Object Repository) which can be accessed outside the SAP system by using some other applications (Non-SAP) such as VB or JAVA. in this case u only specify the business object and its method from external system in BAPI there is no direct system call. while RFC are direct system call Some BAPIs provide basic functions and can be used for most SAP business object types. These BAPIs should be implemented the same for all business object types. Standardized BAPIs are easier to use and prevent users having to deal with a number of different BAPIs. Whenever possible, a standardized BAPI must be used in preference to an individual BAPI.
    The following standardized BAPIs are provided:
    Reading instances of SAP business objects
    GetList ( ) With the BAPI GetList you can select a range of object key values, for example, company codes and material numbers.
    The BAPI GetList() is a class method.
    GetDetail() With the BAPI GetDetail() the details of an instance of a business object type are retrieved and returned to the calling program. The instance is identified via its key. The BAPI GetDetail() is an instance method. BAPIs that can create, change or delete instances of a business object type
    The following BAPIs of the same object type have to be programmed so that they can be called several times within one transaction. For example, if, after sales order 1 has been created, a second sales order 2 is created in the same transaction, the second BAPI call must not affect the consistency of the sales order 2. After completing the transaction with a COMMIT WORK, both the orders are saved consistently in the database.
    Create( ) and CreateFromData! ( )
    The BAPIs Create() and CreateFromData() create an instance of an SAP business object type, for example, a purchase order. These BAPIs are class methods.
    Change( )
    The BAPI Change() changes an existing instance of an SAP business object type, for example, a purchase order. The BAPI Change () is an instance method.
    Delete( ) and Undelete( ) The BAPI Delete() deletes an instance of an SAP business object type from the database or sets a deletion flag.
    The BAPI Undelete() removes a deletion flag. These BAPIs are instance methods.
    Cancel ( ) Unlike the BAPI Delete(), the BAPI Cancel() cancels an instance of a business object type. The instance to be cancelled remains in the database and an additional instance is created and this is the one that is actually canceled. The Cancel() BAPI is an instance method.
    Add<subobject> ( ) and Remove<subobject> ( ) The BAPI Add<subobject> adds a subobject to an existing object inst! ance and the BAPI and Remove<subobject> removes a subobject from an object instance. These BAPIs are instance methods.
    BAPI-step by step
    http://www.sapgenie.com/abap/bapi/example.htm
    list of all bapis
    http://www.planetsap.com/LIST_ALL_BAPIs.htm
    User Exits
    User exits are a type of system enhancement that were originally developed for the R/3 SD.
    The SAP developer creates a special include in a module pool. These includes contain one or more subroutines that satisfy the naming convention userexit_<name>. The calls for these subroutines have already been implemented in the R/3 program. Refer Conventional SD User exits Slides
    A user exit is considered a modification, since technically objects in the SAP namespace are being modified.
    After delivering them, SAP never alters includes created in this manner; if new user exits must be delivered in a new release, they are placed in a new include program.
    Customer Exits
    Customer exits are “hooks” provided by SAP within many standard programs, screens and menus on which customers may “hang” custom functionality to meet business requirements
    BADI
    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
    Reward Points if useful.

  • To find the User Exits for a particular Transaction.

    hi,
        I want to find the number of User Exits for a The Transaction MM01 or MM02,
        I serched in the forums but could not find satisfactory ans,
        I tried with:
                 T.Code-> System>Status->Prog Name>SE38>find Call Customer-Exit.
        But its not helping me,
        Please help me.
    Thanks and Regards
    Suraj S Nair.

    hi ,
    if you are new to user exist use --> follw the below methos to find the user exit for a particular transaction or t-code
    create one custom pgm in se38 and execute >selection screenenter t-code and execute it will return all the user exists for a specific transaction..
    Finding the user-exits of a SAP transaction code
    * Finding the user-exits of a SAP transaction code
    * Enter the transaction code in which you are looking for the user-exit
    * and it will list you the list of user-exits in the transaction code.
    * Also a drill down is possible which will help you to branch to SMOD.
    * Written by : SAP Basis, ABAP Programming and Other IMG Stuff
    *              http://www.sap-img.com
    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.
    *---End of Program
    Regards,
    Prabhudas

  • Finding the user-exits of a SAP transaction code

    Hi All,
    Can any one tell me how to find the user exits related to particular transaction code?
    Regards,
    Prem

    Dear PremKumar,
    *Please Search SDN Before posting any thread the question you have asked is already available since you are new to SDN and for your reference iam pasting the code copy paste the same code and execute and give the TCODE then it will list out all the exits.
    *REPORT  ZUSEREXIT.
    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.
    Can you closse the thread if your problem got fixed !!!!
    Cheers
    fareed

  • User-Exit/BADI/BTE for transaction /COCKPIT/1

    Hi everybody,
    I need to send and Idoc when a MM invoice enters the system from transaction /COCKPIT/1.
    I already made a function to send the idoc but now I'm having trouble to find a place to fire it.
    Any help would be very much appreciated.
    Thanks.
    Fábio Galvã

    Hi ,
    I dont know if replying on such an old link will help.
    Did you find the user exit /Badi for this transaction?
    Regards,
    Kushmeen

  • User exit or badi for transaction IW32

    Hi all,
    I am searching for user exit or badi for Transaction IW32 but not finding as per my requirement.here in transaction IW32 if field system status(STTXT) key value is 'Released', all line item components should get displayed in display mode.it should not allow to edit or change line item components.can anyone give user exit or BADI to achieve this.
    Thanks in advance.
    Regards,
    Harshada

    Hi,
    Try to use this exit:
    Enhancement     EXIT_SAPLBSVA_001     STATTEXT     Modification exit for formatting status text lines     
    Sample code:
    IF ( sy-tcode = 'IW32') .
      DATA: lv_str1   TYPE string.
      FIELD-SYMBOLS : <fs_qmart> TYPE ANY.
      lv_str1 = '(SAPLIQS0)VIQMEL-objnr'.
      ASSIGN (lv_str1) TO <fs_objnr>.
      SELECT SINGLE inact INTO lv_inact FROM jest WHERE  objnr = viqmel-objnr
                                                     AND   stat = c_stat
                                                     AND  inact = space.
        IF sy-subrc = 0.
          LOOP AT SCREEN.
              screen-input = 0.
              MODIFY SCREEN.
            ENDIF.
          ENDLOOP.
    ENDIF.
    Alternativ badi:
    BADI     SAPLIQS0          IQS0_STATUS_MAINTAIN     Control of Changeability of User Status     
    I hope this may helpfull.
    Thanks,
    AMS

  • User exit/ badi for fb02 transaction

    Hi,
    what are the appropriate user exit/ badi for fb02 transaction for a disabling(graying out) a
    payment block field for particular users..?
    Regards,
    Avi

    Following are the exits available for FB02
    F050S001            FIDCMT, FIDCC1, FIDCC2: Edit user-defined IDoc segment
    F050S002            FIDCC1: Change IDoc/do not send
    F050S003            FIDCC2: Change IDoc/do not send
    F050S004            FIDCMT, FIDCC1, FIDCC2: Change outbound IDoc/do not send
    F050S005            FIDCMT, FIDCC1, FIDCC2 Inbound IDoc: Change FI document
    F050S006            FI Outgoing IDoc: Reset Clearing in FI Document
    F050S007            FIDCCH Outbound: Influence on IDoc for Document Change
    F180A001            Balance Sheet Adjustment
    FARC0002            Additional Checks for Archiving MM Vendor Master Data
    FEDI0001            Function Exits for EDI in FI
    RFAVIS01            Customer Exit for Changing Payment Advice Segment Text
    RFEPOS00            Line item display: Checking of selection conditions
    RFKORIEX            Automatic correspondence
    SAPLF051            Workflow for FI (pre-capture, release for payment)

  • User exit or BADI in transaction code WAK2

    Hi All,
      I have a requirement to implement a user exit or badi on transaction code WAK2 or WAK1. On click of SAVE button after entring sales price in  price planning tab . I need user exit or badi's after clicking save. I got three user exits 1. call customer-function '001' 2. Call customer-function '002' 3. Form badi_matnr_check_init 4. call method g_badi_matnr_input_002 but none of them deel with sales price field.
    Thanks and Regards,
    Asif

    Hi friend,
    Try this ampliation at CMOD:
    WCOUP001
    Try this BADI:
    RDM_PROMOTION_WAK1
    Regards,
    Welinton Rocha

  • User Exit / BADI for MIRO in order to Fill G/L Account Automatically

    Hello!
    Recently I've got a request asking me to fill the G/L Account table control in MIRO transaction using an User Exit or BADI. I'm able to find all the information needed to complete this task, but can't seem to find a way to insert that data in the G/L table control. They want this data uploaded as soon the user inserts the PO number and loads everything. Is this possible?
    Thanks in Advance
    Regards,
    Moises Franco

    Hi.
    Find appropriate place in code to realize your task
    and insert GL data using corresponding BAPI.

  • User-Exit for MR1M/MIRO

    The unplanned delivery costs can be posted with the help of the User Exit EXIT_SAPLMRMH_014 (for Transaction MR1M / MIRO). It is not possible to settle planned delivery costs. To pass Unplanned Delivery costs (freight), you have to fill also the tax jurisdiction Code for the delivery costs, because the default jurisdiction code from customizing is not relevant for EDI case. So you have to fill the
    following fields:E_RBKPV-MWSKZ_BNK
    E_RBKPV-TXJCD_BNK  using the idoc segment E1EDK04.Please give me an idea how to code?
    Title edited by: Alvaro Tejada Galindo on Jun 12, 2008 12:15 PM

    Hi the code in the user exit is based on the idoc segment.I have to make use of segment E1EDK04.
    Please help.The code is below.still they havent used the above mentioned the above segment.
    *&  Include           ZXM08U25                                         *
    ""Lokale Schnittstelle:
    *"  IMPORTING
    *"     VALUE(I_IDOC_DATA) TYPE  EDIDD
    *"  EXPORTING
    *"     VALUE(E_CHANGE) TYPE  C
    *"  TABLES
    *"      T_FRSEG TYPE  MMCR_TFRSEG
    *"  CHANGING
    *"     VALUE(E_RBKPV) TYPE  MRM_RBKPV
    *"  EXCEPTIONS
    *"      ERROR_MESSAGE
    Local Variables (Segment Definitions)
    *-Unplanned delivery costs
    DATA: lv_beznk      TYPE beznk.
    *-Segments
    DATA: ls_e1edp02    LIKE e1edp02.
    DATA: ls_e1edp19    LIKE e1edp19.
    DATA: ls_e1edk05    LIKE e1edk05.
    DATA: ls_e1edk02    LIKE e1edk02.
    DATA: ls_e1edk03    LIKE e1edk03.
    DATA: ls_e1edkt2    LIKE e1edkt2.
    Park the Invoice Automatically (Requirement from ENH038)
    **-Set the Status as Parked
    e_rbkpv-rbstat = '1'.                                       "A or 1
    ***rbkpv-ivtyp = '4'.
    ***e_rbkpv-xzuordli = 'X'.
    **-Set the Change Indicator
    e_change = 'X'.
    This Exit is called once for every E1EDPnn segments before it calls
    EXIT_SAPLMRMH_013 (which determines the PO Line Item).
    Save the Material/Vendor Article/EAN-UPC to be passed to the above
    User exit
    *-Setup the lookup structure for PO Line items
    CASE i_idoc_data-segnam.
    *-IDoc: Document Item Reference Data Segment
      WHEN 'E1EDP02'.
        MOVE i_idoc_data-sdata TO ls_e1edp02.
    *-  Evaluate the Qualifier
        CASE ls_e1edp02-qualf.
    *-    Purchase Order
          WHEN '001'.
    *-      Save the values for PO Item Lookup
            CLEAR gs_ekpo_for_lookup.
            MOVE ls_e1edp02-belnr  TO gs_ekpo_for_lookup-ebeln.
            MOVE ls_e1edp02-zeile  TO gs_ekpo_for_lookup-ebelp.
        ENDCASE.
    *-IDoc: Document Item Object Identification
      WHEN 'E1EDP19'.
    *-  Setup the structure data
        MOVE i_idoc_data-sdata TO ls_e1edp19.
    *Article description
        MOVE ls_e1edp19-KTEXT TO gs_ekpo_for_lookup-txz01.
    ***-  Evaluate the Qualifier and save the values for PO Item Lookup
        CASE ls_e1edp19-qualf.
    *-    Material
          WHEN '001'.
            MOVE ls_e1edp19-idtnr  TO gs_ekpo_for_lookup-matnr.
    *-    Vendor Article
          WHEN '002'.
            MOVE ls_e1edp19-idtnr  TO gs_ekpo_for_lookup-idnlf.
    *-    EAN/UPC
          WHEN '003'.
            MOVE ls_e1edp19-idtnr  TO gs_ekpo_for_lookup-ean11.
        ENDCASE.
    **NXH999 - Use this field of the lookup as a last ditch effort to
    **match invoice to PO Item
           MOVE ls_e1edp19-idtnr  TO gs_ekpo_for_lookup-idtnr.
    *-IDoc: Document header reference data
      WHEN 'E1EDK02'.
    *-  Setup the structure data
        MOVE i_idoc_data-sdata TO ls_e1edk02.
        CASE ls_e1edk02-qualf.
          WHEN '010'.
            WRITE ls_e1edk02-belnr TO ls_notes-scaccd.
            CONCATENATE 'SCAC Code:' ls_notes-scaccd
                   INTO gt_notes-tdline SEPARATED BY space.
            APPEND gt_notes.
          WHEN '063'.
            WRITE ls_e1edk02-belnr TO ls_notes-bolnbr.
            CONCATENATE 'Bill of Lading:' ls_notes-bolnbr
                   INTO gt_notes-tdline SEPARATED BY space.
            APPEND gt_notes.
        ENDCASE.
    *-IDoc: Document header date segment
      WHEN 'E1EDK03'.
    *-  Setup the structure data
        MOVE i_idoc_data-sdata TO ls_e1edk03.
        CASE ls_e1edk03-iddat.
          WHEN '010'.
            WRITE ls_e1edk03-datum TO ls_notes-shdate.
            CONCATENATE 'Ship Date:' ls_notes-shdate
                   INTO gt_notes-tdline SEPARATED BY space.
            WRITE ls_e1edk03-datum TO gt_notes-tdline.
            APPEND gt_notes.
        ENDCASE.
    *- Unplanned Delivery Costs (Requirement #5 from ENH115)
      WHEN 'E1EDK05'.
    *-  Setup the structure data
        MOVE i_idoc_data-sdata TO ls_e1edk05.
    *-  Look for Match Condition Record in T076I table (OBCB Transaction)
        READ TABLE gt_t076i TRANSPORTING NO FIELDS
             WITH KEY ewlnr = ls_e1edk05-kschl BINARY SEARCH.
        IF sy-subrc EQ 0.
          CALL FUNCTION 'CURRENCY_AMOUNT_IDOC_TO_SAP'
            EXPORTING
              currency    = e_rbkpv-waers
              idoc_amount = ls_e1edk05-kobtr
            IMPORTING
              sap_amount  = lv_beznk.
          IF ls_e1edk05-alckz EQ '-'.
            e_rbkpv-beznk = e_rbkpv-beznk - lv_beznk.
          ELSE.
            e_rbkpv-beznk = e_rbkpv-beznk + lv_beznk.
          ENDIF.
        ENDIF.
    ENDCASE.

  • Re: User exits, BAPI & BAdI

    Dear gurus,
    I have several questions, which may be quite general to some if you but I hope someone can assist to give me full detail information: -
    1. What is user exits? How it is used? How to configure in Customizing? Details appreciated on the customizing steps.
    2. What is the difference between BAPI and BAdI? How is it used? Customizing techniques and steps?
    Thanks.
    Full points will be awarded if helpful.
    Rgds.

    Hi,
    User exit - A user exit is a three character code that instructs the system to access a program during system processing.
    SXX: S is for standard exits that are delivered by SAP.   XX represents the 2-digit exit number.
    UXX: U is for user exits that are defined by the user.  XX represents the 2-digit exit number
    Customer exit - The R/3 enhancement concept allows you to add your own functionality to SAP’s standard business applications without having to modify the original applications. SAP creates customer exits for specific programs, screens, and menus within standard R/3 applications. These exits do not contain any functionality. Instead, the customer exits act as hooks. You can hang your own add-on functionality onto these hooks.     *-- Mani
    The following document is about exits in SAP :-
    The R/3 enhancement concept allows you to add your own functionality to SAP’s standard business applications without having to modify the original applications. 
    SAP creates user exits for specific programs, screens, and menus within standard R/3 applications. These exits do not contain any functionality. Instead, the customer exits act as hooks. You can hang your own add-on functionality onto these hooks.
    Types of Exits 
    There are several different types of user exits. Each of these exits acts as hooks where you can attach or "hang" your own add-ons.
    Menu Exits
    Menu exits add items to the pulldown menus in standard SAP applications. You can use these menu items to call up your own screens or to trigger entire add-on applications.
    SAP creates menu exits by defining special menu items in the Menu Painter. These special entries have function codes that begin with "+" (a plus sign). You specify the menu item’s text when activating the item in an add-on project.
    Screen Exits
    Screen exits add fields to screens in R/3 applications. SAP creates screen exits by placing special subscreen areas on a standard R/3 screen and calling a customer subscreen from the standard screen’s flow logic.
    Function Module Exits 
    Function module exits add functions to R/3 applications. Function module exits play a role in both menu and screen exits. 
    When you add a new menu item to a standard pull down menu, you use a function module exit to define the actions that should take place once your menu is activated. 
    Function module exits also control the data flow between standard programs and screen exit fields. SAP application developers create function module exits by writing calls to customer functions into the source code of standard R/3 programs. 
    These calls have the following syntax: 
    CALL CUSTOMER-FUNCTION ‘001’.
    Field Exits
    Field exits allow you to create your own programming logic for any data element in the Dictionary. You can use this logic to carry out checks, conversions, or business-related processing for any screen field.  Example: The data element BBBNR identifies a company’s international location number. You might want to set up your R/3 System so that all international location numbers are larger than 100. 
    The field exit concept lets you create a special function module that contains this logic. 
    You assign the special function module to the data element BBBNR. You then assign the module to any programs and screens in which users can add new international location numbers. When you activate your field exit, the system automatically triggers your special routine whenever a user enters a company location number. 
    In 4.6c, you can use "RSMODPRF" program to create field exits.
    An example of a user exits :-
    MODULE user_exit_0001 INPUT 
        CASE okcode.
            WHEN 'BACK OR EXIT'.
                CASE sy-dynnr.
                        WHEN '100'.
                             SET SCREEN 0.
                             LEAVE SCREEN.
    2.HOW TO FIND BADIO OR USEREXIT CUT AND PATE THI SPROG RAM IN SE38 NAD CLICK ON F8 AND PROVIDE UINPUT WHICH TCODE U WANT
    orrun this report u get the corresponding badi associated with perticular transaction
    *& Report ZNEGI16 *
    REPORT ZNEGI16 .
    TABLES : TSTC,
    TADIR,
    MODSAPT,
    MODACT,
    TRDIR,
    TFDIR,
    ENLFDIR,
    SXS_ATTRT ,
    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,
    P_PGMNA LIKE TSTC-PGMNA .
    DATA wa_tadir type tadir.
    START-OF-SELECTION.
    IF NOT P_TCODE IS INITIAL.
    SELECT SINGLE * FROM TSTC WHERE TCODE EQ P_TCODE.
    ELSEIF NOT P_PGMNA IS INITIAL.
    TSTC-PGMNA = P_PGMNA.
    ENDIF.
    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 in ('SMOD', 'SXSD')
    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:/(105) SY-ULINE.
    FORMAT COLOR COL_HEADING INTENSIFIED ON.
    Sorting the internal Table
    sort jtab by OBJECT.
    data : wf_txt(60) type c,
    wf_smod type i ,
    wf_badi type i ,
    wf_object2(30) type C.
    clear : wf_smod, wf_badi , wf_object2.
    Get the total SMOD.
    LOOP AT JTAB into wa_tadir.
    at first.
    FORMAT COLOR COL_HEADING INTENSIFIED ON.
    WRITE:/1 SY-VLINE,
    2 'Enhancement/ Business Add-in',
    41 SY-VLINE ,
    42 'Description',
    105 SY-VLINE.
    WRITE:/(105) SY-ULINE.
    endat.
    clear wf_txt.
    at new object.
    if wa_tadir-object = 'SMOD'.
    wf_object2 = 'Enhancement' .
    elseif wa_tadir-object = 'SXSD'.
    wf_object2 = ' Business Add-in'.
    endif.
    FORMAT COLOR COL_GROUP INTENSIFIED ON.
    WRITE:/1 SY-VLINE,
    2 wf_object2,
    105 SY-VLINE.
    endat.
    case wa_tadir-object.
    when 'SMOD'.
    wf_smod = wf_smod + 1.
    SELECT SINGLE MODTEXT into wf_txt
    FROM MODSAPT
    WHERE SPRSL = SY-LANGU
    AND NAME = wa_tadir-OBJ_NAME.
    FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
    when 'SXSD'.
    For BADis
    wf_badi = wf_badi + 1 .
    select single TEXT into wf_txt
    from SXS_ATTRT
    where sprsl = sy-langu
    and EXIT_NAME = wa_tadir-OBJ_NAME.
    FORMAT COLOR COL_NORMAL INTENSIFIED ON.
    endcase.
    WRITE:/1 SY-VLINE,
    2 wa_tadir-OBJ_NAME hotspot on,
    41 SY-VLINE ,
    42 wf_txt,
    105 SY-VLINE.
    AT END OF object.
    write : /(105) sy-ULINE.
    ENDAT.
    ENDLOOP.
    WRITE:/(105) SY-ULINE.
    SKIP.
    FORMAT COLOR COL_TOTAL INTENSIFIED ON.
    WRITE:/ 'No.of Exits:' , wf_smod.
    WRITE:/ 'No.of BADis:' , wf_badi.
    ELSE.
    FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
    WRITE:/(105) 'No userexits or BADis exist'.
    ENDIF.
    ELSE.
    FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
    WRITE:/(105) 'Transaction does not exist'.
    ENDIF.
    AT LINE-SELECTION.
    data : wf_object type tadir-object.
    clear wf_object.
    GET CURSOR FIELD FIELD1.
    CHECK FIELD1(8) EQ 'WA_TADIR'.
    read table jtab with key obj_name = sy-lisel+1(20).
    move jtab-object to wf_object.
    case wf_object.
    when 'SMOD'.
    SET PARAMETER ID 'MON' FIELD SY-LISEL+1(10).
    CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
    when 'SXSD'.
    SET PARAMETER ID 'EXN' FIELD SY-LISEL+1(20).
    CALL TRANSACTION 'SE18' AND SKIP FIRST SCREEN.
    endcase.
    or
    There are multiple ways of searching for BADI.
    • Finding BADI Using CL_EXITHANDLER=>GET_INSTANCE
    • Finding BADI Using SQL Trace (TCODE-ST05).
    • Finding BADI Using Repository Information System (TCODE- SE84).
    •Finding BADI Using CL_EXITHANDLER=>GET_INSTANCE
    Go to the Transaction, for which we want to find the BADI,
    Get the Program Name of Corresponding Transaction.
    (Click on System->Status. Double Click on Program Name)
    Once inside the program search for ‘CL_EXITHANDLER=>GET_INSTANCE’.
    Make sure the radio button “In main program” is checked.
    A list of all the programs with call to the BADI’s will be listed.
    The export parameter ‘EXIT_NAME’ for the method GET_INSTANCE of class CL_EXITHANDLER will have the user exit assigned to it.
    The changing parameter ‘INSTANCE’ will have the interface assigned to it.
    •Finding BADI Using SQL Trace (TCODE-ST05).
    /people/alwin.vandeput2/blog/2006/04/13/how-to-search-for-badis-trace-it
    •Finding BADI Using Repository Information System (TCODE- SE84).
    Go to “Maintain Transaction” (TCODE- SE93).
    Enter the Transaction VD02 for which you want to find BADI.
    Click on the Display push buttons.
    Get the Package Name. (Package VS in this case)
    Go to TCode: SE84->Enhancements->Business Add-inns->Definition
    Enter the Package Name and Execute.
    BAPIS
    SAP created the Business Framework to allow the technical integration and exchange of business data among SAP components and between SAP and non-SAP components. Important components of the Business Framework are the Business Application Programming Interfaces (BAPIs), which represent visible interfaces at the component boundaries and whose properties serve to integrate these components. 
    The integration can include both components within a local network and components that are connected with one another through the Internet.
    BAPIs allow integration at the business level, not the technical level. This provides for greater stability in the link, and independence from the underlying communication technology.
    You can get all the standard SAP BAPI functions with the transactions code 'BAPI'.
    thanks mate,
    points if helpful,
    Phani.

  • User Exit / Badi for MIRO / MB60

    Hi,
         I want a user exit or badi for the MIRO /MB60 Transactions.
    When select something on GL Account Number(from table control of these transactions) and press on enter then I want to add some code. Can you please let me know the exit/badi for this scenario.
    Thanks,
    Srinivasa Rada

    hi
    Following exits are available for MIRO.
    Transaction Code - MIRO                     Enter Incoming Invoice
    Exit Name           Description
    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
    <b>
    BADI...
    </b>
    To search for a badi, go to se 24 display <b>class cl_exithandler.</b>
    double click on method get_instance, get a break point on case statement.
    execute and start the required transaction in new session.
    look for variable <b>exit_name.</b> It would show the available badi's.
    Please do reward if useful
    Regards
    Dinesh

  • GL Account User Exit for all FI transactions

    Hi Experts,
    We  have to create a Ztable and it stores GL bank account principal amount.
    Ex: 130121 (SCB Bank) - Rs.10,00,000.00
    In SAP , for the same GL account closing balances will available in FS10N of each month.
    Ex: 130121 (SCB Bank) for Sep'09 - Rs.8,50,000.00
    Now, the requirement is..
    I want to put an User Exit for this Bank GL Account . It has to perform a check operation whenever this GL accounts comes for posting on any FI transactions, and
    it'll check each time to the GL account principal balances(from Ztable) with the posting amounts and give a popup message regarding about the bank limits exceeded, remainaing amounts and then only they can able to post the transactions.
    Ex: If they are posting in F-02 (general ledger posting) the amount showing in GL account which go for my user exit calculations everytime and the same will be for all other FI GL transactions.
    Hope u understood else pls let me know by your replies.
    Pls advise.
    thanks & regards
    sankar.

    Hi..
    In the tcode where u want to put the user exit, In the menu select System--> Status and double click on the program.
    Then click on search and give the search term as "call-customer function".. and see if there are any available user exits..
    Select one, and double click on the 3 number..if '003' ,double click on it,it will take u to the Fm..where u will find an include starting with Z.
    Here u can write the code u want.
    Regards,
    Vishwa.

  • BADI / User Exit for APO Order transaction /SAPAPO/SNPTLB

    Hi Experts,
    We have a proxy interface and currently we are using FUNCTION EXIT_SAPMSNPUSER_006 for the APO Order transaction: /SAPAPO/SNPTLB.
    This exist is triggering before the Order is being saved in APO and at times it is throwing an error 'Order key already exists in live cache' in the APO system.
    Is there any other BADI or User exit available to Save the order in APO before the interface gets processed?, if so, plese guide me.
    Thanks & Regards,
    Vijaya

    Hello Lakshmi,
    I am having the same issue with the message "Order key already exists in live cache" in our system. 
    We are using the user-exit EXIT_SAPMSNPUSER_005 for UoM conversion.  But we are not making any explicit proxy calls
    to /SAPAPO/SNPTLB.  Does the system automatically call this transaction with this user-exit?
    Did you get a resolution for the issue.  I would really appreciate if you can let me know how you have addressed this.
    Thanks,
    Ratnam

  • User-exits or BAdI for transaction VL10B

    Hello everybody,
    I have to modify an outbound order during its creation from a purchase order in transaction VL10B. The modification is to update the serial numbers and the batch.
    As the process is in background it is quite difficult to debug the process plus the problem that in this project I cannot modify the user-exits / badi just for testing. (they have implemented 'special' rules for these kind of modifications)
    Does anybody know any user-exit or BAdI where I can update these serial numbers in this transaction VL10B?
    Thanks in advance

    Hi,
    Check [ABAP Ninja|http://www.abapninja.org/] it may help you will the search.
    Regards
    Marcin

Maybe you are looking for