{"id":7511,"date":"2025-08-19T18:46:50","date_gmt":"2025-08-19T13:16:50","guid":{"rendered":"https:\/\/www.sapewmhelp.com\/?post_type=question&#038;p=7511"},"modified":"2025-08-19T18:46:51","modified_gmt":"2025-08-19T13:16:51","slug":"change-delivery-quantity-and-pick-quantity-in-sap","status":"publish","type":"question","link":"https:\/\/www.sapewmhelp.com\/?question=change-delivery-quantity-and-pick-quantity-in-sap","title":{"rendered":"Change Delivery Quantity and Pick Quantity in SAP"},"content":{"rendered":"\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>DATA ls_header  TYPE bapiobdlvhdrchg.\nDATA ls_ctrl    TYPE bapiobdlvhdrctrlchg.\nDATA lv_delivery   TYPE vbeln_vl.\nDATA lt_item     TYPE STANDARD TABLE OF bapiobdlvitemchg.\nDATA lt_itemctrl TYPE STANDARD TABLE OF bapiobdlvitemctrlchg.\nDATA gt_retn     TYPE STANDARD TABLE OF bapiret2.\nDATA ls_item     TYPE bapiobdlvitemchg.\nDATA ls_itemctrl TYPE bapiobdlvitemctrlchg.\nDATA ls_retn     TYPE bapiret2.\nDATA ls_lips       TYPE lips.\n\nCALL FUNCTION &#39;CONVERSION_EXIT_ALPHA_INPUT&#39;\n  EXPORTING\n    input  = &#39;8400012446&#39;\n  IMPORTING\n    output = lv_delivery.\n\n&quot;header\nls_header-deliv_numb = lv_delivery.\n\n&quot;header control\nls_ctrl-deliv_numb = lv_delivery.\n\n&quot;items\nCLEAR ls_item.\nls_item-deliv_numb = lv_delivery.\nls_item-dlv_qty    = &#39;9&#39;.\n\nSELECT SINGLE * FROM lips INTO ls_lips\n  WHERE vbeln = ls_item-deliv_numb.\nIF sy-subrc = 0.\n  ls_item-fact_unit_nom   = ls_lips-umvkz.\n  ls_item-fact_unit_denom = ls_lips-umvkn.\n  ls_item-conv_fact       = ls_lips-umrev.\n  ls_item-deliv_item      = ls_lips-posnr.\n  ls_item-sales_unit      = ls_lips-vrkme.\nENDIF.\nAPPEND ls_item TO lt_item.\n\n&quot;item control\nls_itemctrl-deliv_numb = lv_delivery.\nls_itemctrl-deliv_item = ls_item-deliv_item.\nls_itemctrl-chg_delqty = &#39;X&#39;.\nAPPEND ls_itemctrl TO lt_itemctrl.\n\nCALL FUNCTION &#39;BAPI_OUTB_DELIVERY_CHANGE&#39;\n  EXPORTING\n    header_data    = ls_header\n    header_control = ls_ctrl\n    delivery       = lv_delivery\n  TABLES\n    item_data      = lt_item\n    item_control   = lt_itemctrl\n    return         = gt_retn.\nREAD TABLE gt_retn INTO ls_retn WITH KEY type = &#39;E&#39;.\nIF sy-subrc = 0.\n  &quot;Error handling\nELSE.\n  CALL FUNCTION &#39;BAPI_TRANSACTION_COMMIT&#39;\n    EXPORTING\n      wait = &#39;X&#39;.<\/code><\/pre><\/div>\n\n\n\n<p>BAPI Function Module <strong>BAPI_OUTB_DELIVERY_CHANGE<\/strong> is being used to update the delivery Quantity and Pick Quantity, Above code demonstrate the code to do the same.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","question-category":[158],"question_tags":[178,340,343,177,341,342],"class_list":["post-7511","question","type-question","status-publish","hentry","question-category-abap","question_tags-abap","question_tags-bapi_outb_delivery_change","question_tags-change-delivery","question_tags-sap","question_tags-update-delivery-quantity","question_tags-update-pick-quantity-in-delivery"],"_links":{"self":[{"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=\/wp\/v2\/question\/7511","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=\/wp\/v2\/question"}],"about":[{"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=\/wp\/v2\/types\/question"}],"author":[{"embeddable":true,"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7511"}],"wp:attachment":[{"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7511"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fquestion-category&post=7511"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fquestion_tags&post=7511"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}