Disable Deletion in Delivery Document

Hi All,
I want to prevent Delivery Document to be Deleted by User, how can I disable the Delete Option in Delivery Document? At the moment I cannot create a Transaction Variant for it
Any help will be appreciated

Dear Imran
Ask your basis team to access TCode PFCG, input all the required datas and execute.  Once they input the required datas and proceeding further at one stage, against each transaction code, you can see a tab with Activities with numeric value 01, 02, 03 etc.,
Here you have to untick 02 for VL02N for that particular user.
thanks
G. Lakshmipathi

Similar Messages

  • Unable to delete Replensihment Delivery document

    Dear All,
    The user has created a Replenishment delivery against a Stock Transfer PO with only one line item. Then due to unavailabilty of proper batch as per selection criteria the user deleted the whole line item and saved the delivery.
    Now the issue is there is an entry in LIKP table showing the line item with quantity and batch whereas when we open the delivery in VL02N or VL03N  there is no line item.  Also if we look into the packing tab we can see the material, batch etc.
    Due to this the user is unable to do PGI, or cancel the document. When the user tries to cancel there is a message shown as document is cancelled but it is not getting cancelled. The Super-user has got the authorisation of deleting the delivery and even he is not able to delete it.
    Has anyone come across such situation? Please guide.
    Thanks & Regards,
    Karthik.

    Hi All,
    We took the help of SAP by raising the OSS. The entry in LIPS was deleted from the table and subsequently we were able to delete the Outbound delivery.
    Regards,
    Karthik

  • Delete delivery document, use: BAPI_OUTB_DELIVERY_CHANGE

    hi friends,
    I want to delete a delivery document. I think BAPI_OUTB_DELIVERY_CHANGE will be useful for my purpose but I cannot find any field indicating the operation type like 'U'pdate, 'D'elete etc.
    is it the right bapi function or should i use a different one?
    thanks,
    - ferudun

    I have tried this way but nothing has happened. The return table was containing a row with error E VL 302 and empty message texts. (Delevery document doesn't exist)
        header_control-dlv_del = 'X'.
        CALL FUNCTION 'BAPI_OUTB_DELIVERY_CHANGE'
          EXPORTING
            HEADER_DATA              = header_data
            HEADER_CONTROL       = header_control
            DELIVERY                      = delivery_no
          TABLES
            RETURN                        = return.
    I see the delivery document from VL03 tcode.
    what is wrong? what data should i supply?
    thanks,
    - ferudun
    Message was edited by:
            Ferudun ATAKAN

  • Deleted outbound delivery doc displayed in document flow

    Hello,
    Deleted outbound delivery document is still displayed in document flow and its status is 'Archived'
    I don't know why deleted document  is seen and moreover I haven't ever seen such a status in document flow. For your reference, the delivery document is displayed in only VF02 or VF03 with its billing document, which is also cancelled. One more thing, its sales order is also deleted.
    Thanks for your kind response in advance.

    Hi,
    This is happening because invoice can only be cancelled and not deleted. While sales order and delivery can be deleted. So if you check the document flow of the cancelled invoice it will show the delivery number but with status as archived. If you try to display such documents you will get an error message 'Delivery xxx does not exist'.
    If you delete a sales order and delivery which does not have an invoice this will not happen.
    Regards,
    Sajith.

  • Authorization Control for Delivery Document Deletion

    Hi experts,
    I know there's way to control the deletion of Sales Document through V_VBAK_AAT and V_VBAK_VKO.
    However, how can I control the deletion of Delivery Document (in t-code VL02N)?
    Thanks in advance.
    Chin

    Hi,
    if you can't find a standard authorization object using standard tools such as SU24 and ST01 then there is a BADI LE_SHP_DELIVERY_PROC with method CHANGE_FCODE_ATTRIBUTES. This method is called whenever screen is displayed and can be used to exclude menu items e.g. Delete Delivery. So you can create a custom authorization object which will be used to control access to delete function.
    Cheers

  • Delete inbound delivery against PO after goods recipt

    Hi Gurus,
    I have a question regarding the link of Purchase Order and Inbound delivery status indicator.
    This is my scenario. I had created a purhase order with qty 10, I have received GR using MIGo for 4 qty.
    After one month I have created inbound delivery  for the reaining qty 6 against the same PO.
    When I am trying to delete this delivery document system throughing the error message "cannot delete inbound delivery as the status of the document is partially completed".
    why system linked the delivery document with previuos goods reciept?
    how can I delete the inbound delivery?
    please suggest
    Thanks.
    Sreeram

    Sreeram,
    From the PO, get the confirmation control key value from confirmation tab and go to SE16 on table T163G with this value. My guess is field WEREL for confirmation category LA has a value of "X". If this is the case, that explains the behavior as you described in your posting. When the inbound delivery is created, the program will update the quantity reduced field in the confirmation tab of PO by GR quantity (4 in your example). With this update, you can no longer delete the inbound delivery.
    So to delete the inbound delivery, you will need to cancel the GR. Once the GR is cancelled, you should be able to delete the inbound delivery. Once the inbound delivery is deleted, you can re-post the GR so you stock data can be restored to its original value.
    Revi

  • How to view archieved delivery documents

    Hi Team,
    Actually my requirement is to see the archived delivery document in the system.
    Kindly help me.
    Actually one user has deleted the delivery by mistake.
    the client wants to know who has deleted that delivery document.
    Thanks in advance,
    Kishore.

    Refer following links:
    Retrieve the Archived Document.
    Archive documents
    Thanks & Regards
    JP

  • Warning 'sales document is not yet complete' with BAPI_SALESORDER_CHANGE after deleting correspnding delivery

    Hi,
    I'm trying to change a sales order (add some positions) after deleting the corresponding delivery to it.
    But I get the warning "sales document is not yet complete: Edit Data", because of incomplete dates in schedule lines.
    The schedule lines are filled correctly.
    When I have a Sales Order without corresponding delivery, this Order could be changed successful with BAPI BAPI_SALESORDER_CHANGE.
    But if there is a Sales Order with corresponding Delivery (where I do delete the delivery first with BAPI BAPI_OUTB_DELIVERY_CHANGE ), than the BAPI for changing the Order gives a warning "sales document is not yet complete: Edit Data".
    This is confusing.
    Is there something I have to consider when changing a sales order after deleting its delivery?
    Coding:
    "1. delete delivery to sales order
    CLEAR ls_header_data.
       CLEAR ls_header_ctrl.
       ls_header_data-deliv_numb = iv_vbeln.
       ls_header_ctrl-deliv_numb = iv_vbeln.
       ls_header_ctrl-dlv_del    = abap_true. "set flag for deletion
    * call BAPI to delete delivery
       CALL FUNCTION 'BAPI_OUTB_DELIVERY_CHANGE'
         EXPORTING
           header_data    = ls_header_data
           header_control = ls_header_ctrl
           delivery       = iv_vbeln
         TABLES
           return         = et_msg.
    IF ...
    COMMIT WORK AND WAIT.
    ELSE.
    ENDIF.
    "2. change Sales order (adding new item positions)
    "add new/changed data
       LOOP AT IT_NEW_ITEMS ASSIGNING <ls_new_items>.
         CLEAR: ls_order_item_in,
                ls_order_item_inx,
                ls_schedule_line,
                ls_schedule_linex.
         add 10 to lv_posnr.
         ls_order_item_in-itm_number = lv_posnr. "posNr
         ls_order_item_in-material = <ls_new_items>-matnr. "material
         ls_order_item_in-target_qty = <ls_new_items>-menge.  "quantity
         ls_order_item_in-sales_unit = <ls_new_items>-MEINH. "sales unit
         APPEND ls_order_item_in TO lt_order_item_in.
         "fill order item check table
         ls_order_item_inx-itm_number = lv_posnr.
         ls_order_item_inx-updateflag = 'I'.
         ls_order_item_inx-material   = abap_true.
         ls_order_item_inx-target_qty = abap_true.
         ls_order_item_inx-sales_unit = abap_true.
         APPEND ls_order_item_inx TO lt_order_item_inx.
         "schedule lines
         ls_schedule_line-itm_number   = lv_posnr. "posnr
         ls_schedule_line-sched_line   = '1'.
         ls_schedule_line-req_qty      = ls_order_item_in-target_qty. "quantity
         ls_schedule_line-req_date      = lv_lfdate.               "schedule line date
         APPEND ls_schedule_line TO lt_schedule_line.
         "schedule lines check table
         ls_schedule_linex-itm_number   = lv_posnr. "posnr
         ls_schedule_linex-sched_line   = '1'.
         ls_schedule_linex-req_qty      = abap_true. "quantity
         ls_schedule_linex-req_date      = abap_true.               "schedule line date
         ls_schedule_linex-UPDATEFLAG  = 'I'.
         APPEND ls_schedule_linex TO lt_schedule_linex.
       ENDLOOP.
       "call bapi to add items to sales order
       CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
         EXPORTING
           SALESDOCUMENT    = iv_sales_order
           ORDER_HEADER_INX = ls_order_header_inx
         TABLES
           RETURN           = et_msg
           ORDER_ITEM_IN    = lt_order_item_in
           ORDER_ITEM_INX   = lt_order_item_inx
           SCHEDULE_LINES   = lt_schedule_line
           SCHEDULE_LINESX  = lt_schedule_linex.
    IF....
    COMMIT WORK AND WAIT.
    ELSE.
    ENDIF.

    The first thing I would try is to use fm BAPI_TRANSACTION_COMMIT (with parameter WAIT = 'X') instead of COMMIT WORK AND WAIT which is directly put in your code (this is almost the same but not exactly).
    Then make sure that if your code performs two BAPI calls one after the other, they are separated with either a call to fm BAPI_TRANSACTION_COMMIT or BAPI_TRANSACTION_ROLLBACK.
    Then - if the above is applied and still does not help - I would suspect that some invalid / incomplete data is passed to fm BAPI_SALESORDER_CHANGE.
    regards

  • Document Flow for deleted |outbound delivery

    Hi All,
    I am facing with a very urgent issue. I hope somebody will be able to help.
    Scenario:
    I have a sales order. I have created outbound delivery with no picking and PGI done. By mistake one of the end user have deleted the outbound delivery. Now i want to find the sales order number of the deleted delivery. I have the deleted outbound delivery number.
    Is there any way, I can look at the document flow or data in any table regarding this deleted delivery number?
    This is an urgent issue. Please help

    Hi
    Once the delivery is deleted the references you are looking for a cleared
    (LIPS-VGBEL, VGPOS) go with the deletion and the document flow link in VBFA
    is also deleted. As mentioned the record of the deletion and what happened to the delivery
    should still be available in VL22 as mentioned.
    When a sales document is relevant for delivery it is written to table VEPVG.
    So when you deleted the delivery the entry for the affected sales order would have been
    restored to the delivery due index. You will find it in there but no where else now at this
    stage.
    I hope this helps
    Kind regards
    Brian

  • Can the deleted delivery document make live

    Dear Friends,
    Pl tell me how to make the deleted delivery document live.
    Case:  User has deleted the delivery doucument after doing the excise invoice (of STO).  Now they cannot cancel the exice invoice.
    Regds,
    Sreehari

    Hi ,
    If this a prforma invoice you can goto vf02 then billing docs and complete the invoive the invoice aotumatically cancel.
    If u r problem has solve reward points.
    VM

  • Deleting delivery document

    Hi guys,
    In production system the end user has canceled the invoice and then he tried to reverse the PGI but the system is showing some error   Cancellation date 05.05.2007 is before the goods issue date 30.05.2007. the thing is by mistake he mentioned the goods movement date as 30.05.2007. Now how can i cancel the PGI .kindly give some inputs regarding this.
    thanks in advance
    Sitaramaraju.P

    In order to delete the delivery doc,
    1. Invoice cancellation :VF11, this can be done if accounting document is not  generated. If  accounting document is generated already then first reverse accounting doc (FI settings are required for this) then Invoice cancellation should be done.
    2. Reverse PGI : VL09 ,i,e picking =0
    3. Delete sales orders.
    Hope it clarifies ur query.
    Please Reward Points.

  • Deleted Delivery documents

    Hi gurus,
    How can I find "deleted" delivery documents from SAP?
    Regards,
    Prassee

    What to put if the document is sales order or billing doc in Change doc object field
    Change doc. object LIEFERUNG
    and one more whether to put doc no. in Object value field or document no. field as stated by u . Object value Enter your delivery Nr here if Avaialable
    you will get the all the deleted deliveries and details such as who has deleted ,when. etc.
    Once delete one delivery and enter in Object Value field you will get the record.
    and check what you are getting in Appl.Obj Change???
    If that field is unique then you can get the deleted delivery documents.or check other field which is unique to deleted delivery doc and you will get the required list
    Regards
    Jitesh
    Regards
    Jitesh

  • Report of cancelled Delivery Document, Billing Document & Shipment Document

    Hi,
    How can I get list of cancelled Delivery Document, Billing Document & Shipment Document.
    Regards,
    VK

    Hi,
    Good Day,
    Cancelled Delivery will available in Table CDPOS
    Pass below parameter
    OBJECTCLAS    LIEFERUNG              
    OBJECTID       Delivery Number
    TABNAME       LIKP                   
    CHNGIND       D                      
    Cancelled Invoice available in Table VBRK Pass Below Parameter
    FKSTO = 'X'
    Shipment Document Once you delete i don't thinks will get the details.
    May we can use Userexist and maintain customized table to track the deleted shipment number.
    Best Regards,
    KSK

  • How 2 creat report for displaying the details of a Delivery Document using

    how to create report for displaying the details of a Delivery Document using the tables LIKP, LIPS
    thank you
    regards,
    jagrut bharatkumar shukla
    points will be rewarded

    HI
    I AM GIVING YOU MY DELIVERY DOCUMENT CODE...MODIFY IT ACCORDING TO YOUR REQUIREMENT
    *& Report  ZDELIVERY                                *
    report  zdelivery  message-id z9bhu          .
    types: begin of t_likp,
               vbeln type likp-vbeln,      "Delivery
               erdat type likp-erdat,      "Date for rec creation
    *           LFDAT TYPE LIKP-LFDAT,      "Delevery Date
    *           WAERK TYPE LIKP-WAERK,      "Currency
               kunnr type likp-kunnr,      "Ship-To Party
               kunag type likp-kunag,      "Sold-to party
               traty type likp-traty,      "Means-of-Transport
           end of t_likp.
    types: begin of t_lips,
               vbeln type lips-vbeln,      "Delivery
               posnr type lips-posnr,      "Delivery item
               matnr type lips-matnr,      "Material Number
               arktx type lips-arktx,      "Short Text for Sales Order Item
               lfimg type lips-lfimg,      "Actual quantity delivered
               netpr type lips-netpr,
    *           MEINS TYPE LIPS-MEINS,      "Base Unit of Measure
               vgbel type lips-vgbel,      "Doc no of the reference document
            end of t_lips.
    types: begin of t_vbpa,
               vbeln type vbpa-vbeln,      "SD DocumenT Number
               posnr type vbpa-posnr,      "Item number
               parvw type vbpa-parvw,      "Partner function
               kunnrb type vbpa-kunnr,      "Customer Number 1
           end of t_vbpa.
    types: begin of t_kna1,
               kunnr type kna1-kunnr,      "Customer Number 1
               name1 type kna1-name1,      "Name 1
               ort01 type kna1-ort01,      "City
               adrnr type kna1-adrnr,      "Address
           end of t_kna1.
    types: begin of t_li_vbpa,
               vbeln type likp-vbeln,      "Delivery
               erdat type likp-erdat,      "Date for rec creation
    *           LFDAT TYPE LIKP-LFDAT,      "Delevery Date
    *           WAERK TYPE LIKP-WAERK,      "Currency
               kunnr type likp-kunnr,      "Ship-To Party
               kunag type likp-kunag,      "Sold-to party
               traty type likp-traty,      "Means-of-Transport
               vbeln1 type lips-vbeln,      "Delivery
               posnr type lips-posnr,      "Delivery item
               matnr type lips-matnr,      "Material Number
               arktx type lips-arktx,      "Short Text for Sales Order Item
               lfimg type lips-lfimg,      "Actual quantity delivered
               netpr type lips-netpr,      "Net Price
    *           MEINS TYPE LIPS-MEINS,      "Base Unit of Measure
               vgbel type lips-vgbel,      "Doc no of the reference document
               vbeln3 type vbpa-vbeln,     "SD DocumenT Number
               parvw type vbpa-parvw,      "Partner function
               kunnrb type vbpa-kunnr,      "Customer Number 1
           end of t_li_vbpa.
    types: begin of t_final,
               vbeln type likp-vbeln,      "Delivery
               erdat type likp-erdat,      "Date for rec creation
               kunnr type likp-kunnr,      "Ship-To Party
               kunag type likp-kunag,      "Sold-to party
               traty type likp-traty,      "Means-of-Transport
               vbeln1 type lips-vbeln,      "Delivery
               posnr type lips-posnr,      "Delivery item
               matnr type lips-matnr,      "Material Number
               arktx type lips-arktx,      "Short Text for Sales Order Item
               lfimg type lips-lfimg,      "Actual quantity delivered
               netpr type lips-netpr,      "Net Price
               vgbel type lips-vgbel,      "Doc no of the reference document
               vbeln3 type vbpa-vbeln,     "SD DocumenT Number
               parvw type vbpa-parvw,      "Partner function
               kunnrb type vbpa-kunnr,     "Customer Number 1
               name1 type kna1-name1,      "Name 1
               ort01 type kna1-ort01,      "City
               adrnr1 type kna1-adrnr,     "Address
               name2 type kna1-name1,      "Name 1
               ort02 type kna1-ort01,      "City
               adrnr2 type kna1-adrnr,     "Address
               name3 type kna1-name1,      "Name 1
               ort03 type kna1-ort01,      "City
               adrnr3 type kna1-adrnr,     "Address
           end of t_final.
    *            D A T A  D E C L A R A T I O N
    *&*********Internal Table Declaration****************&*
    data: it_likp type standard table of t_likp.
    data: it_lips type standard table of t_lips.
    data: it_vbpa type standard table of t_vbpa.
    data: it_kna1 type standard table of t_kna1.
    data: it_li_vbpa type standard table of t_li_vbpa.
    data: it_li_vbpa_temp type standard table of t_li_vbpa.
    data: it_final type standard table of t_final.
    *&*********Work Area Declaration********************&*
    data: wa_likp type t_likp.
    data: wa_lips type t_lips.
    data: wa_vbpa type t_vbpa.
    data: wa_kna1 type t_kna1.
    data: wa_li_vbpa type t_li_vbpa.
    data: wa_li_vbpa_temp type t_li_vbpa.
    data: wa_final type t_final.
    *&*********Data Declaration************************&*
    data: d_vbeln type likp-vbeln.
    data: flag type i value 0.
    *           S E L E C T I O N  S C R E E N   D E C L A R A T I O N
    selection-screen begin of block block2 with frame title text-001.
    select-options: s_vbeln for d_vbeln obligatory.    "Delivery no
    selection-screen end of block block2.
    *            A T  S E L E C T I O N - S C R E E N   E V E N T S
    *AT SELECTION-SCREEN.
    *PERFORM VALIDATE_DATA.
    *            S T A R T   O F  S E L E C T I O N     E V E N T S
    start-of-selection.
    perform fetch_data.
    perform merge_data_kna1.
    *INCLUDE Z9BT_SH_***4_FORMS.
    call function 'OPEN_FORM'
    exporting
    *   APPLICATION                       = 'TX'
    *   ARCHIVE_INDEX                     =
    *   ARCHIVE_PARAMS                    =
        device                            = 'PRINTER'
    *   DIALOG                            = 'X'
    *   FORM                              = ' '
       language                          = sy-langu
    *   OPTIONS                           =
    *   MAIL_SENDER                       =
    *   MAIL_RECIPIENT                    =
    *   MAIL_APPL_OBJECT                  =
    *   RAW_DATA_INTERFACE                = '*'
    *   SPONUMIV                          =
    * IMPORTING
    *   LANGUAGE                          =
    *   NEW_ARCHIVE_PARAMS                =
    *   RESULT                            =
    exceptions
       canceled                          = 1
       device                            = 2
       form                              = 3
       options                           = 4
       unclosed                          = 5
       mail_options                      = 6
       archive_error                     = 7
       invalid_fax_number                = 8
       more_params_needed_in_batch       = 9
       spool_error                       = 10
       codepage                          = 11
       others                            = 12
    if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    sort it_final by vbeln.
    loop at it_final into wa_final.
    call function 'START_FORM'
    exporting
    *   ARCHIVE_INDEX          =
       form                   = 'Z9BT_DELIVERY'
       language               = sy-langu
    *   STARTPAGE              = ' '
    *   PROGRAM                = ' '
    *   MAIL_APPL_OBJECT       =
    * IMPORTING
    *   LANGUAGE               =
    exceptions
       form                   = 1
       format                 = 2
       unended                = 3
       unopened               = 4
       unused                 = 5
       spool_error            = 6
       codepage               = 7
       others                 = 8
    if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    call function 'WRITE_FORM'
    exporting
       element                        = 'ITEM_LIST'
       function                       = 'SET'
       type                           = 'BODY'
       window                         = 'MAIN'
    * IMPORTING
    *   PENDING_LINES                  =
    * EXCEPTIONS
    *   ELEMENT                        = 1
    *   FUNCTION                       = 2
    *   TYPE                           = 3
    *   UNOPENED                       = 4
    *   UNSTARTED                      = 5
    *   WINDOW                         = 6
    *   BAD_PAGEFORMAT_FOR_PRINT       = 7
    *   SPOOL_ERROR                    = 8
    *   CODEPAGE                       = 9
    *   OTHERS                         = 10
    if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    call function 'END_FORM'
    * IMPORTING
    *   RESULT                         =
    exceptions
       unopened                       = 1
       bad_pageformat_for_print       = 2
       spool_error                    = 3
       codepage                       = 4
       others                         = 5
    if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    endloop.
    call function 'CLOSE_FORM'
    * IMPORTING
    *   RESULT                         =
    *   RDI_RESULT                     =
    * TABLES
    *   OTFDATA                        =
    exceptions
       unopened                       = 1
       bad_pageformat_for_print       = 2
       send_error                     = 3
       spool_error                    = 4
       codepage                       = 5
       others                         = 6
    if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    *&      Form  VALIDATE_DATA
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form validate_data .
    select single vbeln into wa_likp-vbeln
                        from likp where vbeln in s_vbeln.
    append wa_likp to it_likp.
    if sy-subrc <> 0.
    flag = 1.
    endif.
    endform.                    " VALIDATE_DATA
    *&      Form  FETCH_DATA
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form fetch_data .
    select a~vbeln
           a~erdat
           a~kunnr
           a~kunag
           a~traty
           b~vbeln
           b~posnr
           b~matnr
           b~arktx
           b~lfimg
           b~netpr
           b~vgbel
           c~vbeln
           c~parvw
           c~kunnr
             into table it_li_vbpa
                    from likp as a
                    left outer join lips as b on a~vbeln = b~vbeln
                    inner join vbpa as c on b~vgbel = c~vbeln
                    where a~vbeln in s_vbeln and
                    c~parvw = 'RE'.
    endform.                    " FETCH_DATA
    *&      Form  MERGE_DATA_KNA1
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form merge_data_kna1 .
    if it_li_vbpa[] is not initial.
    it_li_vbpa_temp[] = it_li_vbpa[].
    sort it_li_vbpa_temp by kunnr.
    delete adjacent duplicates from it_li_vbpa_temp comparing kunnr.
    loop at it_li_vbpa into wa_li_vbpa.
    read table it_li_vbpa_temp into wa_li_vbpa_temp with key kunnr =
    wa_li_vbpa-kunag.
    if sy-subrc <> 0.
    wa_li_vbpa_temp = wa_li_vbpa.
    append wa_li_vbpa_temp to it_li_vbpa_temp.
    endif.
    read table it_li_vbpa_temp into wa_li_vbpa_temp with key kunnr =
    wa_li_vbpa-kunnrb.
    if sy-subrc <> 0.
    wa_li_vbpa_temp = wa_li_vbpa.
    append wa_li_vbpa_temp to it_li_vbpa_temp.
    endif.
    endloop.
    endif.
    if it_li_vbpa_temp[] is not initial.
    select  kunnr
            name1
            ort01
            adrnr into table it_kna1 from kna1
                        for all entries in it_li_vbpa_temp
                        where kunnr = it_li_vbpa_temp-kunnr.
    endif.
    loop at it_li_vbpa into wa_li_vbpa .
    wa_final-vbeln = wa_li_vbpa-vbeln.
    wa_final-erdat = wa_li_vbpa-erdat.
    *it_final-LFART = it_li_vbpa-LFART.
    wa_final-kunnr = wa_li_vbpa-kunnr.
    wa_final-kunag = wa_li_vbpa-kunag.
    *it_final-VSTEL = it_li_vbpa-VSTEL.
    wa_final-traty = wa_li_vbpa-traty.
    wa_final-vbeln1 = wa_li_vbpa-vbeln.
    wa_final-posnr = wa_li_vbpa-posnr.
    wa_final-matnr = wa_li_vbpa-matnr.
    wa_final-arktx = wa_li_vbpa-arktx.
    wa_final-lfimg = wa_li_vbpa-lfimg.
    wa_final-netpr = wa_li_vbpa-netpr.
    *wa_final-GEWEI = it_li_vbpa-GEWEI.
    *it_final-VOLUM = it_li_vbpa-VOLUM.
    *it_final-VOLEH = it_li_vbpa-VOLEH.
    wa_final-vgbel = wa_li_vbpa-vgbel.
    wa_final-vbeln3 = wa_li_vbpa-vbeln.
    *wa_final-PARVW = wa_li_vbpa-PARVW.
    wa_final-kunnrb = wa_li_vbpa-kunnrb.
    read table it_kna1 into wa_kna1 with key kunnr = wa_li_vbpa-kunnr.
    if sy-subrc = 0.
    wa_final-name1 = wa_kna1-name1.
    wa_final-ort01 = wa_kna1-ort01.
    wa_final-adrnr1 = wa_kna1-adrnr.
    endif.
    read table it_kna1 into wa_kna1 with key kunnr = wa_li_vbpa-kunag.
    if sy-subrc = 0.
    wa_final-name2 = wa_kna1-name1.
    wa_final-ort02 = wa_kna1-ort01.
    wa_final-adrnr2 = wa_kna1-adrnr.
    endif.
    read table it_kna1 into wa_kna1 with key kunnr = wa_li_vbpa-kunnrb.
    if sy-subrc = 0.
    wa_final-name3 = wa_kna1-name1.
    wa_final-ort03 = wa_kna1-ort01.
    wa_final-adrnr3 = wa_kna1-adrnr.
    endif.
    append wa_final to it_final.
    clear wa_final.
    endloop.
    endform.

  • Delivery document archieved

    For a stock transfer invoice, dellivery document cancelled without cancelling the excise invoice. Is there any solution to prevent from cancelling the delivery document without cancelling the excise invoice

    Hi,
    I think you can still cancel the excise document.
    However, if you need a check here, you need to put the same through a user exit at Delivery change/delete level. Take help of an ABAPer for the same. 
    Regards,
    Peeyoosh.

Maybe you are looking for

  • Quicktime update fixes arrange

    when expanding the arrange the playhead didn't stay at the same place. i was working and in the meantime updating quicktime, after the restart the problem that is around since logic 8 is fixed. now the playhead stays where it belongs. great!!

  • IChat status change not seen by other users

    Hi ! I have inherited a small network I have a Aple Intel Xserve running 10.6.6 which all users are connected to This has the iChat service set and running All my users are running systems with 10.6.8 When some users change their status in iChat, thi

  • Creating a new monitor profile

    Does anyone know how to Create a new monitor profile...Running Windows 7 with Elemnts 9 and I cant find a Adobe Gamma Wizard on my PC.

  • Audio Encoding

    Okay, I have read some of the explanations and know it will take a while to have this happen, but wondered if I should try something else. I am currently trying to burn a 55 min video and I am slowly going through the "Encoding Audio" stage. I starte

  • Click to play not turning off

    So i've set plugins.click to play to both false and true, restarting firefox each time. It still blocks everything. I had a similar problem with the last update as well, and couldn't find an add-on that would help. To be fair i'm not getting the anno