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ã

Similar Messages

  • 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

  • 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

  • Can not Batch split outbound delivery

    Hi All,
    I have a 1 SO, when I create outbound delivery, I press batch split but has 1 message appear "Actual delivery quantity for Item 000010  is 0, split is not necessary"
    I check in Location, still have more qty (Unrestricted use) than in SO.
    How can I create outbound ?

    Hi,
    What is the delivery quantity shown in the delivery document. If the quantity is 0 or empty, then batch split is not possible. The quantity can be 0 only if
    1. There is no stock in the plant/storage location
    2. The stock requirement in this case is a special stock and there is no special stock reserved for the sales order.
    3. There is no material available in multiple batches in plant/storage location. All the materials belong to single batch.
    Find out what is ur scenario. Accordingly create stock in the plant/storage location with multiple batches. For ex you can create 100 units of materials with batch 12345 and then another 100 units of same material with batch 6789. If it has to be a reserved stock, then assign the sales order and item to these stocks.
    If this is done and if you create the delivery on the confirmed schedule line date, you should be able to split the quantity between various batches.
    Hope this helps you

  • Batch split not happening during delivery

    Hi Experts,
    I have enough of stock for a material with different batches (with different expiry dates). When I create an order for qty 100, system confirms it on a certain date taking 1st batch nearest to expiry date, as per the search startegy set in the cponfiguration.Please note here that the batch that system picks has got only 50 qty in stock, but it shows whole 100 qty against it. Probably because Batch split is not possible during sales order creation, hence system showing whole qty against one batch.
    Now, when I try to create delivery, it shows only 50 qty of the same batch in delivery document. I select the line item and go to the "Batch split" tab to effect batch split, but system does not allow. It says "Batch already specified for material".Here is the detail for your analysis-
    Batch in item 000010 already specified for material 2000978
    Message no. VL221
    Diagnosis
    The batch was either predefined in the sales order that the delivery is based on or it was assigned to the delivery item manually. Therefore, you can no longer carry out a batch split for the delivery quantity of the items.
    Procedure
    In order to make the batch split possible, you can cancel the assignment of the delivery item to the batch, if the delivery's processing status allows.
    Kindly advise.
    Thanks in advance,
    Randhir

    Thanks Mr. P Gomatheeswaran,
    Now batch is not being determined during sales order creation, that's fine.While creating delivery,when I select line item and go to Batch split tab I can see batches being split in two, which is OK. But when I try to put Picking quantity as delivery qty, system says "Picked quantity is larger than the qty to be delivered".(Message no. VL019).
    Also Storage location field is grayed out.
    Regards,
    Randhir

  • Batch Split in case of Stock Transport Order

    Hi all ,
    In case of sales order i can find batch split using table KOTH002 where i give application as V ang give customer number. Then based on KNUMH i can get no. of batch splits allowed(CHASP) from KONDH table.
    Please let me know how can i get no of batch splits allowed in case of STO.
    Thanks in advance.
    Taranam

    Hi,
    Since you have activated the split valuation for the material system is asking to enter the valuation type.
    Check the material master Accounting 1 view whether you have maintained valuation category?
    If you want Split valuation, maintain the valuation type in config settings in IMG & extend the material to the respective valuation type.
    Hope it helps.
    Thanks & Regards,

  • Batch Split Delivery creation

    Hi, all, I just want to know whether function GN_DELIVERY_CREATE can create Delivery for batch split. If yes, how to do that? Thanks.
    I try many times, but unsuccess.

    Hi Rick,
    Can You Please explain How You create delivery with batch split using GN_DELIVERY_CREATE ?
    I have got a similar requirement.
    ~Atul 

  • 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

  • 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)? )

  • Create a Batch split for inbound delivery using IDOC

    Hi,
    I have an requirement to create Batch splits in the Inbound delivery.
    These Inbound deliveries are created using IDOC.
    So when the inbound deliveries are created through IDOC the Batch split is not happening.
    How can i achieve this through Coding?
    Any pointers on this will be highly appreciated.

    Hi ,
    Try this link.
    http://wiki.sdn.sap.com/wiki/display/ABAP/Toapplybatchsplitinanoutbound+delivery
    Regards
    HM

  • Cost became doble in profitability reoport when picking using batch split

    Hi friends,
    When we do picking use batch split, cost(material external price) shows double in profitability report. everything else looks normal.
    What did we miss?
    Thanks in advance,
    Linda

    Did you check the copy control settings in VTFL? At item level, check the box cumulate cost and test again.
    Regards,

  • How to use BAPI_INB_DELIVERY_CONFIRM_DEC do batch split

    Hi, everyone:
    I want to do batch split in inbound or outbound delivery by function.
    I found BAPI_INB_DELIVERY_CONFIRM_DEC, but our system is not a Decentralized System and I wandered in so many parameters.
    How to use this fuction?
    Thanks.

    Hi Junwen,
    Did you call the BAPI_TRANSACTION_COMMIT afterwards?
    Before this the data is not saved. After that it is saved.
    Regards,
    Rob.

  • Using BAPI_OUTB_DELIVERY_CONFIRM_DEC for batch split?

    Dear All,
    I have an existing DO in SAP with one line item.
    I would like to use BAPI_OUTB_DELIVERY_CONFIRM_DEC to update the this line item with Batch Split.
    For example, the existing line item has a material M001 with quantity 5. I need to update the DO to split this line into two batchs - qty 3 from Batch A and qty 2 from Batch B.
    In the BAPI's ITEM_DATA - I filled 3 lines:
    Line 1 - DO Number 1014---, Item number 00001, Material Number M001, qty 0
    Line 2 - DO Number 1014---, Item number 90001, Material Number M001, qty 3, HIERAR 00001, USEHIERITM 1, Batch Batch A
    Line 3 - DO Number 1014---, Item number 90002, Material Number M001, qty 2, HIERAR 00001, USEHIERITM 1, Batch Batch B
    I also updated the ITEM_CONTROL with Deliv_NUMB ---, DELIV_ITEM 00001, CHG_DELQTY X, GROSS_WT_FLG X.
    I get no errors after calling this BAPI and the RETURN table is empty, yet, the document was not changed!
    I did a bapi call via remote and there is a commit work after the bapi call.
    Best Regards,
    Junwen
    Message was edited by: Junwen Huang

    Hi Junwen,
    Did you call the BAPI_TRANSACTION_COMMIT afterwards?
    Before this the data is not saved. After that it is saved.
    Regards,
    Rob.

  • Update picking quantity in delivery (Batch split items) using function modu

    Hi All,
    I need to update a picking quantity with zero value in delivery for batch split items (Item numbers start with 900001. etc).I'm trying to use WS_DELIVERY_UPDATE
    and SD_DELIVERY_UPDATE_PICKING. I'm passing parameter VBKOK-KOMUE , and all other details, but it is not updating.
    I'm able to update delivery quantity of same item with zero value but not picking quantity.
    Could you please let me know how to achive this.
    Regards
    Vikram

    I think the number 900001is mean batch split line item.
    example:
    In Deivery Note:
    Item 10
         Batch 900001
         Batch 900002
    Item 20
         Batch 900003
         Batch 900004
    That right,

  • Batch Split for Material which are activated with serial number management

    Hello All,
    We have requirement where we want batch split to be mandatory during goods reciept with inbound delivery  for material which are serial number managed.
    Please let me know the possible solution to achive this requirement.
    Appreciate your quick response.
    BR,
    Tushar

    I have resolved this issue by myself. Check out the link where I have briefed how to resolve the issue using bapi BAPI_OUTB_DELIVERY_CHANGE.
    BAPI_OUTB_DELIVERY_CHANGE - Batch Splits don't work
    Regards,
    Senthil G.

Maybe you are looking for