Sales return invoice based on delivery

Hi Experts,
i have requirement like this.
ex: i have raised a return sales order(RE) for 10 items and delivery has has done for 7 items(due to some manual problems).here the invoice is based on order,
but here my requirement is invoice is based on return delivery(LR). for 7 items.
when i am doing this transaction invoice is done for 10 items.but i want 7 itemsin invoice.how to do it.
urgent requirement.pls do needful
otherwise pls send solution to [email protected]
thanks&regards
veera.

Hi
Pls enable your copy control in VTFL from return delivery to credit memo (LR to RE) similar to RE to RE Return order to Credit memo in VTAF.
If copy control is maintained, then you can do delivery related return invoice. But it is always suggested to have return order related billing especially in returns.
Reward if this helps you

Similar Messages

  • FI documents during sales return & invoice cancellation

    Dear All,
    We are using two document types RA for sales return & RC for cancellation of Invoice. These documents are getting posted in Domestic Sales account.  We need to track them seperately and posted to two seperate GL A/cs. Do we need to have seperate document types for them apart from normal sales document ? What will be the account assignment to be done to have these postings done to new gl accounts ?
    Regards,
    Sadashivan

    Hi Kesh,
    The document type is common for sales as well as sales return.  Further, we are creating a new GL account for Sales Return now.  At present Sales and Sales return are commonly posted in domestic sale account. I wish to clarify that as the sales are captured through account assignment VKOA - ERL, the sales return has to be assigned through OBYC - VAX.  Is it correct ?  Like wise for cancellation of invoice is there any account assignment so that whenever the invoice is cancelled automatically posted to new gl account - "sales invoices cancelled "? That is instead of debiting sales we will be debiting sales invoice cancelled a/c credit customer a/c.
    Regards,
    Sadashivan

  • Synch of invoice based on delivery (without Delivery doc)

    I've created in SBO Invoice based on Order (without Delivery document). Such Invoice act like delivery document and make stock postings. Why my order after synchronization doesn't change status to <i>send</i>? I've checked SHIPMENT table and there is no such document like my invoice.

    Hello John,
    I think the most simple way is to create a delivery first in SBO. After you have created all your deliveries you can use the Document Genaration Wizard to create all your invoices. After that you can use the option Document Printing to print all the invoices.
    This way you only have to enter all the information once and the information (delivery) will be synchronized with Webtools.
    Tim

  • Cannot creat Invoice based on Delivery

    G'day folks,
    I have never seen this error before, but I have a Delivery that was copied to (or from) a Sales Order for the remaining balance of items on the Sales Order.  When trying to copy this seemingly correct Delivery to an Invoice, I receive the following error:
    This document cannot be added because the base document row was updated.  Copy the document again from its base document.
    To my knowledge, no modifications were made to the Sales Order or any of the two subsequent Deliveries so hopefully someone else has encountered and solved this issue in the past.
    Thank you all for your time.
    Best regards,
    Pat Heaphy

    Hi,
    Check the following Note :
    [1148344|https://websmp130.sap-ag.de/sap(bD1odSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1148344]
    [1268393|https://websmp130.sap-ag.de/sap(bD1odSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1268393]
    Regards,
    Jitin
    SAP Business One Forum Team

  • PGR error in sales return delivery in MTO scenario

    Hello all,
    I am working on sales return scenario and creating delivery against the sales return order VL01N. Return sales order is created against the delivery which is created against the MTO sales order.
    So I am getting an error in VLO1N at the time of PGR that sales order stock does not exist.
    Kindly help.
    Mimiri

    Hi
    Remove the requirement type from the sales order OVerview in the Procurement tab.
    in IMG---Define Procedure For Each Schedule Line Category
    remove the check boxes for your returns schedule line category DN
    regards
    Prashanth

  • Sales return tax procedure

    Respected ones,
    while creating a sales return order based on the billing document date , if the sales return is within six months we need to capture net value + tax and after six months we need to capture only the net value . How do go about this.
    I read in the forums and they asked to wiite a routine for this.
    what would be the logic behind this.

    thanks..........not received any reply from forums

  • Split sales return document line items by price

    Hi,
      I need to dynamically split line items in a sales return document based on certain conditions. The added line items would have the same material and details of the first line item but would be different only on return price.
    I tried to add lines to xvbap in USEREXIT_MOVE_FIELD_TO_VBEP(in MV45AFZZ. Note that xvbap is not populated at userexit_move_field_to_vbap)but this approach does not produce the desired results. I have also tried it at userexit_save_document_prepare and at userexit_check_vbap but it's not possible to modify xvbap correctly in these exits.
    Do you know of a way to handle this?
    Regards,
    Aravind

    Hi Aravind ,
    first thing is Clear and refresh XVBAP table and add ur own data , i think in this case XVBAP will take the new data.
    Regards
    Prabhu

  • How do you add Serial Number in Sales AR Invoice

    How do we add Serial Numbers in AR Invoice.What is the query. Can anybody guide me with the procedure.

    Sanjay,
    The sql sample I have given is to demonstrate the use of functions and not the exact SQL to be used for your requirement. BP Contacts is not relevant for you.
    Serial numbers by default print on a seperate sheet along with the Invoice if your business process is Sales Order > Invoice (without the delivery step)
    If you process involved the delivery step, then the serial number will be printed on a seperate sheet along with the delivery.
    The $\[$ is SAP's syntax to dynamically use Form values in your queries. 
    To understand the usage of this you need to completely understand about formatted seaches.
    I was suggesting the usage of functions so that when you add the Invoice, the function would go to the OSRI and SRI1 tables and go in a loop to gather all the Serial number and add them to the User field which can be later printed on the PLD.
    Suda

  • Sales Return Process-Invoice(Credit Memo) with ref. to delivery

    Dear All,
    I am doing sales return process.
    Sales Order-RE
    Delivery-LR
    Invoice-RE,
    with ref. to sales order it is allowing me to create invoice.
    But,with ref. to delivery it is not allowing.
    It is giving "The document is not relevant for billing".
    I have changed item category  REN for delivery (A) related billing.
    Also changed req. copy control setting.
    Can anybody guide on this issue.
    Best Regards
    Sainath

    Hello,
    Normally return credit memo will be generated with reference to the retrun order, and that is the standard SAP process. Do you have any specific requirements to have the credit memo with reference to a retrun delivery?
    The Item category REN Billing Relevence will be B as per SAP standard, if you wish to have a delivery related credit RE, the make this to A .
    Maintain the Delivery to Billing Copying control in VTFL for LR --> RE, add the item categroy REN.
    Maintain the copying requirements for header as 3 Header Del Rel and for item as 4 Deliv-Related item .
    Once these setting are done, then check whether the RE billing type is triggering from LR?
    Prase

  • Creating an invoice based on a delivery via DI API

    Hi,
    Each time a user creates a delivery (not always based on a sales order), the add on I have developed creates an invoice based on it. This happens without any issue in most cases but I am receiving the following two errors on the client site and have not been able to recreate the issue here...
    One of the base documents has already been closed  [INV1.BaseEntry][line: 1]
    Number of items drawn is greater than open quantity  , 'Item A'
    Does anyone have any idea what could be causing this?
    Thans for any help,
    Robin

    Hi Thomas,
    Thanks for teh reply but unfortunately this is not the case - for example...
    A delivery which is returning this error for Item A, has a quantity of 20 but has 7400 in stock, so it is not going into a negative quantity.
    The only way I could get this error ("Number of items drawn is greater than open quantity"), not using the add on but working within B1, was to create a delivery note, then create an invoice based on it, increase the quantity of the item on the invoice, and the error displays in B1 on the info bar at the bottom.
    I cannot see how the user can affect this, as when they are creating the Delivery, the Invoice creation is automatic (triggers on the add button after the Delivery has been successfully added), and they don't even see the Invoice form.
    Robin

  • Creation of A/R Down Payment Invoice  based on Sales Order not logical

    When creating a A/R Down Payment Invoice based on a Sales Order you
    have the option to create multible ones. Which by itself could be
    usefull to create one of 50 % for a certain day and decide they need to
    pay another 25 % at a later date.
    But SBO does not track what already have been posted. Therefore you can
    create a sum more then a 100% without warning or blockage.
    Tested this in SBO 2007 A SP:00 PL:00
    Scenario:
    Sales - AR>Sales Order
    Create and post a Sales Order
    Sales - AR>A/R Down Payment Invoice
    Create an A/R Down Payment
    Select the BP and copy the Sales Order
    Set DPM to 40%
    Post the A/R Down Payment
    Sales - AR>A/R Down Payment Invoice
    Create an A/R Down Payment
    Select the BP and copy the Sales Order
    Set DPM to 100%
    Post the A/R Down Payment
    Sales - AR>A/R Down Payment Invoice
    Create an A/R Down Payment
    Select the BP and copy the Sales Order
    Set DPM to 70%
    Post the A/R Down Payment
    Making the total for the Sales Order 210% worth of Down Payment
    Invoices without warning/blocking. I would expected that you would only
    be able to set the rest sum %. For instance first scenario I entered
    60% therefore setting the second Down Payment Invoice to a max of 40%
    Untill you have used up the 100% and you cannot select the Sales Order
    in question..
    If multible users do the same work, SBO doesn't show that it has
    already been done. Same if you forgot you already created it you can
    still create one. Plus sometimes it will happenyou create the Down
    Payment Invoice and not paying attention you create the first one with
    a 100% and later with the intended percentage..

    Hello Petronella,
    you are right that B1 is not checking the total value of DP created from the Sales Order.
    The logic and checking procedure here is only between Sales Order -> Delivery/Invoice.
    DP Invoice is considered as transaction related to document the receipt of the money (parallel to the sales process). Between the moment of basing of DP to Sales Order it is still possibility to adjust Sales Order as there is no posting behind Sales Order.
    The question is what would be a checking  procedure in case that on Sales Order there is based Delivery and DP? What would be the system priority to take into a consideration?
    Regards,
    Martin Slavik
    Regional Solution Manager

  • Can we create Return Sales Order with Ref to Delivery

    Dear Friends,
    Can we create a Return sales order (RE) with reference to Delivery (LF)?
    If yes,how?
    If not,why?
    Regards,
    Shrikant

    Hi there,
    As per the standard process we donot refer RE with LF. 1 reason may be coz for returns order, we need to copy pricing either from OR or F2. Coz in LF pricing is not copied from OR. If you check the copy control from OR to LF in VTLA, at item level, you will not have any control for pricing type.
    In most of the cases we refer returns to F2 sothat it will be easy to raise a credit memo to refund the customer. This is also because not all items in the order are delivered & invoiced (in partial delivery scenarios when all items are not confirmed)
    Regards,
    Sivanand

  • Returns PO based on Return sales order - schedule line problem

    Hi,
    We're designing a return to vendors process as the opposite of a purchasing process through a plant. So normally the process is:
    Customer places order
    We buy from the vendor (PO based on sales order)
    Goods arrive at the plant
    We deliver from plant
    The opposite process is:
    Customer wants to return
    We create return delivery
    Goods arrive at the plant (GR)
    We sent the goods to the vendor (return PO based on sales order)
    This all works, but in the second scenario the sales order gets two schedule lines instead of one. So the system confirms based on the planned delivery time instead of just based on the required delivery time. Since this is a returns process, it doesn't make any sense as we're shipping to the vendor at our convenience once the goods arrive.
    Any ideas how to resolve this? Schedule line settings have been changed to all different versions. Basically the relevant customizing is:
    item category - returns item set
    schedule line category - movement type 653, order type NB, item category 0, acct assignment category M
    Many thanks

    There are a few other places to check, but you probably have exhausted those areas.  You can turn of the availability check at the item category also especially if it is specifically for the return order.
    Sales and Distribution => Basic Functions => Availability Check and Transfer of Requirements => Availability Check => Availability check with ATP Logic => Determine Procedure for each delivery item category
    I have also run into issues with APO active and having unintended consequences on the order.  Another avenue to check if there are any customer specific code in a requirements routine or user exit.
    Jeff

  • Sales return - Excise invoice from depot

    Dear all,
    We are having a sales return scenario in depot which we are executing in following way.
    1) Return sales order 2) Delivery against sales order 3) PGR 4) Credit memo 5) Capture of excise invoice in J1IG against the material document posted in PGR with reference to original excise invoice.
    But when we are again creating an outgoing excises invoice from depot i.e. re-selling the same material to other customer system does not show the excise invoice in list of inward invoice.
    Request to please let us know if we have missed out on a step/ configuration to ensure that the customer return excise invoice is visible to re-sell the material from depot.
    thanks & regards,
    mahesh

    Dear  Lakshmipathi,
    Thanks for the reply, did go through the thread that you have suggested before i posted this one.
    Just wanted to know that we update the register with material document number posted for transfer of material from one storage location to another which is customer return to finished storage location and not with the PGR material document number?
    5 Create Transfer posting in MB1B with movement type 453, storage location 0005 and save
    6 Note down the material document reference
    7 Go to J1IG to reverse excise issue posting
    thanks and regards,
    mahesh.

  • 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

Maybe you are looking for

  • Error "Could not open [filename]...Please upgrade your plug-ins

    A collegue send us an CS4 InDesign file and when I opened, it says this: Error "Could not open [filename]. Please upgrade your plug-ins to their latest versions or upgrade to the latest of Adobe InDesign." Any suggestion? I also have CS4 installed.

  • Macbook pro water damege...

    Water damage on my mbp. Dried it the best i could. When the chargers in the orange light comes on and just stays orange and when i press the power button the sleep light flickers a little... Is it fully broken or what? Im not sure how to find out wha

  • Every link I click on is opening in a new window, and everytime I start typing a letter into the navigation toolbar, it shows up as a capital even though caps l

    Out of the blue, just a few minutes ago, every time I click on a link, it opens in a new window. It is very frustrating and annoying, and I don't know why this is happening. Also, when I start to type in the navigation bar, the first letter shows up

  • G60, DVD won't run

    Hello. I have a new G 60 with Windows 7. When I popped in my Netflix DVD, the program runs, loads, then spits my DVD back out. What's up with that? Thanks!

  • La fonction Exit

    Bonjour, J'ai trouvé un exemple dans l'environnement de Labview, voici la copie d'écran. Comment pourra-t-on réaliser un set-up et lorqu'on valide sur le bouton "Exit" on quittera l'application?   Résolu ! Accéder à la solution. Pièces jointes : Par