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

Similar Messages

  • 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.

  • Create delivery document using bapi_deliveryprocessing_exec

    Can any one send me the sample code to create delivery document using BAPI_DELIVERYPROCESSING_EXEC BAPI.

    Hi,
    Use the fm:     'SHP_VL10_DELIVERY_CREATE_PARA' for creatting the delivery.
    The below code creates the delivery document:
    *& Report  ZSTATUS
    REPORT  zstatus.
    DATA: t_vbak LIKE vbak   OCCURS 0 WITH HEADER LINE.
    DATA: t_vbap LIKE vbapvb OCCURS 0 WITH HEADER LINE.
    DATA: t_vbep LIKE vbepvb OCCURS 0 WITH HEADER LINE.
    DATA: t_vbkd LIKE vbkdvb OCCURS 0 WITH HEADER LINE.
    DATA: t_vbpa LIKE vbpavb OCCURS 0 WITH HEADER LINE.
    DATA: t_vbuk LIKE vbukvb OCCURS 0 WITH HEADER LINE.
    DATA: t_vbup LIKE vbupvb OCCURS 0 WITH HEADER LINE.
    DATA: t_vbfa LIKE vbfavb OCCURS 0 WITH HEADER LINE.
    DATA: c_vbfa LIKE vbfavb OCCURS 0 WITH HEADER LINE.
    DATA: ls_sd_keys     TYPE sales_key.
    DATA : key      TYPE shp_sales_key_t,
           sd_order TYPE shp_vl10_sd_order.
    p_vbeln(sales doc no) = '5000006100'.
      AT END OF vbeln.
        REFRESH: t_vbak, t_vbap,
                 t_vbep, t_vbkd,
                 t_vbpa, t_vbuk,
                 t_vbup.
        CLEAR : t_vbak, t_vbap,
                t_vbep, t_vbkd,
                t_vbpa, t_vbuk,
                t_vbup.
        REFRESH: key.
        ls_sd_keys-vbeln = p_vbeln.
        APPEND ls_sd_keys TO key.
        CLEAR:ls_sd_keys.
        CLEAR: sd_order.
        CALL FUNCTION 'SHP_GET_SD_DATA'
          EXPORTING
            it_vbak_key = key
          CHANGING
            cx_sd_order = sd_order.
        APPEND LINES OF sd_order-vbak TO t_vbak.
        APPEND LINES OF sd_order-vbap TO t_vbap.
        APPEND LINES OF sd_order-vbep TO t_vbep.
        APPEND LINES OF sd_order-vbuk TO t_vbuk.
        APPEND LINES OF sd_order-vbup TO t_vbup.
        APPEND LINES OF sd_order-vbkd TO t_vbkd.
        APPEND LINES OF sd_order-vbpa TO t_vbpa.
        APPEND LINES OF sd_order-vbfa TO c_vbfa.
        LOOP AT c_vbfa WHERE vbtyp_n = 'J'.
          MOVE c_vbfa TO t_vbfa.
          APPEND t_vbfa.
          CLEAR t_vbfa.
        ENDLOOP.
        CLEAR: sd_order.
        CLEAR: key.
        CALL FUNCTION 'SHP_VL10_DELIVERY_CREATE_PARA'
          EXPORTING
            if_ledat              = sy-datum
            if_nur_vorgabe_pos    = ' '
          TABLES
            it_vbak               = t_vbak
            it_vbap               = t_vbap
            it_vbep               = t_vbep
            it_vbuk               = t_vbuk
            it_vbup               = t_vbup
            it_vbkd               = t_vbkd
            it_vbpa               = t_vbpa
           it_vbfa               = t_vbfa
          EXCEPTIONS
            system_failure        = 1
            communication_failure = 2
            RESOURCE_FAILURE      = 3
            OTHERS                = 4.
        IF sy-subrc = 0.
       WRITE:/ 'delivery completed'.
        ENDIF.
      ENDAT.
    If it is helpful rewards points.
    Regards
    Pratap.M

  • 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

  • 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

  • DELETE Delivery with BAPI BAPI_OUTB_DELIVERY_CHANGE

    Hi all
    i try delete delivery with the bapi BAPI_OUTB_DELIVERY_CHANGE, but isn't don't.
    i don't know why, what's wrong
      loop at gt_likp assigning <gs_likp>.
        gf_delivery = <gs_likp>-vbeln.
        gs_header_data-deliv_numb = <gs_likp>-vbeln.
        gs_header_control-deliv_numb = <gs_likp>-vbeln.
        gs_header_control-dlv_del = 'X'.
        call function 'BAPI_OUTB_DELIVERY_CHANGE'
          exporting
            header_data                   = gs_header_data
            header_control                = gs_header_control
            delivery                      = gf_delivery
    *       TECHN_CONTROL                 =
    *       HEADER_DATA_SPL               =
    *       HEADER_CONTROL_SPL            =
    *       SENDER_SYSTEM                 =
          tables
    *       HEADER_PARTNER                =
    *       HEADER_PARTNER_ADDR           =
    *       HEADER_DEADLINES              =
    *       ITEM_DATA                     =
    *       ITEM_CONTROL                  =
    *       ITEM_SERIAL_NO                =
    *       SUPPLIER_CONS_DATA            =
    *       EXTENSION1                    =
    *       EXTENSION2                    =
            return                        = gt_bapiret2
    *       TOKENREFERENCE                =
    *       ITEM_DATA_SPL                 =
    *       COLLECTIVE_CHANGE_ITEMS       =
    thx

    Hi,
    1) Use BAPI_TRANSACTION_COMMIT after Bapi.
    2) Check whether any subsequent documents has been created against the delivery (Refer to VBFA table).
    Regards
    Vinod

  • Not able to delete line items using BAPI_OUTB_DELIVERY_CHANGE

    Hi,
        Not able to delete line items of a delivery using BAPI 'BAPI_OUTB_DELIVERY_CHANGE', with thte below code and even return parameter has zero messages.
    I have even checked existing below posting.
    https://www.sdn.sap.com/irj/scn/logon?redirect=http%3a%2f%2fforums.sdn.sap.com%2fthread.jspa%3fthreadid%3d782509
    Below is the code that i am using.........
    *wa1-deliv_numb = wa_lips-vbeln.
    wa1-deliv_item = wa_lips-posnr.
    APPEND wa1 to item_data.
    wa-deliv_numb = vbeln_so .
    wa-deliv_item = l_item.
    wa-del_item = 'X'.
    APPEND wa TO item_control.
    w_header_data-deliv_numb = vbeln_so .
    w_header_control-deliv_numb = vbeln_so .
    w_delivery = vbeln_so .
    *w_header_control-dlv_del = 'X'. "Delete whole Delivery
    CALL FUNCTION 'BAPI_OUTB_DELIVERY_CHANGE'
      EXPORTING
        header_data    = w_header_data
        header_control = w_header_control
        delivery       = w_delivery
      TABLES
       item_data      = item_data
        item_control   = item_control
        return         = return.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait = 'X'.
    I have even  tried uncommenting item_data parameter but not able to delete line item.....i am able to delete whole delivery but not line items .........can any one of u help me in resolving this issiue plz ???
    Regards,
    M, Manohar

    Kindly use WS_DELIVERY_UPDATE to delete the items
    Sample code:
    L_VBKOK-VBELN_VL = vbeln_so.
    clear l_vbpok.
             refresh l_vbpok.
             l_vbpok-vbeln_vl = vbeln_so
             l_vbpok-posnr_vl = wa_deliv_item.
             l_vbpok-lips_del = c_x.
             append l_vbpok.
             set update task local.
             call function 'WS_DELIVERY_UPDATE'
               exporting
                 vbkok_wa = l_vbkok
                 commit   = ' '
                 delivery = lv_delivery
               tables
                 vbpok_tab = l_vbpok
               exceptions
                 others   = 0.
             commit work and wait.

  • Add new delivery item using BAPI_OUTB_DELIVERY_CHANGE

    Hi expert,
    I'll want to add a new item into existing delivery using BAPI_OUTB_DELIVERY_CHANGE;
    Unfortunatelly I can't do it becouse the BAPI returns a strange message error (class VL, number 216)
    I use the BAPI in the following way:
    it_new_item-deliv_numb
    it_new_item-deliv_item
    it_new_item-material
    it_new_item-dlv_qty
    it_new_item-fact_unit_nom
    it_new_item-fact_unit_denom
    item_control-deliv_numb
    item_control-deliv_item
    item_control-chg_delqty
    What alse do I have to do?
    Many thanks
    Roberta

    Hi,
    I have used this way:
    Loop at it_vbrp.
    CLEAR: wa_hdata, wa_hcont, d_delivy, it_bapiret2.
         wa_hdata-deliv_numb = it_vbrp-vgbel.
         wa_hcont-deliv_numb = it_vbrp-vgbel.
         wa_hcont-dlv_del    = c_x.
         d_delivy            = it_vbrp-vgbel.
    *---Deleting delivery doc (VL02)
         CALL FUNCTION 'BAPI_OUTB_DELIVERY_CHANGE'
           EXPORTING
             header_data    = wa_hdata
             header_control = wa_hcont
             delivery       = d_delivy
           TABLES
             return         = it_bapiret2.
    *---commit
           CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
             EXPORTING
               wait = 'X'.
    Endloop.
    Thanks,
    Krishna

  • During cancellation of delivery document using VL09

    Hi,
    I want to cancel only 3 items out of 5 items from the delivery document at the time of cancellation by using VL09..
    How can i do that??
    Rgds,
    Pavan.

    No. Not other way out. The method suggested above is the best possible method.
    As PGI is done for whole Delivery Document, Cancel / reverse of PGI is also done for the whole Delivery Document. You cannot cancel / Reverse partial Line items in Delivery.
    Hope this clarifies,
    Thanks,
    Jignesh Mehta

  • Problem when updating delivery quantity using 'BAPI_OUTB_DELIVERY_CHANGE'

    Hi experts,
    I have a requirement in which i need to update the material's delivery quantity in VL03N transaction.   For this im trying the BAPI
    'BAPI_OUTB_DELIVERY_CHANGE' and im passing the following values.
    HEADER_DATA : Delivery no.
    DELIVER : Delivery no.
    ITEM_DATA : Delivery no,
    item no,
    DLV_QTY quantity(changed),
    FACT_UNIT_NOM ( default to value '1')
    FACT_UNIT_DENOM ( default to value '1')
    ITEM_CONTROL : Delivey no,
    item no,
    CHG_DELQTY ( value "X")
    Then i use 'BAPI_TRANSACTION_COMMIT' for updating the changes. 
    Here the problem is, the BAPI is working fine for some quantity , say if i enter the DLV_QTY as 2 in ITEM_DATA, it is gettting updated.  But if i pass some other quantity , say 12, it is returning the folowing error.
    T ID                   NUM MESSAGE
    E VL                   363
    Pls tell why this error comes. and how to successfully update the delivery quantity for a set of material?
    Regards,
    Shanthi

    not answered

  • 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.

  • Delivery document creation using vl01n

    Hi,
    I want to create a delivery document using VL01n.i need to create the doc for a particular selected item if there are many items for the order.i want to delete the remaining documents.
    how to handle this in BDC.

    just mention along with order ...
    from item
    as well as
    to item fields ....

  • Error E/VL/280 (Required field in interface to delivery update missing &1 &2 &3 &4) using BAPI_OUTB_DELIVERY_CHANGE

    Hi,
    I am trying to change delivery quantity using BAPI_OUTB_DELIVERY_CHANGE. When I tested the BAPI by giving values in the parameters
    HEADER_DATA, DELIVERY, ITEM_DATA and ITEM_CONTROL it is working fine.
    However when I use the same BAPI in program and when I am trying to test it I am receiving error 'E/VL/280' (
    Required field in interface to delivery update missing &1 &2 &3 &4).
    Request to please help me out on how to resolve.
    Much Appreciated.

    Hi Nagarjuna,
    Can you please check the program in debugging  mode, &1 &2 &3 &4 are the place holders specifies some information. Might be missing some information while changing delivery document.
    Check the place holders in debugging mode.
    Thanks,
    Ashok.

  • BAPI to change delivery document data

    Hi,
    I want to update the fields lifex, empst, in delivery document using any BAPI, can any one suggest me is there any standard BAPI to update this. Kindly suggest .
    Regards,
    Venkat

    Hi
    Try this BAPI 'BAPI_OUTB_DELIVERY_CHANGE' or 'BAPI_STOREORDER_CHANGE'
    Thanks
    Vasudha

  • Find ref.doc.of a deleted delivery

    Hello Experts,
    I would like to ask how can I find the reference documents of an already deleted delivery?
    I mean how can I find for ex.the sales order document number which was related to an already deleted delivery?
    I would like to mention that I know the deleted delivery number & I want to know for ex.with which sales order number was related at the flow before deletion.
    If you could please be so kind and inform me also about the relevant tables & fields which gives this information.
    Great thanks in advance.!!!
    Kind Regards
    George

    Hi,
    As far as my knowledge goes, you will not be able to find out the sales order number by using a deleted delivery document number. The reason is, when you delete the delivery, the reference will be deleted from VBFA table which stores the details of document flow. As there is no reference maintained, you will not be able to retrive the data.
    However, you can try to get the sales order number if you know
    a. Customer PO number for which the sales order is created (VA02 / 03)
    b. Sold to party + Material combination (VA05)
    Hope this helps.
    Thanks
    Mukund S

Maybe you are looking for

  • Import java.*; question

    Hi, My understanding of the import keyword is somewhat similar to includes in C/C++ but the "*" is somewhat confusing. Is it not a wildcard meaning to 'include' all that is necessary in the subcategories? For example, I quite often see import java.aw

  • Leo insists on sharing all of my files

    I have my music shared across the network here at home. For some reason Leo has the root of every drive shared with full read/write access. They arent listed in the Shared Folders list, but they are shared... How can i share just one folder as read-o

  • Adobe Media Player downloads videos then deletes them??

    I'd like to note that Adobe Media Player continues to maintain that video files are downloaded for offline viewing. However, the application then 'deletes' those files from the cache at some time in the future, usually an hour or so after downloading

  • Pl help me to create User DN for ADS

    Hi, i'm pretty new to ADS/LDAP. i wanted to know how can do i create UserDN. this information i have server name:tkfsdcdvad1 Domain name:dev-mizro-sc active directory:dev-mizro-sc.net user name: onwards Password: welcome and my user names are created

  • To join tables

    Good Morning Everyone, I would like to know difference : UNION JOIN WHERE( Table.PK = Table. FK table.ID IN (select TABLE._ID from TABLE If you have a chance, please share for us. Thanks in advance, NY Edited by: New Yorker on Jul 20, 2010 6:44 AM