Need a BAPI to upload "Number of packages" for outbound delivery in VL02N

Hi,
I need a BAPI which can change data into field LIKP-ANZPK (Number of packages) for outbound delivery with tcode VL02N.
I saw BAPI_OUTB_DELIVERY_CHANGE but don't know what to parameter to fill.
Can anyone help me?
Tarick.

This solution is in kzapk and kzntg.
Example:
CLEAR ls_vbkok.
     ls_vbkok-vbeln_vl  = <ls_created>-document_numb.
     ls_vbkok-vbtyp_vl  = <ls_created>-document_category_sd.
     ls_vbkok-anzpk     = id_volum.
     ls_vbkok-kzapk  = 'X'.
     ls_vbkok-kzntg  = 'X'.
     ls_vbkok-wabuc  = 'X'.
     CALL FUNCTION 'WS_DELIVERY_UPDATE_2'
       EXPORTING
         vbkok_wa       = ls_vbkok
         update_picking = 'X'
         synchron       = 'X'
         commit         = 'X'
         delivery       = <ls_created>-document_numb
       IMPORTING
         ef_error_any   = ld_error.

Similar Messages

  • BAPI for GR for Outbound delivery

    Hi Gurus,
       I need to create a Goods Receipt against an Outbound Delivery ( movement type "101" ) using the BAPI BAPI_GOODSMVT_CREATE
    user is using MIGO transaction for the same. There he will choose the GOODS RECEIPT for OUTBOUND DELIVERY and enters the delivery number. The movement type "101" is used.
    I tried passing gm_code = 01 and mvt_type = 101 and mvt indicator as u2018Bu201D , but  Iu2019m getting an error message  'ENTER PURCHASE ORDER NUMBER'.
    I donu2019t have PO number . I just have shipment number from which I have found open outbound deliveries and now I need to do GR for each of the Outbound delivery.
    Please let me know if Iu2019m passing the right gm_code and mvt indicator to the BAPI or if Iu2019m missing any parameters. Iu2019m passing the following parameters to the BAPI ?
    Delivery. No. , delivery item, Doc. Date , Posting Date , ref document num , Quantity, Storage Location, External qty, External qty unit, matnr, werks .
    Your help is greatly appreciated.
    Thanks in advance.

    Thanks for replying. I went through the entire BAPI documentation but did not found anything related to GR for outbound deliveries.
    I searched some older posts in sdn related to this problem but almost all are unanswered question.
    I'm passing gm_code = 01 , mvt_type = 101 and have tried all movement indicator like 'B' , 'F' and blank.
    here is what I'm passing in my Bapi.Please let me know if I'm missing something or if I'm passing something incorrectly.
    gm_header-pstng_date = sy-datum.
          gm_header-doc_date   = sy-datum.
          gm_header-ref_doc_no =  wa_lips-vbeln. "The Outbound delivery Number
          gm_code-gm_code      = '01'.
         MOVE '101'              TO     gm_item-move_type.
          gm_item-material             = wa_lips-matnr . "Material Number from the Delivery.
          gm_item-plant                = wa_lips-werks . "Receiving Site.
          gm_item-stge_loc             = wa_lips-lgort. "Receiving Storage Location.
          gm_item-entry_qnt            = wa_lips-lfimg.
         gm_item-entry_uom           = wa_lips-vrkme.
          gm_item-ENTRY_UOM_ISO        = wa_lips-vrkme.
          gm_item-mvt_ind              = 'B ' .
          gm_item-deliv_numb           = wa_lips-vbeln.
          gm_item-deliv_item           = wa_lips-posnr.
          gm_item-DELIV_NUMB_TO_SEARCH = wa_lips-vbeln.  "delivery number
          gm_item-DELIV_ITEM_TO_SEARCH = wa_lips-posnr. "delivery item
    if I donot pass any value in mvt indicator the error I'm getting is 'Update control of movement type is incorrect (entry 101 X X)'
    if I pass 'B' in mvt indicator error is 'Material document data and PO data do not match (Plant)'
    if i pass 'F' , erro ris 'Order  not found or not permitted for goods movement'.
    Please help me. This is kind of critical issue. or please suggest if I can do GR for outbound delv in any other way.
    Thanks...!!!!

  • Error while doing PGI for Outbound delivery using BAPI BAPI_GOODSMVT_CREATE

    Hi All,
    I am getting an below error while doing PGI for outbound delivery using the BAPI BAPI BAPI_GOODSMVT_CREATE:
    Goods movement not possible with mvmt type 601
    Can anyone suggest me what will be the solution for it?
    Regards,
    Raghuraman.k

    I tried with the above BAPI but it is not working.
    In my case a delivery has one line item with batch split and other line item without batch split.
    Below is my code :
    DATA : gwa_header_data TYPE bapiobdlvhdrcon,
           gwa_header_ctrl TYPE bapiobdlvhdrctrlcon,
           lv_delivery     TYPE bapiobdlvhdrcon-deliv_numb,
           git_item_data TYPE STANDARD TABLE OF bapiobdlvitemcon,
           gwa_item_data TYPE bapiobdlvitemcon,
           git_item_ctrl TYPE STANDARD TABLE OF bapiobdlvitemctrlcon,
           gwa_item_ctrl TYPE bapiobdlvitemctrlcon,
           git_return    TYPE STANDARD TABLE OF bapiret2,
           gwa_return    TYPE bapiret2.
    *Header data
    gwa_header_data-deliv_numb = '0808000002'.
    *Header Control data
    gwa_header_ctrl-deliv_numb = '0808000002'.
    gwa_header_ctrl-post_gi_flg = 'X'.
    *Delivery Number
    lv_delivery = '0808000002'.
    *Item data and its corresponding control data
    gwa_item_data-deliv_numb      = '0808000002'.
    gwa_item_data-deliv_item      = '900002'.
    gwa_item_data-dlv_qty         = 4.
    gwa_item_data-dlv_qty_imunit  = 4.
    gwa_item_data-fact_unit_nom   = 1.
    gwa_item_data-fact_unit_denom = 1.
    APPEND gwa_item_data TO git_item_data.
    gwa_item_ctrl-deliv_numb      = '0808000002'.
    gwa_item_ctrl-deliv_item      = '900002'.
    gwa_item_ctrl-chg_delqty      = 'X'.
    APPEND gwa_item_ctrl TO git_item_ctrl.
    gwa_item_data-deliv_numb      = '0808000002'.
    gwa_item_data-deliv_item      = '900003'.
    gwa_item_data-dlv_qty         = 6.
    gwa_item_data-dlv_qty_imunit  = 6.
    gwa_item_data-fact_unit_nom   = 1.
    gwa_item_data-fact_unit_denom = 1.
    APPEND gwa_item_data TO git_item_data.
    gwa_item_ctrl-deliv_numb      = '0808000002'.
    gwa_item_ctrl-deliv_item      = '900003'.
    gwa_item_ctrl-chg_delqty      = 'X'.
    APPEND gwa_item_ctrl TO git_item_ctrl.
    gwa_item_data-deliv_numb      = '0808000002'.
    gwa_item_data-deliv_item      = '000020'.
    gwa_item_data-dlv_qty         = 10.
    gwa_item_data-dlv_qty_imunit  = 10.
    gwa_item_data-fact_unit_nom   = 1.
    gwa_item_data-fact_unit_denom = 1.
    APPEND gwa_item_data TO git_item_data.
    gwa_item_ctrl-deliv_numb      = '0808000002'.
    gwa_item_ctrl-deliv_item      = '000020'.
    gwa_item_ctrl-chg_delqty      = 'X'.
    APPEND gwa_item_ctrl TO git_item_ctrl.
    BREAK-POINT.
    CALL FUNCTION 'BAPI_OUTB_DELIVERY_CONFIRM_DEC'
      EXPORTING
        header_data    = gwa_header_data
        header_control = gwa_header_ctrl
        delivery       = lv_delivery
      TABLES
        item_data      = git_item_data
        item_control   = git_item_ctrl
        return         = git_return.
    BREAK-POINT.
    IF git_return IS INITIAL.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    ENDIF.

  • Change Ship to party number for outbound delivery

    Hi guys
    I have a problem 
    We need to change Ship to party number for outbound delivery
    Any suggestions
    Any Table level changes posibility???
    Thanks
    SAP MM

    Hi,
    You cannot change the ship to party in delivery, nor should you change it.
    If you really want to change the SH in delivery, please delete the delivery (after cancelling the picking) and then go to sales order in change mode and then change the ship to party there. After doing this, create the delivery once again with the new SH.
    It is not advisable even through programatically to change SH in delivery. This will have lot of implications in the further processes like PGI, Proof of Delivery and so on.

  • How to look for sales order number if I know outbound delivery number?

    How to look for sales order number if I know outbound delivery number?

    Hi ,
        If you want to see the Sales order Number from Outbound delivery or invoice,go to their respective T-codes,say for example,
    for delivery,Goto Tcode: VL02N / VL03N.There you will find Document Flow Icon,click on that,or press F7.
    You will get a window,there you can see the Sales order Number before your outbound delivery Number
    With Thanks and Regards,
    Priya

  • BAPI for posting equivalent of MIGO GR (101) for OUTBOUND DELIVERY (R05)

    Hi everyone
    I am looking for a BAPI or function module to do the above; it is the second leg of an STO posting between plants, the first leg being where the goods issue is posted against the outbound delivery into in-transit stock (IM movement 641), with the second being to GR this stock with a 101, which will take it out of in-transit and into unrestricted stock at the destination plant.
    I have tried BAPI_GOODSMVT_CREATE from every angle but have come to the conclusion it does not cater for this. I also tried to do the GR against the STO (P/O) from which the delivery was created, but this does not work as the follow-on documents for the delivery will not be updated.
    Any suggestions?
    Thanks
    Andrew

    hi,
    i try to doing posting goods issue for outbound delivery out fo the regular progression.
    the posting is automaticly as part of outside program.
    thanks alot,

  • BAPI for Outbound Delivery Creation with reference to Sales Order - VL01N

    Hi Everybody,
           We are in ECC 5.0 version.
           I want to create a enhancement for Outbound Delivery Creation with reference to a Sales Order.
           Is any BAPI available for this ?
           Any input on this will be very much helpfull.
           Please suggest any BAPI available for this, or should I go for BDC using VL01N or VL04 ?
           Thanks in advance.
    regards,
    Nagarajan.J

    Hi Nagarajan,
    The BAPI BAPI_DELIVERYPROCESSING_EXEC meets your requirement. You can create delivery with reference to sales order.
    The below is the sample code...
      data:lt_request      like bapideliciousrequest
                                    occurs 0 with header line,
           lt_createditems like bapideliciouscreateditems
                                    occurs 0 with header line,
           lt_return       like bapiret2
                                    occurs 0 with header line.
        lt_request-document_type      = 'A'.
        lt_request-document_numb      = vbeln.
        lt_request-document_item      = posnr.
      lt_request-material           = matnr.
      lt_request-plant              = werks.
      lt_request-stge_loc           = lgort.
      lt_request-quantity_base__uom = base_uom_qty.
      lt_request-delivery_date      = sy-datum.
      append lt_request.
      call function 'BAPI_DELIVERYPROCESSING_EXEC'
      EXPORTING
        DELIVERY_EXTEND       =
        TECHN_CONTROL         =
        tables
          request               = lt_request
          createditems          = lt_createditems
          return                = lt_return.
      loop at lt_return where type = 'A'
                          or  type = 'E'.
        exit.
      endloop.
      if sy-subrc <> 0.
    Use the BAPI for Commit
        call function 'BAPI_TRANSACTION_COMMIT'
             exporting
                  wait = 'H'.
      endif.
    Thanks
    Ramakrishna

  • BAPI for Outbound Delivery Creation with reference to Sales Order

    Dear all,
    I'm on R/3 4.6B platform and to develop an RFC for outbound Delivery creation instead of using the standard VL01N transaction.
    I've review BAPI for Outbound Delivery Creation with reference to Sales Order - VL01N thread which suggest BAPI_DELIVERYPROCESSING_EXEC .
    However, in 4.6B, that function module doesn't exist. Appreciate any suggestion and or workaround.
    Thanks.
    Steven
    Edited by: Steven Khoo on Mar 25, 2010 7:13 AM
    Edited by: Steven Khoo on Mar 25, 2010 7:14 AM

    Not required anymore

  • BAPI for outbound delivery without order reference???????????????????

    hello folks
    i want to a bapi for transaction <b>VL01NO</b>. this transaction is used for creating outbound delivery <b>wihtout a order reference</b>. I did a search but was not able to find a bapi pls help.

    Hi,
    Could you please send me the sample code for BAPI_DELIVERYFREE_PROXY_CREATE? I am using the IDOC for outbound delivery w/o order reference. I didnt find any standard process code for this..
    Any suggestions on the same??
    Thanks,
    Prasad

  • How to find Number of package for a Billing Document

    Hi,
    I have a requirement in that i need to print the number of packages used for a particular billing. Please tell me the tables and fields in which i get this?
    Thanks and regards,
    Ezhil.

    If your billing document is created with reference to the Delivery, then check the field LIKP-ANZPK.
    Regards
    Vinod

  • BAPI for outbound delivery without order reference - VL01NO

    Hi ,
    I need a BAPI to create a outbound delivery without a Order reference ( transaction VL01NO ). Please provide the BAPI. Sample code will be helpful.
    Thanks,
    R~

    Hi,
    Following is the sample code for creation of outbound delivery Using BAPI 'BAPI_DELIVERYPROCESSING_EXEC'
    Which may be helpful.
    PARAMETERS: p_vbeln LIKE vbak-vbeln.
    DATA: BEGIN OF t_vbap OCCURS 0,
    vbeln LIKE vbap-vbeln,
    posnr LIKE vbap-posnr,
    kwmeng 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 kwmeng matnr werks
    INTO TABLE t_vbap
    FROM vbap
    WHERE vbeln = p_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-kwmeng.
    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.
    READ TABLE t_created INDEX 1.
    WRITE: / 'Delivery ', t_created-document_numb, ' created'.
    Let me know if any issues.
    Thanks & Regards,
    Naveen

  • BAPI or FM for Outbound delivery

    Dear Experts,
    We are in SAP 4.6C  and facing problem in creating outbound delivery against Sales Order, requirement is
    1. Create Outbound delivery against Sales Order where we need to change quantities and batches against Sales Order line items
    e.g. Sales Order may contain details as :
    Item 10    Product X1   Batch B1   Qty 10
    Item 20    Product X2   Batch B2   Qty 15
    We need to create delivery against above Sales Order line item with details as under:
    Item 10    Product X1   Batch B1   Qty 9
    Item 20    Product X2   Batch B2   Qty 7
    or in other case
    Item 10    Product X1   Batch B4   Qty 8
    Item 20    Product X2   Batch B3   Qty  7
    2. After Creating Outbound delivery with correct quantities we need to Post Goods Issue (PGI)
    again i am finding difficulty in finding a BAPI or FM to do this,
    other possible option could be a BDC
    Please suggest on any / both of these things (Please remember we are in 4.6C)
    Regards
    Dheeraj

    HI...
    Check this thread
    FM/BAPI  to create  Outbound Delivery  with  sales order  refference
    Even check this FM
    BAPI_OUTB_DELIVERY_CREATE_SLS
    BAPI_OUTB_DELIVERY_CREATE_STO
    Edited by: avinash kodarapu on Nov 30, 2008 1:14 AM

  • Using BAPI for outbound delivery processing "BAPI_DELIVERYPROCESSING_EXEC"

    Hi all,
    I am using this bapi "BAPI_DELIVERYPROCESSING_EXEC" for Outound delivery processing. But How can I use this BAPI for Batch Split functionality. Because Here we have to enter batch also while processing outbound delivery with reference to Sales Order. Please reply anyone on high priority
    Regards,
    Venkat
    Ph: 9990417848

    Hi,
    When u r using BAPI then include in it this batch Split fnality like do the recording in SHDB and transfer recording and in this recording record the batch split.
    Also what u can do is create a BDC and include the std bapi with this batch split in it.
    Regards
    Krishna

  • BAPI  for Outbound Delivery

    Hi All,
    Is there any BAPI for creation of Outbound Delivery? If yes, please specify the BAPI and source code if any...Thank you!
    Regards,
    Mackoy

    data:lt_request like bapideliciousrequest
    occurs 0 with header line,
    lt_createditems like bapideliciouscreateditems
    occurs 0 with header line,
    lt_return like bapiret2
    occurs 0 with header line.
    if px_infile-type = 'PO' .
    lt_request-document_type = 'B'.
    lt_request-document_numb = x_infile-ebeln.
    lt_request-document_item = x_infile-posnr.
    else.
    lt_request-document_type = 'A'.
    lt_request-document_numb = x_infile-vbeln.
    lt_request-document_item = x_infile-posnr.
    endif.
    lt_request-material = x_infile-matnr.
    lt_request-plant = x_infile-werks.
    lt_request-stge_loc = x_infile-lgort.
    lt_request-quantity_base__uom = x_infile-base_uom_qty.
    lt_request-delivery_date = sy-datum.
    append lt_request.
    call function 'BAPI_DELIVERYPROCESSING_EXEC'
    EXPORTING
    DELIVERY_EXTEND =
    TECHN_CONTROL =
    tables
    request = lt_request
    createditems = lt_createditems
    return = lt_return.

  • Is there any bapi to upload c/s value for a material  in MRP3 view.

    Hello Expert
    Is there any bapi available to change material and upload the characteristic values in its MRP3 view? I want to change material and assign values for characteristic, I got one bapi /SAPMP/BAPI_MATERIAL_SAVEDATA which change material.. but I donu2019t know how to use it.. i.e. how to set c/s vales in MRP3 view. plz help.
    -Shweta

    Hi
    Check the BAPI
    <b>BAPI_CHARACT_CREATE</b>
    <b>Reward points for useful Answers</b>
    Regards
    Anji

Maybe you are looking for

  • Backup from XP - Windows 7 - not all albums can be added

    Hi guys, First time poster, so go easy on me. It was my birthday last week, and ended up getting an Ipad bought for me. For the last 3 years i have used I tunes on my old xp tower, but its very old, very slow, and while it is ok for adding the odd tr

  • Text is pasted as image

    Hi, I need an urgent help help. I'm working in bilingual (english and thai) website. Now that i started to work on thai version something really strange is happing. When I copy the thai text from my .doc or any other place, the FW pasted as bitmap! I

  • How to use Java with PL/SQL commands to send an email with attachment

    Apologizes in advance if this is the wrong place to ask the question. I need to use Java with PL/SQL commands to send an email with attachment. My java application runs from the command line and does some magic to gather info from an Oracle 11g db. I

  • Sharpening brush in exported file

    I  have a problem with sharpen brush. It seems I lost it exporting version vs jpeg or tiff. I  used it strongly in a portion of the image just to try and  in exported file is missing. I have read about viewing at 100% etc, but I need to view the same

  • SGEN and Patch Problem

    Hi,    Our ECC 5.0 Development system was last updated in january with stack 13 and know we are planning to upgrade it to stack 16. The problem is that there are some objects left to be generated after the last stack upgrade. Know when I just hit SGE