Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

BAPI_GOODSMVT_CREATE (Type: 261) withdrawal qty not updated

Dear All,

I am calling BAPI_GOODSMVT_CREATE (Goods Issue: 261) to issue goods to production order. No error returned from the function and unrestricted use stocks are reduced as expected. The only problem I have is that the withdrawal quantity for that material is not updated. (increased)

I also tried doing the same thing in MIGO -> Good Issue / Production Order and found no such problem.

Anyone know have any idea about this?

tks in advance

 l_input_code = '03'.
        l_input_header-pstng_date   = sy-datum.
        l_input_header-doc_date     = sy-datum.
        l_input_header-header_txt   = l_header_txt.

        LOOP AT t_report INTO w_report WHERE linecolor IS INITIAL AND iss_menge IS NOT INITIAL.

          CLEAR: l_input_item, l_input_sku.

          IF g_kdauf IS NOT INITIAL.
            l_input_item-spec_stock = 'E'.
            l_input_item-val_sales_ord = g_kdauf.    "Slaeas order no.
            l_input_item-val_s_ord_item = g_kdpos.    "Sale Order Item

          l_input_sku-matdoc_itm      = l_line.
          l_input_sku-grid_value      = w_report-j_3asize.  "Grid Value
          l_input_sku-move_grid_value = w_report-j_3asize.  "Grid Value
          l_input_sku-stock_cat       = w_report-j_4kscat.   "Stock Category
          l_input_sku-move_stock_cat       = w_report-j_4kscat_req.   "Stock Category
          APPEND l_input_sku.
          l_line = l_line + 1.

          l_input_item-orderid        = g_aufnr. "ORDER NUMBER
          l_input_item-move_type      = '261'. "Movement Type
          l_input_item-material       = w_report-matnr. "Material No.
          l_input_item-batch          = w_report-charg. "Batch
          l_input_item-entry_uom_iso  = w_report-meins. "Unit
          l_input_item-entry_qnt      = w_report-iss_menge. "New Qty
          l_input_item-entry_uom      = w_report-meins.
          l_input_item-plant          = w_report-werks.    "Plant
          l_input_item-stge_loc       = w_report-lgort.  "Location
          APPEND l_input_item.

                 goodsmvt_header               =   l_input_header
                 goodsmvt_code                 =   l_input_code
                 goodsmvt_headret              =   l_output_header
                 goodsmvt_item                 =   l_input_item
                 return                        =   l_output_return
                 afs_goodsmvt_sku              =   l_input_sku

Edited by: George Sung on Jan 21, 2010 10:49 AM

Former Member
Not what you were looking for? View more on this topic or Ask a question