User exit for duplicate invoice in MIRO and FV60

HI
i want to find a user exit to findout the duplicate invoice from MIRO, F-47, FV60 (Parked Invoice), MR8M (Credit Memo).
please let me know if you know any user exit for this.
Thanks & regards
Naresh

Hi,
for each transaction code so many user exits are there it is diffecult to pase all the user exits here
check below link  and run the program in se38 and give the transaction code you get the user exits for each transaction code.
https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/find%252bapplication%252bclass%252bwith%252bexits%252band%252bbadis%252bfor%252ba%252btransaction
Regards,
Madhu

Similar Messages

  • User exit for proforma invoice preparation vf01

    Hi experts,
    I using Enhancement SDVFX008 for VF01 its working fine, but its not fire while STO(JEX) invoice preparation.
    In Proforma invoice i need to check road permit. User should not save without roadpermit in particular states only. Kindly give Userexit for this issue.
    Thanks & Regards
    G.Vendhan

    Please donot cross post
    Read the forum rules
    User exit for proforma invoice preparation vf01

  • User Exit for saving Invoice

    Hi Experts,
    My req, is I have to check billing date with order date/ delivery date while creating the invoice in VF01.
    For that I have done codig in user exit RV60AFZZ, so it gives error ,but the billing date field get disable.
    & this invoice no. alsp get created.
    So can anybody plz tell me in which user exit i have to put my code ???
    I have tried with RV60AFZC.But it is not working.
    My code is
    FORM userexit_pricing_prepare_tkomp.
    *  TKOMP-zzfield = xxxx-zzfield2.
    * structure for vbak
    TYPES:BEGIN OF ty_vbak,
          vbeln TYPE vbak-vbeln,
          audat TYPE vbak-audat,
          END OF ty_vbak.
    *likp structure
    TYPES:BEGIN OF ty_likp,
          vbeln TYPE likp-vbeln,
          lfdat TYPE likp-lfdat,
          END OF ty_likp.
    *vbrp structure
    TYPES:BEGIN OF ty_vbrp,
          vgbel TYPE vbrp-vgbel,
          vgpos TYPE vbrp-vgpos,
          aubel TYPE vbrp-aubel,
          aupos TYPE vbrp-aupos,
          END OF ty_vbrp.
    DATA:it_vbak TYPE STANDARD TABLE OF ty_vbak,
         it_likp TYPE STANDARD TABLE OF ty_likp,
         it_vbrp TYPE STANDARD TABLE OF ty_vbrp.
    DATA:wa_vbak TYPE ty_vbak,
         wa_likp TYPE ty_likp,
         wa_vbrp TYPE ty_vbrp.
    ***** take reference document no & delivery no. *****
    LOOP AT xvbrp.
      wa_vbrp-vgbel = xvbrp-vgbel.
      wa_vbrp-vgpos = xvbrp-vgpos.
      wa_vbrp-aubel = xvbrp-aubel.
      wa_vbrp-aupos = xvbrp-aupos.
      APPEND wa_vbrp TO it_vbrp.
    ENDLOOP.
    IF it_vbrp IS NOT INITIAL.
    SELECT vbeln audat FROM vbak
          INTO TABLE it_vbak
          FOR ALL ENTRIES IN it_vbrp
          WHERE vbeln = it_vbrp-aubel.
    SELECT vbeln lfdat from likp
           INTO TABLE it_likp
           FOR ALL ENTRIES IN it_vbrp
           WHERE vbeln = it_vbrp-vgbel.
    ENDIF.
    **** check for invoice date with order date *****
    LOOP AT it_vbak INTO wa_vbak.
      IF xvbrk-fkdat IS NOT INITIAL AND xvbrk-fkdat < wa_vbak-audat.
        MESSAGE 'Invoice Date is less than Order Date' TYPE 'E'.
      ENDIF.
    ENDLOOP.
    **** check for invoice date with delievery date *****
    LOOP AT it_likp INTO wa_likp.
      IF xvbrk-fkdat IS NOT INITIAL AND xvbrk-fkdat < wa_likp-lfdat.
        MESSAGE 'Invoice Date is less than Delivery Date' TYPE 'E'.
      ENDIF.
    ENDLOOP.
    ENDFORM.                    "USEREXIT_PRICING_PREPARE_TKOMP
    Thanks & Regards,
    Anagha Deshmukh

    Hello,
    These are the user exits for the tcode.
    J_3RSINV            Export sales
    SDVFX007            User exit: Billing plan during transfer to Accounting
    SDVFX008            User exit: Processing of transfer structures SD-FI
    SDVFX009            Billing doc. processing KIDONO (payment reference number)
    SDVFX010            User exit item table for the customer lines
    SDVFX011            Userexit for the komkcv- and kompcv-structures
    V05I0001            User exits for billing index
    V05N0001            User Exits for Printing Billing Docs. using POR Procedure
    V60A0001            Customer functions in the billing document
    V60P0001            Data provision for additional fields for display in lists
    V61A0001            Customer enhancement: Pricing
    Keep the break point and try in the debugging in each and every exit and see which user exit is triggred.

  • User exit for incoming invoice - MIRO/MB60

    Hi,
    Can anybody suggest me the user exit to set the payment block during the creation of incoming invoice document through MIRO(With PO reference) / FB60 (With out PO reference).
    Kindly dont run the program and send the list of the exists.
    Thanks
    Suri

    HI Suresh,
      Just execute this report and enter input value as FB60 then it will display alll the user exits related to this  t-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.
    Hope this helps you. reply for queries.
    Regards,
    Kumar.

  • User exits for tcodes CJR2, CJR8, CJ40, and CJ42

    Hi,
    I have a requirement to capture confirmed (saved/posted) cost and revenue plans for a particular WBS in any of the above tcodes executed by the user.  Is there any user exit/badi/or bapi for such?
    Appreciate any feedback on this.
    Regards,
    jacky

    Hi,
    Check whether you can use SAPLBPFC (CJ40, CJ42).
    Regards
    Sreekanth

  • User Exit for validating overall limit field and expected limit field-ME2xN

    Dear Gurus,
    Can you please suggest me any user exit or BAdi to validate the overall limit field and expected limit field in transaction ME2xN.
    Or any other way to to achieve this functionality in ME2xN.
    Our Requirement is while raising a service PO in the Limits tab the 'Overall limit' should be same as 'Expected Value', at present the user can enter overall limit greater than 'Expected Value'.
    Regards,
    Priyank Joshi

    this will not work. you cannot add another structure (AUFK) on top of CEBAN. all characteristics have to be of one structure and since you want to release a PR it has to be CEBAN. before attempting to program something around that why do you not go to tx. OLME -> PR -> Release Strategy -> With Classfication -> Release Strategie and run it in a simulation mode. you will then see how it reacts.
    there's a white-paper on service.sap.com explaning in detail release-strategies. it's a good one and a good read too!

  • User exit for "on Hold" in MIRO

    Hello Friends
    I need to pop up a screen or u can say add a screen which should reflect only if the user clicks at "Hold" button while doing MIRO, the screen should include one list box and a set of radio buttons and ok code button. I made the screen but how to call at "Hold" I am unable to gather. Please help.
    Thanks

    Found a BADI to implement it

  • User exit to check PO company code and MIRO company code

    HI,
    when user entering an invoice in a company code different than what is on the PO.  Currently, the system will let them key the invoice and it will automatically intercompany it to the correct company. 
    I want to Implement FI validation so that the system provides a warning when you post to FI MIRO.  In the FI validation, use the user exit to get the PO company code and do a compare of the company code from the PO to the input field on the invoice and if not the same provide screen popup warning .
    Using OBBH Create validation rule in user exit  for input invoice and process MIRO associated company codes
    Plese provide me correct user exit.
    I tried BAdI INVOICE_UPDATE, but it didnt work.
    Thank You,
    Archana

    Check Badi implementation MRM_HEADER_DEFAULT
    Regards
    Vinod

  • Duplicate invoice check ( MIRO)

    Hi All
    I have done all the settings for duplicate invoice check. And I posted an invoice with the following parameters on a limit PO
    Company code:ABC
    Document date:12.09.2009
    Reference:INV1
    Currency:USD
    Vendor:102221
    Amount:20
    Now I am trying to post another invoice
    Company code:ABC
    Document date:12.09.2009
    Reference:INV1
    Currency:USD
    Vendor:102221
    Amount:100
    Now I am getting duplicate check invoice Error, even though I changed the amount in the second invoice. If I change the reference no or doc date, then system is differentiating it as different invoice and it is not throwing any error. If I just change the amount, then , it is throwing duplicate invoice error. How to fix this problem.
    Thanks in advance for looking into this

    Double invoice check for a vendor is possible for:
    1. Company Code
    2. Invoice Date
    3. Referece document
    If in config all of these are selected, and if you enter 2 invoices with all same values for above parameters, then system will throw an error.
    Amount is not checked for this.

  • User Exit for Purchase Order Line Items.

    I have been trying to search for a User Exit for Purchase Order Line Items and have been unable to do find anything.  I need to overwrite the Net Price and Pricing Condition on a certain type of material based upon the Pricing Condition for that Line Item which is on the Sales Document.  Any direction you can point me into would be greatly appreciated.  Thanks.

    Thanks for pointing me in the right direction.  I was able to create my first BADI using the PROCESS_ITEM method.  The following link was also very helpful: Re: BADI ME_PROCESS_PO_CUST Method:PROCESS_ITEM

  • Add duplicate check on MIRO and MIR7 by modfying a user exit

    Hi ABAP / SAP Gurus,
    Good day!
    For transaction code MIRO and MIR7, I need to add a check if there are invoice with the same details of VENDOR, CURRENCY, DOCUMENT DATE and AMOUNT on table RBKP. And If there are same invoice, a warning message should be issued.
    I have modified an include program (ZXM08U14) in FM EXIT_SAPLMRME_003. Unfortunately, the warning message is being triggered after the "SAVE" button is clicked.  In other words, the "Warning Message” might be considered as something useless since the document will still be created without the user being informed of the "duplicate".
    I need the duplicate check's warning message to be triggered even before the "SAVE" button is clicked.
    In this light, i have some questions:
    <b>(1) For MIRO, where can I put the duplicate check that will trigger a warning message (if a duplicate has been found) even bofore clicking the save button?  Kindly give the User Exit / Program.
    (2) For MIR7, where can I put the duplicate check that will trigger a warning message (if a duplicate has been found) even bofore clicking the save button?  Kindly give the User Exit / Program.
    (3) Can I use BADI for the said functionality? If yes, kindly provide a simple instruction on how to proceed.</b>
    Thanks in advance!
    And don't worry, I will give appropriate points for helpful answers.

    Hi,
    Check the following Exits and BADI for both MIRO and MIR7:
    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 doc
    LMR1M005        Logistics Inv. Verification: Release Parked Doc. for Postin
    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
    Business Add-in
    INVOICE_UPDATE   Business Add-In: Logistics Invoice Verification
    reward if useful
    regards,
    Anji

  • Regarding user exit for FB60 Duplicate invoices

    hi experts,
    I want to fnd out how to check  Duplicate invoices in fb60 and disallows posting.
    Any kind soul can help?
    Thnaq.

    Transaction Code - FB60                     Enter Incoming Invoices
    Exit Name           Description
    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)
    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
    No of Exits:         14
    USER EXIT
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sapgenie.com/abap/code/abap26.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    http://www.easymarketplace.de/userexit.php
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sappoint.com/abap/userexit.pdfUser-Exit
    http://www.sap-img.com/ab038.htm
    http://help.sap.com/saphelp_46c/helpdata/en/64/72369adc56d11195100060b03c6b76/frameset.htm
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci982756,00.html
    Rewards if useful.........
    Minal

  • User Exits for Invoice creation ,cancellation and sales return

    Hi Gurus,
    Pl help me it's very urgent.
    I did not find any user exit invoice creation so i wrote the following code in include program
    MV60AF0B_BELEG_SICHERN.
    This code is to update the Z*table while saving invoice ,cancellation and sales return.
    The code modification is like below
          FORM BELEG_SICHERN                                            *
          Buchen Fakturabelege                                          *
    FORM BELEG_SICHERN.
      READ TABLE XVBRK INDEX 1.
      IF SY-SUBRC NE 0.
        CALL FUNCTION 'DEQUEUE_ALL'.
        MESSAGE S032.
        EXIT.
      ENDIF.
      IF SAMH_MOD = ON.
        EXPORT XKOMFK TO MEMORY ID 'SDBILLDL'.
      ENDIF.
      DATA: CALC_TYPE.
      IF REBATE_DETERMINED = 'Y'.
        CALC_TYPE = 'A'.
      ELSE.
        CALC_TYPE = 'I'.
      ENDIF.
    *{   INSERT         RD1K903017                                        1
    Work Area*********************
    data : wa_xvbrk type VBRKVB.
    data : wa_xvbrp type vbrpvb.
    data : wa_zmigo type zmigo.
    data : wa_vbrp type vbrp.
    Internal table Creation*******
    DATA:  BEGIN OF tab_XVBRP OCCURS 100.
             INCLUDE STRUCTURE VBRPVB.
    DATA:  END OF tab_XVBRP.
    data : begin of tab_vbeln occurs 10,
           vbeln type vbrk-vbeln,
           knumv type vbrk-knumv,
           end of tab_vbeln.
    data : tab_zmigo type table of zmigo.
    data : tab_vbrp type table of vbrp.
    *****Data declaration*************
    data : v_no_of_inv type i.
    data : v_vbeln_no(10) type n.
    data : v_last_inv_no(10) type n.
    data : v_first_inv_no(10) type c.
    data : v_tot_qty type i.
    data : v_frbnr type mkpf-frbnr.
    *******Ranges*********************
    ranges : r_vbeln for vbrk-vbeln.
    *****Populating IT****************
    tab_xvbrp[] = xvbrp[].
    describe table xvbrk lines v_no_of_inv.
    *}   INSERT
      CALL FUNCTION 'RV_INVOICE_DOCUMENT_ADD'
           EXPORTING
                VBSK_I           = VBSK
                WITH_POSTING     = 'A'
                PREISFINDUNGSART = CALC_TYPE
           IMPORTING
                VBSK_E           = VBSK
           TABLES
                XKOMFK           = XKOMFK
                XTHEAD           = XTHEAD
                XVBFS            = XVBFS
                XVBSS            = XVBSS
                XVBRK            = XVBRK
                XVBRP            = XVBRP
                XVBPA            = XVBPA
                XKOMV            = XKOMV.
    *{   INSERT         RD1K903017                                        2
    data : v_count type i,v_fkimg type i .
    data : v_no_of_records(10) type n.
    wa_xvbrk = xvbrk.
    ********Selecting the last rec no from ZMIGO
          select max( sr_no ) from zmigo into v_no_of_records.
    *****If Distribution channel is not ZB*********
    if  wa_xvbrk-vtweg ne 'ZB' and ( wa_xvbrk-fkart = 'ZRIN' or wa_xvbrk-fkart = 'ZRTE' ).
    if v_no_of_inv = 1.              " Process only when there is one invoice
    loop at tab_xvbrp into wa_xvbrp  where (           matnr ne 'CDGSTP0001'       and
                                                       matnr ne 'CD-RW'            and
                                                       matnr ne 'CD-RW65OHS'       and
                                                       matnr ne 'CABLE'            and
                                                       matnr ne 'CD-R'             and
                                                       matnr ne 'CDQ80N4'          and
                                                       matnr ne 'GENERAL'          and
                                                       matnr ne 'NERO'             and
                                                       matnr ne 'OTHERS'           and
                                                       matnr ne 'SPARE PARTS'      and
                                                       matnr ne 'PROMO ITEM'       and
                                                       matnr ne 'PROMO-1'          and
                                                       matnr ne 'PROMO-2'          and
                                                       matnr ne 'PROMO-3'          and
                                                       matnr ne 'PROMO-4'          and
                                                       matnr ne 'PROMO-5'          and
                                                       matnr ne 'PROMO-6'          and
                                                       matnr ne 'PROMO-7'          and
                                                       matnr ne 'PROMO-8'          and
                                                       matnr ne 'PROMO-9'          and
                                                       matnr ne 'PROMO-10' ).
    v_fkimg = wa_xvbrp-fkimg .
    v_fkimg = v_fkimg / 1000.
                do v_fkimg times.
                  v_no_of_records = v_no_of_records + 1.
                  wa_zmigo-sr_no = v_no_of_records.
                  wa_zmigo-po_no = wa_xvbrk-vbeln.
                  wa_zmigo-item_no  = wa_xvbrp-posnr.
                 wa_zmigo-mblnr  = wa_xmkpf-mblnr.
                  wa_zmigo-doc_type = wa_xvbrk-fkart.
                  wa_zmigo-posting_date = wa_xvbrk-fkdat.
                  wa_zmigo-created_on = sy-datum.
                  wa_zmigo-created_time = sy-uzeit.
                 wa_zmigo-bill_lno = v_frbnr.
                  wa_zmigo-material = wa_xvbrp-matnr.
                 wa_zmigo-inv_no = wa_xvbrk-vbeln.
                 wa_zmigo-inv_item_no = wa_xvbrp-posnr.
                  wa_zmigo-plant = wa_xvbrp-werks.
                  wa_zmigo-inv_date = wa_xvbrk-fkdat.
                  wa_zmigo-customer = wa_xvbrk-kunag.
                  wa_zmigo-unit = 1.
                  wa_zmigo-mtype = '601'.
                  insert into zmigo values wa_zmigo.
                enddo.
                clear : wa_zmigo.
    endloop.
    clear : v_count,v_fkimg,wa_zmigo.
    refresh tab_zmigo[].
    clear v_no_of_inv.
    else.                              "When there are Split Invoices
    v_last_inv_no = wa_xvbrk-vbeln.
    v_vbeln_no = v_last_inv_no - v_no_of_inv + 1.
    v_first_inv_no = v_vbeln_no.
    sort tab_xvbrp by vbeln.
    loop at tab_xvbrp into wa_xvbrp  where (           matnr ne 'CDGSTP0001'       and
                                                       matnr ne 'CD-RW'            and
                                                       matnr ne 'CD-RW65OHS'       and
                                                       matnr ne 'CABLE'            and
                                                       matnr ne 'CD-R'             and
                                                       matnr ne 'CDQ80N4'          and
                                                       matnr ne 'GENERAL'          and
                                                       matnr ne 'NERO'             and
                                                       matnr ne 'OTHERS'           and
                                                       matnr ne 'SPARE PARTS'      and
                                                       matnr ne 'PROMO ITEM'       and
                                                       matnr ne 'PROMO-1'          and
                                                       matnr ne 'PROMO-2'          and
                                                       matnr ne 'PROMO-3'          and
                                                       matnr ne 'PROMO-4'          and
                                                       matnr ne 'PROMO-5'          and
                                                       matnr ne 'PROMO-6'          and
                                                       matnr ne 'PROMO-7'          and
                                                       matnr ne 'PROMO-8'          and
                                                       matnr ne 'PROMO-9'          and
                                                       matnr ne 'PROMO-10' ).
    v_fkimg = wa_xvbrp-fkimg .
    v_fkimg = v_fkimg / 1000.
                do v_fkimg times.
                  v_no_of_records = v_no_of_records + 1.
                  wa_zmigo-sr_no = v_no_of_records.
                  wa_zmigo-po_no = v_vbeln_no.                      "wa_vbrp-vbeln.
                  wa_zmigo-item_no  = wa_xvbrp-posnr.
                 wa_zmigo-mblnr  = wa_xmkpf-mblnr.
                  wa_zmigo-doc_type = wa_xvbrk-fkart.
                  wa_zmigo-posting_date = wa_xvbrk-fkdat.
                  wa_zmigo-created_on = sy-datum.
                  wa_zmigo-created_time = sy-uzeit.
                 wa_zmigo-bill_lno = v_frbnr.
                  wa_zmigo-material = wa_xvbrp-matnr.
                 wa_zmigo-inv_no = v_vbeln_no.
                 wa_zmigo-inv_item_no = wa_xvbrp-posnr.
                  wa_zmigo-plant = wa_xvbrp-werks.
                  wa_zmigo-inv_date = wa_xvbrk-fkdat.
                  wa_zmigo-customer = wa_xvbrk-kunag.
                  wa_zmigo-unit = 1.
                  wa_zmigo-mtype = '601'.
                  insert into zmigo values wa_zmigo.
                enddo.
                clear : wa_zmigo.
    at end of vbeln.
    v_vbeln_no = v_vbeln_no + 1.
    endat.
    clear : v_count,v_fkimg,wa_zmigo.
    refresh tab_zmigo[].
    endloop.
    endif.                             "End of first 2nd IF.
    clear : v_no_of_inv, v_vbeln_no.
    endif.
    ****************Sales return************************************
    if  wa_xvbrk-fkart = 'ZRRE' and wa_xvbrk-vtweg ne 'ZB'.
    loop at tab_xvbrp into wa_xvbrp where (            matnr ne 'CDGSTP0001'       and
                                                       matnr ne 'CD-RW'            and
                                                       matnr ne 'CD-RW65OHS'       and
                                                       matnr ne 'CABLE'            and
                                                       matnr ne 'CD-R'             and
                                                       matnr ne 'CDQ80N4'          and
                                                       matnr ne 'GENERAL'          and
                                                       matnr ne 'NERO'             and
                                                       matnr ne 'OTHERS'           and
                                                       matnr ne 'SPARE PARTS'      and
                                                       matnr ne 'PROMO ITEM'       and
                                                       matnr ne 'PROMO-1'          and
                                                       matnr ne 'PROMO-2'          and
                                                       matnr ne 'PROMO-3'          and
                                                       matnr ne 'PROMO-4'          and
                                                       matnr ne 'PROMO-5'          and
                                                       matnr ne 'PROMO-6'          and
                                                       matnr ne 'PROMO-7'          and
                                                       matnr ne 'PROMO-8'          and
                                                       matnr ne 'PROMO-9'          and
                                                       matnr ne 'PROMO-10' ).
             v_fkimg = wa_xvbrp-fkimg.
             v_fkimg = v_fkimg / 1000.
             v_tot_qty = v_tot_qty + v_fkimg.
              do v_fkimg times.
                v_no_of_records = v_no_of_records + 1.
                wa_zmigo-sr_no = v_no_of_records.
                wa_zmigo-po_no = wa_xvbrk-vbeln.
                wa_zmigo-item_no  = wa_xvbrp-posnr.
                wa_zmigo-doc_type = wa_xvbrk-fkart.
                wa_zmigo-posting_date = wa_xvbrk-fkdat.
                wa_zmigo-created_on = sy-datum.
                wa_zmigo-created_time = sy-uzeit.
                wa_zmigo-material = wa_xvbrp-matnr.
               wa_zmigo-inv_no = wa_xvbrk-vbeln.
               wa_zmigo-inv_item_no = wa_xvbrp-posnr.
                wa_zmigo-plant = wa_xvbrp-werks.
                wa_zmigo-inv_date = wa_xvbrk-fkdat.
                wa_zmigo-customer = wa_xvbrk-kunag.
                wa_zmigo-unit = 1.
                wa_zmigo-mtype = '651'.
                condense wa_xvbrk-xblnr.
                wa_zmigo-reference = wa_xvbrk-xblnr.
    ********Bill of lading no**
               select single bill_lno from zmigo_final into v_frbnr where inv_no = wa_xvbrk-xblnr and material = wa_xvbrp-matnr.
               if sy-subrc eq 0.
               wa_zmigo-bill_lno = v_frbnr.
               endif.
                insert into zmigo values wa_zmigo.
              enddo.
              clear : wa_zmigo,wa_xvbrp , v_fkimg, v_frbnr.
    endloop.
    endif.
    *******Invoice Cancellation*****************************
    if  wa_xvbrk-fkart = 'ZRS1' and wa_xvbrk-vtweg ne 'ZB'.
    delete tab_xvbrp[] where shkzg eq 'X'.
    loop at tab_xvbrp into wa_xvbrp where (            matnr ne 'CDGSTP0001'       and
                                                       matnr ne 'CD-RW'            and
                                                       matnr ne 'CD-RW65OHS'       and
                                                       matnr ne 'CABLE'            and
                                                       matnr ne 'CD-R'             and
                                                       matnr ne 'CDQ80N4'          and
                                                       matnr ne 'GENERAL'          and
                                                       matnr ne 'NERO'             and
                                                       matnr ne 'OTHERS'           and
                                                       matnr ne 'SPARE PARTS'      and
                                                       matnr ne 'PROMO ITEM'       and
                                                       matnr ne 'PROMO-1'          and
                                                       matnr ne 'PROMO-2'          and
                                                       matnr ne 'PROMO-3'          and
                                                       matnr ne 'PROMO-4'          and
                                                       matnr ne 'PROMO-5'          and
                                                       matnr ne 'PROMO-6'          and
                                                       matnr ne 'PROMO-7'          and
                                                       matnr ne 'PROMO-8'          and
                                                       matnr ne 'PROMO-9'          and
                                                       matnr ne 'PROMO-10' ).
             v_fkimg = wa_xvbrp-fkimg.
             v_fkimg = v_fkimg / 1000.
             v_tot_qty = v_tot_qty + v_fkimg.
              do v_fkimg times.
                v_no_of_records = v_no_of_records + 1.
                wa_zmigo-sr_no = v_no_of_records.
                wa_zmigo-po_no = wa_xvbrk-vbeln.
                wa_zmigo-item_no  = wa_xvbrp-posnr.
                wa_zmigo-doc_type = wa_xvbrk-fkart.
                wa_zmigo-posting_date = wa_xvbrk-fkdat.
                wa_zmigo-created_on = sy-datum.
                wa_zmigo-created_time = sy-uzeit.
                wa_zmigo-material = wa_xvbrp-matnr.
               wa_zmigo-inv_no = wa_xvbrk-vbeln.
               wa_zmigo-inv_item_no = wa_xvbrp-posnr.
                wa_zmigo-plant = wa_xvbrp-werks.
                wa_zmigo-inv_date = wa_xvbrk-fkdat.
                wa_zmigo-customer = wa_xvbrk-kunag.
                wa_zmigo-unit = 1.
                condense wa_xvbrk-zuonr.
                wa_zmigo-reference = wa_xvbrk-zuonr.
                wa_zmigo-mtype = '602'.
    ********Bill of lading no**
               select single bill_lno from zmigo_final into v_frbnr where inv_no = wa_xvbrk-xblnr and material = wa_xvbrp-matnr.
               if sy-subrc eq 0.
               wa_zmigo-bill_lno = v_frbnr.
               endif.
                insert into zmigo values wa_zmigo.
              enddo.
              clear : wa_zmigo,wa_xvbrp , v_fkimg.
    endloop.
    endif.
    clear : v_no_of_records.
    *}   INSERT
      CALL FUNCTION 'STACK_RESET'.
      R185D-DATALOSS = SPACE.
      FOLGEAUFRUF102 = SPACE.
      PERFORM SETPAR_INIT.
    *{   INSERT         RD1K903017                                        3
    *}   INSERT
      LEAVE.
    ENDFORM.
    This program is working fine for single user but in production where no of people are creating the invoices from different places the data is not getting updated in table ZMIGO.
    sometime populating with wrong data , partial data and sometimes no updation at all.
    I have used the table locking system enqueue and dequeue FM's before n after updation but still the same
    thing is happening.
    What could be the reason.
    Looking for help very urgent any other alternate option.

    Hi,
    Go thru these..
    Enhancement
    SDVFX009 Billing doc. processing KIDONO (payment reference numbe
    SDVFX010 User exit item table for the customer lines
    SDVFX011 Userexit for the komkcv- and kompcv-structures
    V05I0001 User exits for billing index
    V05N0001 User Exits for Printing Billing Docs. using POR Procedu
    V60A0001 Customer functions in the billing document
    V60P0001 Data provision for additional fields for display in lis
    V61A0001 Customer enhancement: Pricing
    SDVFX001 User exit header line in delivery to accounting
    SDVFX002 User exit for A/R line (transfer to accounting)
    SDVFX003 User exit: Cash clearing (transfer to accounting)
    SDVFX004 User exit: G/L line (transfer to accounting)
    SDVFX008 User exit: Processing of transfer structures SD-FI
    SDVFX007 User exit: Billing plan during transfer to Accounting
    SDVFX006 User exit: Tax line (transfer to accounting)
    SDVFX005 User exit: Reserves (transfer to accounting)
    Business Add-in
    SD_CIN_LV60AU02 BADI for billing
    If it is helpful rewards points
    Regards
    Pratap.M

  • Extended Idoc - User exit for delivery VL01 and Invoice VF01

    Hi Experts,
    We are developing Extended Idoc for order - cash cycle.The extended Idoc contains 4 extra fields.
    I want to know the User exits where i can populate the extended segment field values for VL01 and VF01 transactions.

    HI
    exits available for  VL01.
    VMDE0004                                Shipping Interface: Message SDPACK (Packing, Inbound)
    VMDE0003                                Shipping Interface: Message SDPICK (Picking, Inbound)
    VMDE0002                                Shipping Interface: Message PICKSD (Picking, Outbound)
    VMDE0001                                Shipping Interface: Error Handling - Inbound IDoc
    V53W0001                                User exits for creating picking waves
    V53C0002                                W&S: RWE enhancement - shipping material type/time slot
    V53C0001                                Rough workload calculation in time per item
    V50S0001                                User Exits for Delivery Processing
    V50R0004                                Calculation of Stock for POs for Shipping Due Date List
    V50R0002                                Collective processing for delivery creation
    V50R0001                                Collective processing for delivery creation
    V50Q0001                                Delivery Monitor: User Exits for Filling Display Fields
    V50PSTAT                                Delivery: Item Status Calculation
    V02V0004                                User Exit for Staging Area Determination (Item)
    V02V0003                                User exit for gate + matl staging area determination (headr)
    V02V0002                                User exit for storage location determination
    V02V0001                                Sales area determination for stock transport order
    For VF01..
    Enhancement
    V61A0001                                Customer enhancement: Pricing
    V60P0001                                Data provision for additional fields for display in lists
    V60A0001                                Customer functions in the billing document
    V05N0001                                User Exits for Printing Billing Docs. using POR Procedure
    V05I0001                                User exits for billing index
    SDVFX011                                Userexit for the komkcv- and kompcv-structures
    SDVFX010                                User exit item table for the customer lines
    SDVFX009                                Billing doc. processing KIDONO (payment reference number)
    SDVFX008                                User exit: Processing of transfer structures SD-FI
    SDVFX007                                User exit: Billing plan during transfer to Accounting
    SDVFX006                                User exit tax line in transfer to accounting
    SDVFX005                                User exit reserves in transfer to accounting
    SDVFX004                                User exit G/L line in transfer to accounting
    SDVFX003                                User exit cash clearing in transfer to accounting
    SDVFX002                                User exit for A/R line in transfer to accounting
    SDVFX001                                User exit header line in delivery to accounting
    J_3RSINV

  • User exit for manually calculating exchange rate in MIRO

    Dear All,
    i want to change, exchange rate in MIRO transaction.
    for that i have used user exit MRMH0003 (Logistics Invoice Verification: Revaluation/RAP), but unfortunately it doesn’t work.
    so, can you please suggest, the better way to do this.
    thanks and regards,
    Kaushik

    I,
    Please take  a look at  BADI AC_DOCUMENT

Maybe you are looking for

  • How to run .exe files on macbook pro

    Just bought my first macbook pro the other day.  I absolutely love it.  Much better than the windows boxes.  I wanted to run some '.exe' files on my new laptop but was not successful finding anything on the market to use without purchasing a full OS

  • Hyperlinks Transfer to PDF From Publisher 2007??

    My hyperlinks in Publisher 2007 are not transferring to PDF.  I  have done a video to better explain it: http://www.youtube.com/watch?v=4lsB0Pv_XCs. Thank  you for any help you can give.

  • How to create a black and white text clip?

    I'm using pro Cs4 and was wondering how do I create a black and white text clip?  When I used Vegas there was a clip I could put in, and simply write whatever I needed. Still getting used to Pro Cs4 and was wondering if anybody can help me. Thanks!

  • SGE2010 - Autentication Mac with radius(rada) and assign in VLAN.

    Hi all I need to create two VLANs with authentication radius. and through its radius assign VLANs to the client. What is the model SGE2010 can do this thing, because the manual none understandable

  • Phonic Firefly 302 -  No Microphone input

    New firewire audio interface works for MIDI and analog input but not for microphone. Have tried with both iMac Core Duo and Powerbook G4 both w/ OS 10.4.8. The interface seemed like a good deal - $120. Just started shipping. Manufacturers page: http: