Changing delivery with BAPI

My requirement is to update Pick quantity in the Delivery, which can be acheived via a BDC to VL02N transaction.
But for obvious reason I am looking for some suitable FM or BAPI.
I was looking at BAPI_OUTB_DELIVERY_CHANGE function module to change outbound deliveries. But the TABLE parameter ITEM_DATA do not have  any field for supplying Pick quantity.
Any reason why pick quantity is not there. Appreciate your reply or workaround on this.

Hi
You can youse this fm  "SD_DELIVERY_UPDATE_PICKING"
Regards
Ravish

Similar Messages

  • 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

  • Create Sales Order / Delivery with BAPI

    Hi,
    I want to create a sales order and the its delivery using BAPI. Is there such BAPI or should i use two different BAPI functions.
    I also need to post goods issue after the completition of the delivery. Which BAPI is the most appropriate for my pupose?
    thanks for your help,
    - ferudun

    Hi,
    Check this example of creating a sales order and for creating delivery...and PGI
    ************SALES ORDER INPUT CREATION.
    PARAMETERS: p_auart TYPE auart OBLIGATORY.
    PARAMETERS: p_vkorg TYPE vkorg OBLIGATORY.
    PARAMETERS: p_vtweg TYPE vtweg OBLIGATORY.
    PARAMETERS: p_spart TYPE vtweg OBLIGATORY.
    PARAMETERS: p_sold TYPE kunnr OBLIGATORY.
    PARAMETERS: p_ship TYPE kunnr OBLIGATORY.
    *ITEM
    PARAMETERS: p_matnr TYPE matnr OBLIGATORY.
    PARAMETERS: p_menge TYPE kwmeng OBLIGATORY.
    PARAMETERS: p_plant TYPE werks_d OBLIGATORY.
    PARAMETERS: p_itcat TYPE pstyv   OBLIGATORY.
    DATA DECLARATIONS.
    DATA: v_vbeln LIKE vbak-vbeln.
    DATA: header LIKE bapisdhead1.
    DATA: headerx LIKE bapisdhead1x.
    DATA: item    LIKE bapisditem OCCURS 0 WITH HEADER LINE.
    DATA: itemx   LIKE bapisditemx OCCURS 0 WITH HEADER LINE.
    DATA: partner LIKE bapipartnr  OCCURS 0 WITH HEADER LINE.
    DATA: return  LIKE bapiret2    OCCURS 0 WITH HEADER LINE.
    DATA: lt_schedules_inx   TYPE STANDARD TABLE OF bapischdlx
                             WITH HEADER LINE.
    DATA: lt_schedules_in    TYPE STANDARD TABLE OF bapischdl
                             WITH HEADER LINE.
    HEADER DATA
    header-doc_type = p_auart.
    headerx-doc_type = 'X'.
    header-sales_org = p_vkorg.
    headerx-sales_org = 'X'.
    header-distr_chan  = p_vtweg.
    headerx-distr_chan = 'X'.
    header-division = p_spart.
    headerx-division = 'X'.
    headerx-updateflag = 'I'.
    PARTNER DATA
    partner-partn_role = 'AG'.
    partner-partn_numb = p_sold.
    APPEND partner.
    partner-partn_role = 'WE'.
    partner-partn_numb = p_ship.
    APPEND partner.
    ITEM DATA
    itemx-updateflag = 'I'.
    item-itm_number = '000010'.
    itemx-itm_number = 'X'.
    item-material = p_matnr.
    itemx-material = 'X'.
    item-plant    = p_plant.
    itemx-plant   = 'X'.
    item-target_qty = p_menge.
    itemx-target_qty = 'X'.
    item-target_qu = 'EA'.
    itemx-target_qu = 'X'.
    item-item_categ = p_itcat.
    itemx-item_categ = 'X'.
    APPEND item.
    APPEND itemx.
      Fill schedule lines
    lt_schedules_in-itm_number = '000010'.
    lt_schedules_in-sched_line = '0001'.
    lt_schedules_in-req_qty    = p_menge.
    APPEND lt_schedules_in.
      Fill schedule line flags
    lt_schedules_inx-itm_number  = '000010'.
    lt_schedules_inx-sched_line  = '0001'.
    lt_schedules_inx-updateflag  = 'X'.
    lt_schedules_inx-req_qty     = 'X'.
    APPEND lt_schedules_inx.
    Call the BAPI
    CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA1'
         EXPORTING
              sales_header_in     = header
              sales_header_inx    = headerx
         IMPORTING
              salesdocument_ex    = v_vbeln
         TABLES
              return              = return
              sales_items_in      = item
              sales_items_inx     = itemx
              sales_schedules_in  = lt_schedules_in
              sales_schedules_inx = lt_schedules_inx
              sales_partners      = partner.
    Check the return table.
    LOOP AT return WHERE type = 'E' OR type = 'A'.
      EXIT.
    ENDLOOP.
    IF sy-subrc = 0.
      WRITE: / 'Error in creating document'.
    ELSE.
      COMMIT WORK AND WAIT.
      WRITE: / 'Document ', v_vbeln, ' created'.
    ENDIF.
    ************DELIVERY CREATION.
    DATA: BEGIN OF t_vbap OCCURS 0,
            vbeln LIKE vbap-vbeln,
            posnr LIKE vbap-posnr,
            zmeng  LIKE vbap-kwmeng,
            matnr  LIKE vbap-matnr,
            werks  LIKE vbap-werks,
          END OF t_vbap.
    DATA: t_request TYPE STANDARD TABLE OF bapideliciousrequest
          WITH HEADER LINE.
    DATA: t_created TYPE STANDARD TABLE OF bapideliciouscreateditems
          WITH HEADER LINE.
    DATA: t_return TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE.
    SELECT vbeln posnr zmeng matnr werks
           INTO TABLE t_vbap
           FROM vbap
           WHERE vbeln = v_vbeln.
    LOOP AT t_vbap.
      t_request-document_numb = t_vbap-vbeln.
      t_request-document_item = t_vbap-posnr.
      t_request-quantity_sales_uom = t_vbap-zmeng.
      t_request-quantity_base__uom  = t_vbap-zmeng.
      t_request-id = 1.
      t_request-document_type = 'A'.
      t_request-delivery_date      = sy-datum.
      t_request-material = t_vbap-matnr.
      t_request-plant = t_vbap-werks.
      t_request-date = sy-datum.
      t_request-goods_issue_date = sy-datum.
      t_request-goods_issue_time = sy-uzeit.
      APPEND t_request.
    ENDLOOP.
    CALL FUNCTION 'BAPI_DELIVERYPROCESSING_EXEC'
         TABLES
              request      = t_request
              createditems = t_created
              return       = t_return.
    READ TABLE t_return WITH KEY type = 'E'.
    IF sy-subrc = 0.
      MESSAGE e208(00) WITH 'Delivery creation error'.
    ENDIF.
    COMMIT WORK.
    ************Post goods issue.
    READ TABLE t_created INDEX 1.
    DATA: vbkok_wa TYPE vbkok.
    vbkok_wa-vbeln_vl = t_created-document_numb.
    vbkok_wa-wabuc = 'X'.
    DATA: v_error.
    CALL FUNCTION 'WS_DELIVERY_UPDATE'
         EXPORTING
              vbkok_wa                  = vbkok_wa
              delivery                  = t_created-document_numb
         IMPORTING
              ef_error_in_goods_issue_0 = v_error.
    COMMIT WORK.
    Thanks,
    Naren

  • CHANGE DELIVERY WITH IDOC WSCON.DELVRY03

    Hi everybody.
    We are trying to change a delivery with inbound idoc WSCON.DELVRY03.
    We process de idoc and it's shown that the delivery has been changed correctly but the delivery hasn't  really  benn changed.
    The process of the idoc also provokes the delivery lock.
    Does anybody know how to change the delivery with this idoc and the delivery remains unlock?
    Thanks a lot
    Regards

    Well I think there's no easy way... If I try to make a change on delivery while processing picking with IDOC, it's possible to get an error message "delivery number ... is being processed by ..."
    So, I think I could save this "number of packages" value in a Z table, and then process this table to save in the corresponding field on delivery. I'm still open for suggestions.

  • Change Reservation with BAPI

    Hi,
    We need to change the requirement date in a reservation when certain criteria are fullfilled. I thought of using a BAPI for this and checked this forum to find out which --> result : BAPI_RESERVATION_CHANGE ; But when i try to look this one up in SAP i can't find anything. Just a bapi to create a reservation.
    So is there a bapi that can help me with my requirement ?with regards
    Erik

    Hello,
    Try with these Fm's
    FMR0_WF_CHANGE_RESERVATION
    FMR0_WF_UPDATE_RESERVATION
    MB_CHANGE_RESERVATION          Changing reservations
    MB_CHANGE_RESERVATION_ARRAY    Changing reservations (array update)
    MB_CHANGE_RESERVATION_WA       Updating the reservation items from goods movements
    RH_PM_FM_RESERVATION_UPDATE
    TB_LIMIT_RESERVATION_CHANGE
    If useful reward.
    Vasanth

  • How to create Delivery with sales order FM/BAPI

    Hi Gurus,I'm new to  SAP  platform
    I have created sales order ,
    with this i need to create Delivery(vl01n)
    so i need to give 'Shipping Point','Selection Date','SD Number'
    so could any one tel me which FM/BAPI is suitable to create
    Outbound delivery with 'sales order number', 'Selection date' and
    "Plant or Shipping Point'.
    With these Import parameters i need  FM/BAPI .
    Thanks  in Advance
    Siva Kumar kasa.

    I   have created delivery  with  that  BAPI 
    giving   'batch number'  but  it was  not  updated,so  can u tel me
    any related field  which need give to change batch field  also.

  • HU change on delivery using BAPI

    Hi,
    I am trying to change Outbound Delivery with the packing details by providing HU details(external number assignement).
    BAPI "BAPI_OUT_DELIVERY_CHANGE" could not do the change for the HUs. BAPI "BAPI_OUTB_DELIVERY_CONFIRM_DEC" is not right, as it delete and recreate HUs. We do not want that HUs are deleted!
    Is there any BAPI to do changes on Outbound delivery (also HUs) - changes of item quantity, HUs quantity, delete HUs from delivery or add HUs to delivery?
    Could you provide some help in this regard.
    Thanks Matjaz

    Hi Anand,
    In the BAPI 'BAPI_OUTB_DELIVERY_CHANGE', import parameter HEADER_DATA ( Associated type is BAPIOBDLVHDRCHG ), there is a field called DLV_BLOCK.
    You can get the possible values for this field in table 'TVLS'.
    Please find the example possible values.
    01     Credit limit
    02     Political reasons
    03     Bottleneck material
    04     Export papers missng
    05     Check free of ch.dlv
    06     No printing
    07     Change in quantity
    08     Kanban Delivery
    09     JIT delivery (PDS)
    Regards,
    Vijay

  • Change Bill-of-lading&package no in Outbound Delivery using BAPI or any FM

    Dear ABAP Gurus,
    How to change Bill of Lading(BOLNR) and Number of Packages(ANZPK) in Outbound Delivery using BAPI or some other Function MOdule.( BDC is not required for this).
    Regards,
    Rajesh

    MOVE 'BAPE_VBAP' TO lwa_extension-structure.
          lwa_bape_vbap-vbeln = lwa_final-vbeln.
          lwa_bape_vbap-posnr = lv_posnr.
          MOVE lwa_final-yyslotid TO  lwa_bape_vbap-yy_slotid.
          MOVE lwa_bape_vbap TO lwa_extension-valuepart1.
          APPEND  lwa_extension TO  lt_extension.
          CLEAR  lwa_extension.

  • BAPi to create Outbound delivery with PGI

    Hi all,
    What BAPi , we can use to create Outbound delivery with PGI.
    Please help me in this regards.
    Deekshitha.

    Hi,
    Use the BAPI BAPI_GOODSMVT_CREATE
      check this link.... u will get all help from this code..
    http://sap4.com/wiki/index.php?title=BAPI_GOODSMVT_CREATE&printable=yes
    <b>rEWARD POINTS</b>
    rEGARDS

  • Change the hour of delivery with the hour system

    hello,
    can you help me to change the hour of delivery with the hour system in outbound delivery document ( header -> shippement). how can you do this ? with user-exit ? please let me know
    thanks a lot

    Hi,
    You can use MV50AFZ1 to achieve this.
    Thanks
    Krishna.

  • Partial delivery with BAPI_SALESORDER_CREATEFROMDAT2

    Dear All,
    Is there a way to force partial delivery in BAPI_SALESORDER_CREATEFROMDAT2 ?
    By default "complete delivery" is chosen.
    I read somewhere that people fixed the issue using transaction OVZJ but in my case, this solution is not satisfactory because if I change this customizing, it changes the working order of the transaction VA01 (sales order creation).
    If found a dedicated flag (PART_DLV) in ITEMS_IN table but I was not able to make it work...
    Follow my example:
    -     27 items in stock
    -     I want to make an order for 30 items
    -     VA01 creates the sales order and a delivery with confirmed quantity 27
    -     BAPI_SALESORDER_CREATEFROMDAT2 creates the sales order and u201Cno delivery createdu201D.
    Thanks for your help.
    Best regards

    In order to give the solution to all reader in the future. I finally find a solution.
    I wrote an OSS message to SAP and they aswer me in this way:
    "Dear Customer,
    In a BAPI, the ATP check is performed in the background.
    Since the system is performing the availability check
    in background, the availability screen cannot be performed.
    So it is not able to make decisions regarding full
    delivery, delivery proposal...In this case,the system uses
    the configuration found in OVZJ. If your availability checking
    rule in OVZJ is blank, the system will choose full delivery.
    Sorry, but I can not give you a better solution to customizing in
    OVZJ, if you whish a partial delivery."
    In that transaction in customizing I insert the value "E" and the partial delivery is created from VA01 and from bapi too.

  • Change Delivery - Custom fields

    Hi Forum,
    I need to change with BAPI a lot of custom fields in LIKP & LIPS. I found BAPI_OUTB_DELIVERY_CHANGE but there aren't all append structures as in LIKP and LIPS. (I also think that it is not released because in trx BAPI it is not present)
    After another search, I found SHP_BAPI_DELIVERY_CHANGE but I don't know if I can modify only my fields.
    Someone can help me?
    I'm under go-live and I'm afraid to do this operation manually.
    Thanks.

    Yes they are, but these fields are empty during outbound delivery creation with VL10C because they are being populate with Idoc form inbound delivery. I must read these fields thru RFC from ecc to 4.6 and then I need to make changes to the new deliveries.

  • Delivery Update BAPI in 5.0

    Hi,
    We are in ECC 5.0 and have the following requirement.
    a. Receive loaded weight information from weight  control system for a delivery.
    b. Update the delivery with that weight information.
    Identify if there is batch split on that line item and the number of batches allocated to that line item.
    Check inventory for all those batches.
    Allocate the weight (weight and qty are equal in our case) to the batches in ascending order of inventory. 
    Update delivery qty for each batch equal to that weight.
    Update Picked quantity equal to that weight.
    Update Text information for that line item with all the info that came from weighing system.
    In 4.5b we were using BDC on VL02 to perform these updates and that is OK. Also we did not use batch split in 4.5b. Now we want to use batch split and make changes to this program to handle this.
    Our issues now are:
    1. We prefer to use BAPIs to update delivery with all the info as explained above (with batch split).
    2. There seems to be no delivery bapi which updates text information .
    3. Delivery update BAPI also does not support updating the PICK qty. (BAPI_OUTB_DELIVERY_CHANGE)
    4. BDC for new transaction VL02N does not support updating of text information and SAP does not advise to use BDCs for new transactions.
    5. SAP seems to advise continuation of old transaction VL02 (in BDC) for this kind of update.
    Please advise if there are any other BAPI to achieve this functionality or are we missing some thing?
    Thanks for your Help.
    ST

    Roberto,
    Thanks for looking into this.
    As I understand DELVRY03 is mainly for outbound. I will check to see if we have standard functionlaity to update batch split data using this IDOC.
    Just to restate my problem, we already have a custom IDOC to receive the data.
    Problem now is how to update that data into SAP in 5.0 using standard BAPI (with little bit of customisation if required).
    With the currect IDOC we have we have our own logic to update delivery using BDC.
    Thanks again for looking into this.
    ST

  • Create outbound delivery with GN_DELIVERY_CREATE

    hi,
    how could i create an outbound delivery without reference with fm GN_DELIVERY_CREATE?.
    It is no problem to create this kind of delivery when the delivery positions have a material number. delivery item category is 'DLN' (=standard).
    but i can´t create an outbound delivery with positions which have no material number. delivery itemcateory is 'DLTX' (= text positions without an material number.
    currently i use a batch input programm which simulates VL01NO. But i want to change this.
    can someone please help me how to create an outbound delivery without reference and only with text positions?
    thank you.

    Hi Gurus, is there any function module / Bapi that updates the BOL in a outbound delivery  header created for a sales order

  • Error Message V1810 - Make to Order No Change delivery plant in Sales Order

    Hello, for a client where I'm setting the flow intercompany , but i have  an error on the Sales Order when I must be change delivery plant.
    Scenario: Make to Order, Product configuration, Sales Order BOM created by  CS60
    Step:
    1 - I create sales order fo company X delivery plant 1000
    2 - Creates Order BOM on plant 2000 Company Y
    3 - creates MRP Planned Order
    4 - Convert Planned Order to Production Order
    For different issues can happen that you decide to ship the goods to a different plant than the X. Production Plant remains 2000.
    If I try to change the plant on the Order system stops me with the following error:
    Message V1810 - Plant can no longer be changed
    Diagnosis
    The plant can no longer be changed in the Following situations:
    The item has been assigned to a project.
    There is a production order for the order item but it is not a staticassembly order.
    Already have accrued costs.
    For the very complex structure of the product I can not delete the production order and sales order BOM.
    How do I handle these cases?
    Can anyone help me?
    Best regards
    Giuseppe

    Hi Guiseppe,
    can you please answer some questionsa to understand your requirement.
    if you want to transfer the goods from plant to plant you can do it through Stcok transfer MB1B t code.
    1.then why you want to change the plant? in which element you are trying to do in sales order or production order?
    2.you mention it as intercompany and MTO can you be clear for whoom you got the sales order(internal or External Customer?

Maybe you are looking for

  • Server 2012 R2 - "Access is denied." error

    so this has been happening ever since i've installed Windows updates on our accounting server(windows server 2012 r2), and upgraded the RAM on the VM server(all these Server 2012 R2's are hosted on a VMware 5.5, client & server) . Sometimes, when try

  • DMS Documents cannot be created

    Hello DMS Gurus I am working on DMS module.Previously on my P.C. ,  files which are attached in the DMS (Created From CV01N) can be opened easily ( PDF files,Excel, Word files). But some time ago my P.C. was formatted & now I have installed WINDOWS 7

  • BPM Process is not started

    Hi All, I defined an Integration Process which is triggered by an Asynchronous message (Receive step with "start process" checked). The trigerring message is sent through the HTTP Adapter (See: http://help.sap.com/saphelp_nw04/helpdata/en/82/f4993c03

  • Can't download new Version of Adobe Flash player.

    I keep getting a message "Blocked Plug-in" anytime I download a video.  Then a screen tells me to download an updated version from the Adobe website.  But after pushing download button the download does not work.  What can I do to get this problem co

  • Colorsync

    Hello, sorry if this is the wrong thread, I thought printing discussion is the right place to discuss about color management ... So, the question: does anybody know what the colorsync utility is doing when "Applying" a color profile ? I do understand