物料移动 BAPI_GOODSMVT_CREATE

这是一个神奇的BAPI,适用于很多很多的TCODE. MIGO MB1C MB1B ,MBST……(很多TCODE其实功能于MIGO重复,卡卡)

 

实例:http://blog.sina.com.cn/s/blog_4c66402b01012i7f.html

 CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
    EXPORTING
      goodsmvt_header  p_head    "凭证头
      goodsmvt_code    '04'    "移动类型
      testrun          p_test
    IMPORTING
      materialdocument p_mblnr  "返回 物料凭证号
      matdocumentyear  p_mjahr "返回 凭证年度
    TABLES
      goodsmvt_item    p_item  “输入 凭证项
      return           p_retu.

 

goodsmvt_code可取值:There are the following types of transactions/events: 见表 T158G

GM_Code 01: MB01 Goods receipt for purchase order (采购订单收货)

GM_Code 02: Mb31 Goods receipt for production order (生产订单收货)

GM_Code 03: MB1A Goods issue (发货)

GM_Code 04: MB1B  Transfer posting (库存转储)

GM_Code 05: MB1C  Other goods receipts (其他收货)

GM_Code 06: MB11 Reversal of goods movements (货物移动冲销)

GM_Code 07: MB04 Subsequent adjustment to a subcontract order (啥玩意?)

1. Use the Business Object Builder (Transaction SWO1) to enhance method IDocRange.GoodsReceiptExceptionHandle of BOR object type IDOCPUWB. First, this affects, the interface ('Parameters' pushbutton) to which the following two parameters have to be applied:

a) Parameter 'DelNoteQuantity', set the 'Import' flag, with dictionary reference, reference table IMSEG, reference field LSMNG

b) Parameter 'DeliveryNoteUnit', set the 'Import' flag, with dictionary reference, reference table IMSEG, reference field LSMEH

2. Second, the source code of this method has to be enhanced ('Program' pushbutton).

leecz(38408577) 14:30:40

* Domain: KZBEW - Movement Indicator

*      Goods movement w/o reference

* B - Goods movement for purchase order

* F - Goods movement for production order

* L - Goods movement for delivery note

* K - Goods movement for kanban requirement (WM - internal only)

* O - Subsequent adjustment of "material-provided" consumption

* W - Subsequent adjustment of proportion/product unit material

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值