PGI using BAPI_OUTB_DELIVERY_CHANGE

Can I use BAPI_OUTB_DELIVERY_CHANGE for PGI?

Yean Nean,
To perform PGI, this code is very simple and works for me:
DATA:    I_VBELN LIKE LIKP-VBELN,   
         I_VBKOK LIKE VBKOK,   
         I_PROTT LIKE PROTT OCCURS 0 WITH HEADER LINE.
L_VBKOK-VBELN_VL = L_VBELN.   <- Delivery number
L_VBKOK-WABUC    = 'X'.       <- Automatic PGI
* Perform Pick and PGI
CALL FUNCTION 'WS_DELIVERY_UPDATE'         
  EXPORTING           
     VBKOK_WA                 = I_VBKOK           
     SYNCHRON                 = 'X'           
     NO_MESSAGES_UPDATE       = ' '           
     UPDATE_PICKING           = 'X'           
     COMMIT                   = ' '              
     DELIVERY                 = I_VBELN                  
     NICHT_SPERREN            = 'X'
     IF_ERROR_MESSAGES_SEND_0 = 'X'      
  TABLES           
     PROT               = I_PROTT      
  EXCEPTIONS
     ERROR_MESSAGE      = 1           
     OTHERS             = 2. 
IF SY-SUBRC <> 0.
* Or I_PROTT has type E errors in it
  ROLLBACK WORK.
ELSE.
  COMMIT WORK AND WAIT.
ENDIF.

Similar Messages

  • Batch splitting for Outbound delivery using BAPI_OUTB_DELIVERY_CHANGE

    Hi all,
    Let me explain the scenario first.
    We are going to create a delivery in SAP with some line items and send it to a non-sap third party WMS.  They will pick the goods and send the delivery confirmation back to SAP.  In SAP we need to delivery confirmation and PGI.
    The problem is when the third Part WMS does a batch split for a particular line item, we need to update the same in SAP and then do the PGI.  For this I was trying to use BAPI_OUTB_DELIVERY_CHANGE to create split batches.  It is splitting the batches but the overall pick status is becoming B (Partially picked).  SO it is not allowing to do the PGI.
    Can anyone solve my problem

    Hi Bala,
    make sure you are setting...
    itemdata-dlv_qty
    itemdata-dlv_qty_imunit
    itemdata-fact_unit_nom     e.g = 1.
    itemdata-fact_unit_denom  e.g = 1.
    Rgds
    Glenn

  • How to change the storage location using BAPI_OUTB_DELIVERY_CHANGE

    Hi !
    I want to do batch split in the delivery using BAPI_OUTB_DELIVERY_CHANGE.
    Can anyone tell me how to pass/change the storage location of each batch item.
    Is there any other BAPI that can do the batch split and populate the storage location also for the split batches?
    Regards,
    Firoz.

    Hi all,
    BAPI_OUTB_DELIVERY_CHANGE  can be used to do batch split and updating storage loaction against each item of an outbond delivey.
    I have done that in the folllowing way:
    1 > Firstly i have updated the storage location for each delivery item using 'BAPI_OUTB_DELIVERY_CHANGE' passing some mininal parameters.
       Fetch the item details from LIPS table based on the outbound delivery and pass the corresponding fields to item_data, item_control  and item_data_spl parameters and passed into intenal table li_lips.
    Loop at li_lips inti lw_lips.
        lw_item_data-deliv_numb           = lw_lips-vbeln.
        lw_item_data-deliv_item             = lw_lips-posnr.
        lw_item_data-material                = lw_lips-matnr.
        lw_item_data-fact_unit_nom      = lw_lips-umvkz.
        lw_item_data-fact_unit_denom  = lw_lips-umvkn.
        lw_item_data-base_uom            = lw_lips-meins.
        lw_item_data-sales_unit            = lw_lips-vrkme.
        lw_item_control-deliv_numb      = lw_lips-vbeln.
        lw_item_control-deliv_item        = lw_lips-posnr.
        lw_item_data_spl-deliv_numb   = lw_lips-vbeln.
        lw_item_data_spl-deliv_item     = lw_lips-posnr.
        lw_item_data_spl-pick_denial   = 'X'.
        lw_item_data_spl-stge_loc       = v_lgort.
    "(This would be your Storage Location which you want to be updated)
    Appending work areas into internal table to pass as parameter
        APPEND lw_item_data_lgort     TO li_item_data_lgort .
    Appending work areas into internal table to pass as parameter
        APPEND lw_item_control_lgort  TO li_item_control_lgort.
    Appending work areas into internal table to pass as parameter
        APPEND lw_item_data_spl_lgort TO li_item_data_spl_lgort.
    endloop.
    Passing the delivery no in the work area of header data
      lw_header_data-deliv_numb           = v_delivery_no.
      lw_header_control-deliv_numb       = v_delivery_no.
      lw_header_tech_control-upd_ind   = 'U'.
    Calling BAPI to change the Storage location
      CALL FUNCTION 'BAPI_OUTB_DELIVERY_CHANGE'
        EXPORTING
          header_data       = lw_header_data
          header_control   = lw_header_control
          delivery               = v_delivery_no
          techn_control     = lw_header_tech_control
        TABLES
          item_data           = li_item_data
          item_control       = li_item_control
          return                 = li_return_change
          item_data_spl    = li_item_data_spl.
    Calling BAPI to committ the task
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' .
    2> Then i have used the same BAPI again 'BAPI_OUTB_DELIVERY_CHANGE' to do the batch split/update batch only(if required) and change the Actual Delivered Quantity.
    Here you have to pass the same thing along with actual delivery qauntity and different batches to do batch split.
    Here it is assumed that Batch numbers, actual delivered quantity are coming from an internal table i_lqua.
    Looping through Internal table to get Bin details
      LOOP AT i_lqua INTO w_lqua .
    Clearing work area before use
        CLEAR : lw_item_data, lw_lips, lw_item_control, lw_item_data_spl.
    Reading table comparing metrial number
        READ TABLE li_lips INTO lw_lips
        WITH KEY matnr = w_lqua-matnr BINARY SEARCH.
    If read is successful, passing values from table
        IF sy-subrc EQ 0.
    Passing the delivery details into Item level table
          lw_item_data-deliv_numb              = lw_lips-vbeln.
          lw_item_data-deliv_item                = lw_lips-posnr.
          lw_item_data-material                   = lw_lips-matnr.
          lw_item_data-batch                       = w_lqua-charg.
          lw_item_data-dlv_qty                    = w_lqua-verme.
          lw_item_data-dlv_qty_imunit         = w_lqua-verme.
          lw_item_data-base_uom               = w_lqua-meins.
          lw_item_data-hieraritem                = lw_lips-posnr.
          lw_item_data-usehieritm                = 1.
          lw_item_data-fact_unit_nom          = lw_lips-umvkz.
          lw_item_data-fact_unit_denom      = lw_lips-umvkn.
          lw_item_data-sales_unit                 = lw_lips-vrkme.
          lw_item_control-deliv_numb           = lw_lips-vbeln.
          lw_item_control-deliv_item             = lw_lips-posnr.
          lw_item_control-chg_delqty           = 'X'.
          lw_item_data_spl-deliv_numb        = lw_lips-vbeln.
          lw_item_data_spl-deliv_item          = lw_lips-posnr.
          lw_item_data_spl-stge_loc            = w_lqua-lgort.
          lw_item_data_spl-pick_denial        = 'X'
    Appending work area into internal table to pass as parameter
          APPEND  lw_item_data TO  li_item_data.
    Appending work area into internal table to pass as parameter
          APPEND lw_item_control TO li_item_control.
    Appending work area into internal table to pass as parameter
          APPEND lw_item_data_spl TO li_item_data_spl.
    Clearing work areas after use
          CLEAR : lw_item_data, w_lqua,lw_item_data_spl,lw_item_control,
                        lw_vbpok, lw_lips.
        ENDIF.
      ENDLOOP.
    Passing the delivery no in the work area of header data
      lw_header_data-deliv_numb           = v_delivery_no.
      lw_header_control-deliv_numb       = v_delivery_no.
      lw_header_tech_control-upd_ind   = 'U'.
    Calling BAPI to change the Batch/Batch-Split/Delivery Quantity
      CALL FUNCTION 'BAPI_OUTB_DELIVERY_CHANGE'
        EXPORTING
          header_data           = lw_header_data
          header_control       = lw_header_control
          delivery                   = v_delivery_no
          techn_control         = lw_header_tech_control
        TABLES
          item_data                = li_item_data
          item_control            = li_item_control
          return                     = li_return_change
          item_data_spl         = li_item_data_spl.
    Calling BAPI to committ the task
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' .
    This is the only way which i found as better way to do the Batch split and updating storage location togetherly.
    I hope this code will help you.

  • How to Use BAPI_OUTB_DELIVERY_CHANGE for Batch Split

    Hi Experts, I have the follow delivery:
    Item        Material   Deliv.Qty    Un
    10     739911     2     PQT
    And I want to obtain this:
    Item        Material   Deliv.Qty    Un                            Batch
    10     739911     0     PQT
    900001     739911     1     PQT          ZZ00060
    900002     739911     1     PQT          ZZ00061
    But, after using the Bapi I obtained this:
    Item        Material   Deliv.Qty    Un                            Batch
    10     739911     1,372     PQT
    900001     739911     0,314     PQT          ZZ00060
    900002     739911     0,314     PQT          ZZ00061
    So as you can see the problem is with the "Deliv.Qty". I expected:
    Item        Deliv.Qty
    10            0
    900001     1     
    900002     1     
    But I obtained:
    Item        Deliv.Qty
    10     1,372
    900001     0,314
    900002     0,314
    The parameters that I am using in the Bapi are:
    HEADER_DATA                                   
    DELIV_NUMB = 801174646
    HEADER_CONTROL                                
    DELIV_NUMB = 801174646
    DELIVERY = 801174646
    TECHN_CONTROL
    UPD_IND = U
    ITEM_DATA (three records):   
    DELIV_NUMB = 801174646
    DELIV_ITEM = 000010  
    MATERIAL = 739911  
    FACT_UNIT_NOM = 1   
    FACT_UNIT_DENOM = 1   
    DELIV_NUMB = 801174646  
    DELIV_ITEM = 900001     
    MATERIAL = 739911     
    BATCH = ZZ00060    
    HIERARITEM = 000010     
    USEHIERITM = 1          
    DLV_QTY = 1
    DLV_QTY_IMUNIT = 1
    FACT_UNIT_NOM = 1      
    FACT_UNIT_DENOM = 1      
    DELIV_NUMB = 801174646  
    DELIV_ITEM = 900002     
    MATERIAL = 739911     
    BATCH = ZZ00061    
    HIERARITEM = 000010     
    USEHIERITM = 1          
    DLV_QTY = 1
    DLV_QTY_IMUNIT = 1
    FACT_UNIT_NOM = 1      
    FACT_UNIT_DENOM = 1
    ITEM_CONTROL (three records):
    DELIV_NUMB = 801174646
    DELIV_ITEM = 000010  
    CHG_DELQTY = X
    DELIV_NUMB = 801174646
    DELIV_ITEM = 900001  
    CHG_DELQTY = X
    DELIV_NUMB = 801174646
    DELIV_ITEM = 900002  
    CHG_DELQTY = X
    So I am missing something but I don't know what.
    Can any one help me with this please?
    PD: I have looked the following forums in order to use the Bapi:
    How to Use BAPI_OUTB_DELIVERY_CHANGE for Batch Split
    batch split using BAPI_OUTB_DELIVERY_CHANGE
    Re: Help in BAPI_OUTB_DELIVERY_CHANGE(batch-split)
    BAPI_OUTB_DELIVERY_CHANGE - Batch Splits don't work
    Help for BAPI_OUTB_DELIVERY_CHANGE

    Hey,
    My code is for the inbound delivery but it should work the same.
    Give this a try.
    REPORT  z_delivery_batch_split.
    DATA:header_data  LIKE  bapiibdlvhdrchg,
    header_control  LIKE  bapiibdlvhdrctrlchg,
    delivery  LIKE  bapiibdlvhdrchg-deliv_numb,
    ls_return LIKE bapiret2,
    item_data  TYPE TABLE OF  bapiibdlvitemchg,
    item_control  TYPE TABLE OF bapiibdlvitemctrlchg,
    ls_item_data  LIKE  bapiibdlvitemchg,
    ls_item_control LIKE  bapiibdlvitemctrlchg,
    return TYPE TABLE OF bapiret2 WITH NON-UNIQUE KEY type.
    header_data-deliv_numb = '1800005005'.
    header_control-deliv_numb = '1800005005'.
    delivery = '1800005005'.
    ls_item_data-deliv_numb = '1800005005'.
    ls_item_data-deliv_item = '900001'.
    ls_item_data-material = '000000000020067722'.
    PERFORM create_batch CHANGING ls_item_data-batch.
    ls_item_data-hieraritem = '000010'.
    ls_item_data-usehieritm = '1'.
    ls_item_data-dlv_qty = 80.
    ls_item_data-dlv_qty_imunit = 80.
    ls_item_data-fact_unit_nom = '1'.
    ls_item_data-fact_unit_denom = '1'.
    ls_item_data-sales_unit = 'EA'.
    ls_item_data-base_uom = 'EA'.
    APPEND ls_item_data TO item_data.
    ls_item_data-deliv_numb = '1800005005'.
    ls_item_data-deliv_item = '900002'.
    ls_item_data-material = '000000000020067722'.
    PERFORM create_batch CHANGING ls_item_data-batch.
    ls_item_data-hieraritem = '000010'.
    ls_item_data-usehieritm = '1'.
    ls_item_data-dlv_qty = 60.
    ls_item_data-dlv_qty_imunit = 60.
    ls_item_data-fact_unit_nom = '1'.
    ls_item_data-fact_unit_denom = '1'.
    ls_item_data-sales_unit = 'EA'.
    ls_item_data-base_uom = 'EA'.
    APPEND ls_item_data TO item_data.
    ls_item_control-deliv_numb = '1800005005'.
    ls_item_control-deliv_item = '900001'.
    ls_item_control-chg_delqty = 'X'.
    APPEND ls_item_control TO item_control.
    ls_item_control-deliv_numb = '1800005005'.
    ls_item_control-deliv_item = '900002'.
    ls_item_control-chg_delqty = 'X'.
    APPEND ls_item_control TO item_control.
    break cgavin.
    CALL FUNCTION 'BAPI_INB_DELIVERY_CHANGE'
       EXPORTING
         header_data          = header_data
         header_control       = header_control
         delivery             = delivery
    *   TECHN_CONTROL        = TECHN_CONTROL
       TABLES
    *   HEADER_PARTNER       = HEADER_PARTNER
    *   HEADER_PARTNER_ADDR  = HEADER_PARTNER_ADDR
    *   HEADER_DEADLINES     = HEADER_DEADLINES
         item_data            = item_data
         item_control         = item_control
    *   ITEM_SERIAL_NO       = ITEM_SERIAL_NO
    *   EXTENSION1           = EXTENSION1
    *   EXTENSION2           = EXTENSION2
         return               = return
    *   TOKENREFERENCE       = TOKENREFERENCE
    *   HANDLING_UNIT_HEADER = HANDLING_UNIT_HEADER
    *   HANDLING_UNIT_ITEM   = HANDLING_UNIT_ITEM
    *   PARTIAL_GR_OBJECTS   =          PARTIAL_GR_OBJECTS
    READ TABLE return
    INTO ls_return
    WITH TABLE KEY type = 'E'.
    IF sy-subrc = 0.
       MESSAGE ID ls_return-id TYPE ls_return-type NUMBER ls_return-number WITH ls_return-message_v1 ls_return-message_v2
       ls_return-message_v3 ls_return-message_v4.
    ENDIF.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
      EXPORTING
        wait          = 'X'.
    break cgavin.
    *&      Form  CREATE_BATCH
    *       text
    *      <--P_LS_ITEM_DATA_BATCH  text
    FORM create_batch  CHANGING p_ls_item_data_batch.
       DATA: ls_bncom TYPE bncom.
       ls_bncom-matnr = ls_item_data-material.
       ls_bncom-werks = 'C333'.
       ls_bncom-lgort = '3000'.
       SELECT SINGLE mtart
         FROM mara
         INTO ls_bncom-mtart
         WHERE matnr = ls_bncom-matnr.
       CALL FUNCTION 'VB_NEXT_BATCH_NUMBER'
         EXPORTING
           matnr                          = ls_bncom-matnr
           werks                          = ls_bncom-werks
           check_batch                    = 'X'
           check_material                 = ''
           message_when_auto              = ' '
           x_bncom                        = ls_bncom
           lock_batch                     = ' '
         IMPORTING
           new_charg                      = p_ls_item_data_batch
         EXCEPTIONS
           no_material                    = 1
           no_plant                       = 2
           material_not_found             = 3
           plant_not_found                = 4
           no_batch_handling              = 5
           batch_exist                    = 6
           no_number                      = 7
           illegal_batch_number           = 8
           interval_not_found             = 9
           object_not_found               = 10
           interval_overflow              = 11
           error_automatic_batch_number   = 12
           cancelled                      = 13
           automatic_batch_num_not_active = 14
           OTHERS                         = 15.
       IF sy-subrc = 0.
         CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
           EXPORTING
             wait = 'X'.
       ENDIF.
    ENDFORM.                    " CREATE_BATCH

  • Error while using BAPI_OUTB_DELIVERY_CHANGE

    Hi Friends,
    I m using BAPI_OUTB_DELIVERY_CHANGE to change the delivery. But I m getting error - Error in document &1 item &2 (quantity consistency check).
    I m changing the delivered qty in batch-split and
    delivered qty in header  level.
    Is there any problem in code
    Some code snaps is:
    loop at itab.
        item_data1-DELIV_NUMB = s_vbeln.
        item_data1-DELIV_ITEM = 10.
        item_data1-DLV_QTY = itab-nt_qty.
           item_data1-UNIT_OF_WT = itab-unit.
        append item_data1.
      endloop.
      ITEM_CONTROL1-DELIV_NUMB = s_vbeln.
      item_control1-DELIV_ITEM = 10.
        item_control1-CHG_DELQTY = 'X'.
      append item_control1.
    CALL FUNCTION 'BAPI_OUTB_DELIVERY_CHANGE'
      EXPORTING
        HEADER_DATA               = header_data1
        HEADER_CONTROL            = header_control1
        DELIVERY                  = s_vbeln
      TECHN_CONTROL             =
    TABLES
      HEADER_PARTNER            =
      HEADER_PARTNER_ADDR       =
      HEADER_DEADLINES          =
        ITEM_DATA                 = item_data1
        ITEM_CONTROL              = item_control1
      ITEM_SERIAL_NO            =
      SUPPLIER_CONS_DATA        =
      EXTENSION1                =
      EXTENSION2                =
        RETURN                    = ret .
    Please help me.

    Hi friends, this can be solved setting values for the following additional parameters of structure ITEM_DATA.
    FACT_UNIT_NOM = 1.
    FACT_UNIT_DENOM = 1.
    This works for me, please let me know if this works for you!
    Regards
    Leonardo

  • PGI using Stock with Special Stock Indicator "E". (STO)

    Hi,
    We are in the process of creating Stock Transfer.
    While doing PGI the System is displaying the following message:
    Only 0 EA of material 1103DGC22LB 08062009 available
    When we executed T Code MMBE, we found the Stock exits with Special Stock Indicator "E".
    Is it possible to do the PGI using Stock with Special Stock Indicator "E"?
    Or what would be best possible to handle this situation.
    Please guide.
    Regards,
    PK

    If the stock has special stock indicator E. then you can see this in MMBe as Sales Order stock. If you dispaly the details, then you can see the Sales Order number and item for which the stock is assigned. Unless there is some reason that you want to take this stock from the sales order (for example the sales order is to be rejected), then you shouldn't take this stock as you will be unable to fullfill the sales order. If you want ot borrow the stock, then you could do a transfer as advised by previous person from sales order stock to own stock and after you get replacement stock transfer some back to sales order stock, to fullfill the order. If you are using MTO then you could also create a new production order assigned to the sales order to make the stock in the special stock segment.
    Rgds
    Richard

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

  • Batch split using BAPI_OUTB_DELIVERY_CHANGE

    I want to use BAPI_OUTB_DELIVERY_CHANGE to edit the D/O to add in the batch split and serial no. I pass in the following parameters:
    delivery = '0080740827'.
    item_data-deliv_numb = '0080740827'.
    item_data-deliv_item = '00010'.
    item_data-material   = 'SL15C-ACPOA-003'.
    item_data-dlv_qty    = 0.
    append item_data
    item_data-deliv_numb = '0080740827'.
    item_data-deliv_numb = '90001'.
    item_data-deliv_item = '00010'.
    item_data-material   = 'SL15C-ACPOA-003'.
    item_data-hieraritem = '00010'.
    item_data-usehieritm = '1'.
    item_data-batch      = '20483602'.
    item_data-dlv_qty    = 2.
    append item_data.
    item_serial_no-deliv_numb = '0080740827'.
    item_serial_no-itm_number = '90001'.
    item_serial_no-serialno   = '74714'.
    append item_serial_no.
    item_serial_no-deliv_numb = '0080740827'.
    item_serial_no-itm_number = '90001'.
    item_serial_no-serialno   = '74755'.
    append item_serial_no.
      CALL FUNCTION 'BAPI_OUTB_DELIVERY_CHANGE'
      EXPORTING
       header_data               =
       header_control            =
        delivery                  = delivery
      TECHN_CONTROL             =
      TABLES
      HEADER_PARTNER            =
      HEADER_PARTNER_ADDR       =
      HEADER_DEADLINES          =
       item_data                 =  item_data
       item_control              =  item_control
       item_serial_no            =  item_serial_no
      SUPPLIER_CONS_DATA        =
      EXTENSION1                =
      EXTENSION2                =
        return                    = return.
      TOKENREFERENCE            =
    When I run the program, the system has error and ask me to put in header_data and header_control. I dont want to change the header_data, I just want to change the item data, how do I fill in header_data and header_control? is my parameters correct?

    declare internal table for header_data and header_control. and dont append any values to it. simply assign it.
    CALL FUNCTION 'BAPI_OUTB_DELIVERY_CHANGE'
    EXPORTING
    header_data = header_data
    header_control = header_control
    delivery = delivery
    TECHN_CONTROL =
    TABLES
    HEADER_PARTNER =
    HEADER_PARTNER_ADDR =
    HEADER_DEADLINES =
    item_data = item_data
    item_control = item_control
    item_serial_no = item_serial_no
    SUPPLIER_CONS_DATA =
    EXTENSION1 =
    EXTENSION2 =
    return = return.
    TOKENREFERENCE =
    May be it will solve your problem.
    Thanks
    Muthappan

  • Using BAPI_OUTB_DELIVERY_CHANGE

    I want to change only the material qty in a D/O. No changes in header data, how do I fill in the parameters for BAPI_OUTB_DELIVERY_CHANGE? I follow the function module documentation, but is not working.

    Hi,
    I am trying to change quantity using BAPI_OUTB_DELIVERY_CHANGE. I have inputted details in the parameters as mentioned above. However I amreceiving error E/VL/280 (Required field in interface to delivery update missing &1 &2 &3 &4). Could some one please help me out to resolve this issue.

  • 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

  • Picking of Delivery using BAPI_OUTB_DELIVERY_CHANGE

    Hi Friends,
    I want to perform picking of a outbound delivery and would like to use BAPI_OUTB_DELIVERY_CHANGE. Do you know how to implement this? I have already tried the following:
    - Read the BAPI documentation
    - Correctly filling up the header structures with delivery number
    - Filling up item_data table with del #, item #,material, batch, qty, uom (sales), numerator & denominator factors (=1) etc...
    - also putting X in the chng_del_qty in item_control.
    But still it does not do the picking. If you have implemented it, can you pls share your experience?
    Thanks,
    Hitesh

    Hi,
    I used WS_DELIVERY_UPDATE for picking the outbound delivery...have a look at the sample code:
    WA_VBKOK-VBELN_VL = <del_nbr>.
    WA_VBKOK-VBELN = VBFA-VBELV.
    LOOP AT TAB_VBPOK.
             TAB_VBPOK-VBELN_VL = WA_VBKOK-VBELN_VL.
    Get delivery line item data.
            TAB_VBPOK-VBELN = SY-DATUM.
            TAB_VBPOK-POSNN = SY-UZEIT.
            TAB_VBPOK-VBTYP_N = VBFA-VBTYP_N.
            SELECT * INTO TABLE TVBFA FROM VBFA
                                WHERE VBELV = WA_VBKOK-VBELN_VL.
            SORT TVBFA DESCENDING.
            CLEAR TVBFA.
            READ TABLE TVBFA WITH KEY VBELV = TAB_VBPOK-VBELN_VL
                                      POSNV = TAB_VBPOK-POSNR_VL
                                      VBTYP_N = 'Q'
                                      TAQUI = ' '.
            IF SY-SUBRC EQ 0.
              V_PIKMG = TAB_VBPOK-PIKMG + TVBFA-RFMNG.      " Picking quantity
              CLEAR TVBFA.
              READ TABLE TVBFA WITH KEY VBELV = TAB_VBPOK-VBELN_VL
                                    POSNV = TAB_VBPOK-POSNR_VL
                                    VBTYP_N = 'Q'
                                    TAQUI = 'X'.
              IF SY-SUBRC EQ 0.
                V_PIKMG = V_PIKMG + TVBFA-RFMNG.          " Total Picking quantity
    *****Error Message: Picked quantity is larger than the quantity to be delivered.
                IF LIPS-LFIMG LT V_PIKMG.
                  PERFORM GET_RETURN  USING 'E' 'VL' '019' SPACE SPACE SPACE SPACE
                            RETURN.
                  V_EXIT = 'Y'.
                  EXIT.             " EXIT THE RFC.
                ENDIF.
              ENDIF.
            ENDIF.
            TAB_VBPOK-KZNTG = 'X'.                           " Confirmation of net weight
            TAB_VBPOK-KZBRG = 'X'.                           " Confirmation of gross weight
            TAB_VBPOK-KZVOL = 'X'.                            " Confirmation of volume
            MODIFY TAB_VBPOK.
          ENDLOOP.
    CALL FUNCTION 'WS_DELIVERY_UPDATE_2'
            EXPORTING
              VBKOK_WA               = WA_VBKOK
              SYNCHRON               = 'X'
              DELIVERY               = WA_VBKOK-VBELN_VL
              NICHT_SPERREN_1        = 'X'
              IF_ERROR_MESSAGES_SEND = 'X'
              IT_PARTNER_UPDATE      = IS_PARTNER
            TABLES
              PROT                   = I_PROTT.
          IF NOT I_PROTT IS INITIAL.
            RETURN-TYPE = 'E'.
            RETURN-MESSAGE = 'Goods Issue Failed!'.
            EXIT.                                  "EXIT THE RFC
          ELSE.
            COMMIT WORK AND WAIT.
          ENDIF.
    Try to use this FM ...Thanks

  • Batch Split using BAPI_OUTB_DELIVERY_CHANGE - Possible?

    Hello,
    I'm using BAPI_OUTB_DELIVERY_CREATE_SLS to create an outbound delivery based on a sales order. I need my outbound delivery to be created without batch split at this moment. This is working fine.
    Now I need to add the batch split information to the outbound delivery that is already created. I've been trying to use BAPI_OUTB_DELIVERY_CHANGE but so far with no success. The batch split items just do not appear in my delivery - the best I could do was changing the batch number of the parent item. Is there a way to make this BAPI create the batch split items (90001, 900002, etc)?
    Regards,
    Joã

    Hello,
    I'm using BAPI_OUTB_DELIVERY_CREATE_SLS to create an outbound delivery based on a sales order. I need my outbound delivery to be created without batch split at this moment. This is working fine.
    Now I need to add the batch split information to the outbound delivery that is already created. I've been trying to use BAPI_OUTB_DELIVERY_CHANGE but so far with no success. The batch split items just do not appear in my delivery - the best I could do was changing the batch number of the parent item. Is there a way to make this BAPI create the batch split items (90001, 900002, etc)?
    Regards,
    Joã

  • Creation of PGI using BDC for tc VL02N is not happening..

    Hi All,
    i need to do Post Goods Issue (PGI) thro' BDC and after that i need to update the flag in Ztable.
    its giving Success message and updating the database also.
    but its not issuing the PGI.and further i want to create billing doc.So its compulsory to me to post PGI.
    if i look into the BDCMSGCOLL structure its giving "NO BATCH INPUT DATA FOR SCREEN"? why this is happening?
    please let me know immediately....
    REFRESH: tt_bdcmsgcoll .
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          input  = wa_created-document_numb
        IMPORTING
          output = wa_created-document_numb.
      REFRESH tt_bdcdata.
      PERFORM bdc_dynpro      USING text-001 text-002.
      PERFORM bdc_field       USING text-008
                                   text-014.
      PERFORM bdc_field       USING text-009
                                    text-011.
      PERFORM bdc_field       USING text-014
                                    wa_created-document_numb.
      PERFORM bdc_dynpro      USING text-001 text-003.
      PERFORM bdc_field       USING text-009
                                    text-036.
      PERFORM bdc_field       USING text-025
                                    sy-datum.
      PERFORM bdc_field       USING text-008
                                    text-035.
      PERFORM bdc_field       USING text-037
                                    sy-datum.
      PERFORM bdc_field       USING text-038
                                    text-029.
      PERFORM bdc_field       USING text-016
                                    c_x.
      CALL TRANSACTION c_t_del USING tt_bdcdata
                                    MODE c_m
                                    UPDATE c_u
                                    MESSAGES INTO tt_bdcmsgcoll .
      SORT tt_bdcmsgcoll BY msgtyp.
      READ TABLE tt_bdcmsgcoll INTO wa_bdcmsgcoll WITH KEY msgtyp = c_e.
      IF sy-subrc EQ 0.
        LOOP AT tt_bdcmsgcoll INTO wa_bdcmsgcoll WHERE msgtyp = c_e.
          CALL FUNCTION 'FORMAT_MESSAGE'
            EXPORTING
              id        = wa_bdcmsgcoll-msgid
              lang      = text-010
              no        = wa_bdcmsgcoll-msgnr
              v1        = wa_bdcmsgcoll-msgv1
              v2        = wa_bdcmsgcoll-msgv2
              v3        = wa_bdcmsgcoll-msgv3
              v4        = wa_bdcmsgcoll-msgv4
            IMPORTING
              msg       = v_msg
            EXCEPTIONS
              not_found = 1
              OTHERS    = 2.
          IF sy-subrc <> 0.
          ENDIF.
          WRITE :/ v_msg.
        ENDLOOP.
      ELSE.
        MOVE : c_x TO wa_worklist-pgi_flag.
        READ TABLE tt_epit INTO wa_epit WITH KEY epi_id = wa_worklist-epi_id epi_sr = wa_worklist-epi_sr.
        IF sy-subrc EQ  0.
          MODIFY tt_epit FROM wa_worklist TRANSPORTING pgi_flag WHERE epi_id = wa_worklist-epi_id AND epi_sr = wa_worklist-epi_sr.
        ELSE.
          APPEND wa_worklist TO tt_epit.
        ENDIF.
         wa_epit-pgi_flag = c_x.
         MODIFY   tt_epit FROM wa_epit TRANSPORTING pgi_flag WHERE epi_id = wa_worklist-epi_id AND del_no = wa_created-document_numb .
         UPDATE zsd_dt_epit SET pgi_flag = 'X' WHERE epi_id = wa_worklist-epi_id AND del_no = wa_created-document_numb .
         IF  sy-subrc EQ 0.
         ENDIF.
      ENDIF.

    HI,
    Please refer this
    To perform Post goods issue
        PERFORM OPEN_GROUP.
        PERFORM BDC_DYNPRO      USING 'SAPMV50A' '4004'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'LIKP-VBELN'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '=WABU_T'.
        PERFORM BDC_FIELD       USING 'LIKP-VBELN' DELIVERY.
                                 '84000064'.
        PERFORM BDC_TRANSACTION USING 'VL02N'.
        PERFORM CLOSE_GROUP.
        CLEAR : DELIVERY,
                T_BSITEM,
                T_BSICTL.
      ENDIF.
    ENDFORM.                    " DELIVERY

  • 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

  • Inbound Delivery Idoc with batch split then PIC and PGI using DELIVERY03

    Dear Experts,
    Requirement to split the delivery item then PIC and PGI, while Processing Inbound Idoc using basic Idoc type DELIVERY03
    I have searched forum already but it vain. Please advice.
    Thanks and Regards,
    Thiru.
    Moderator message : Spec/requirements dumping not allowed, show the work you have already done.  Thread locked.
    Edited by: Vinod Kumar on Nov 16, 2011 5:09 PM

    Hello Finbarr
    I assume that you do NOT send any (suggested) batches to your warehouse. Otherwise you would have the same problem like we have that the WHSCON cannot overwrite a (suggested) batch.
    However, if you just send the quantity per item then the batch split is much simpler than you suggested:
    "First E1EDL24 segment:
    POSNR     50
    MATNR     000000000000602006
    MATWA     000000000000602006
    CHARG     L1519   " <<< first batch
    LFIMG     37.000
    VRKME     CT
    "Second E1EDL24 segment:
    POSNR     50
    MATNR     000000000000602006
    MATWA     000000000000602006
    CHARG     L1880   " <<< second batch
    LFIMG     37.000
    VRKME     CT
    Well, and as qualifier we use: E1EDL19-QUALF = 'XYZ'  " a dummy
    The SAP system is smart enough the realize that these two E1EDL24 segment belong to the same item yet have different batches and, therefore, yield a batch split in the delivery. The system generated the 9xxxxx numbers for this sub-item lines automatically.
    Although I believe that it is not possible to change a batch in the delivery using an inbound WHSCON I would appreciate to have a final proof of this assumption. I could imagine that if you first delete the item containing the suggested batch and then add a new item with the actual batch from the warehouse it might works. However, this would require to implement a user-exit which I do not prefer.
    Regards
      Uwe
    PS: It seems I gave an answer to the wrong question (should be EDI (DESADV): Can batches be overwritten by an inbound WHSCON (pick conf)? )

Maybe you are looking for

  • Invoice verification price not equal to GR document price

    Hi: everyone Purchase order price has been changed after goods receipt. according to my underdtanding, invoice verification price should be equal to GR price if this is IV of based GR. However, when I deal with invoice verification, sap system propos

  • Adobe PDF printer no output. Did 'Print Test Page', but never got out of queue (Acrobat X Pro;Win 7)

    I'm using Acrobat X Pro in Windows 7 environment. At Control Panel->Hardware and Sound->Devices and Printers, I did a 'Print Test Page' when I right-clicked on the Adobe Printer icon and  clicked Printer properties. The 'Save PDF File As' prompt came

  • New Notebook Graphic Specs for Illustrator GPU Performance

    I'm looking at purchasing a notebook for use with Adobe Illustrator.  Looking at the specifications, only certain NVIDIA video adapters are listed supporting the new Windows GPU Performance.  The notebooks I'm looking at have the NVidia Optimus K1100

  • Pro Crashed When Opening Project

    Working in CS3.  I have a completed project, only need to export the final product, but when I now open the project file I get this message - 

  • Job: SAP_CCMS_MONI_BATCH_DP

    Basis jobs seem to error on Sunday morning, after the Cold backup system outage ?? The SAP_CCMS_MONI_BATCH_DP, but seems to error each week after the system is started up from the backup outage ?? This past Sunday morning, the system stopped at 3:25