登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

原来为了你

我的人生就是要一次次的超越

 
 
 

日志

 
 
 
 

BAPI_GOODSMVT_CREATE 创建入库单(MIGO)  

2011-04-24 14:36:16|  分类: BAPI |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
  report   z_test_bapi_migo.

*---Data Define for BAPI
datagoodsmvt_header  type   bapi2017_gm_head_01,
      goodsmvt_code    type   bapi2017_gm_code,
      goodsmvt_headret type   bapi2017_gm_head_ret,
      materialdocument type   bapi2017_gm_head_ret-mat_doc,
      matdocumentyear  type   bapi2017_gm_head_ret-doc_year,
      goodsmvt_item    type standard table of   bapi2017_gm_item_create,
      w_goodsmvt_item  type                     bapi2017_gm_item_create,
      return           type standard table of   bapiret2,
      w_return         type   bapiret2.

goodsmvt_header-pstng_date  sy-datum.
goodsmvt_header-doc_date    sy-datum.
goodsmvt_code               '01'.

cleargoodsmvt_headret,materialdocument,matdocumentyear,return.

w_goodsmvt_item-plant       =  '1001'.          "工厂
w_goodsmvt_item-stge_loc    =  '1000'.          "库存地点
w_goodsmvt_item-move_type   =  '101'.           "移动类型
w_goodsmvt_item-entry_qnt   =  '100'.           "数量
w_goodsmvt_item-entry_uom   =  'KG'.            "单位
w_goodsmvt_item-po_number   =  '4500000593'.    "采购订单
w_goodsmvt_item-po_item     =  '00010'.         "行项目号
w_goodsmvt_item-mvt_ind     =  'B'.             "移动标识
w_goodsmvt_item-batch       =  '20100101'.      "批次
append w_goodsmvt_item to goodsmvt_item.

*---Call BAPI Function
call function 'BAPI_GOODSMVT_CREATE'
  exporting
    goodsmvt_header  goodsmvt_header
    goodsmvt_code    goodsmvt_code
  importing
    goodsmvt_headret goodsmvt_headret
    materialdocument materialdocument
    matdocumentyear  matdocumentyear
  tables
    goodsmvt_item    goodsmvt_item
    return           return.
*---Write Docuemnt or Error message
if materialdocument is not initial.
  call function 'BAPI_TRANSACTION_COMMIT'.
  write:/ materialdocument.
else.
  loop at return into w_return.
    write:/ w_return-type,
            w_return-id,
            w_return-number,
            w_return-message.
  endloop.
endif.
  评论这张
 
阅读(2100)| 评论(0)

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2018