ABAP顾问
分类:
2010-10-18 23:09:29
REPORT z_barry_test.
DATA: header LIKE bapi2017_gm_head_01,
code LIKE bapi2017_gm_code,
return LIKE bapiret2 OCCURS 0 WITH HEADER LINE,
item LIKE bapi2017_gm_item_create OCCURS 0 WITH HEADER LINE,
ret_doc LIKE bapi2017_gm_head_ret.
START-OF-SELECTION.
CLEAR: header,code,item,item[],return.
header-pstng_date = sy-datum.
code-gm_code = '04'.
item-material = '2102010182'.
item-plant = '1120'.
item-stge_loc = '1711'.
item-move_type = '411'.
item-spec_stock = 'K'.
item-vendor = '0002511006'.
item-entry_qnt = 12.
APPEND item.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = header
goodsmvt_code = code
IMPORTING
goodsmvt_headret = ret_doc
TABLES
goodsmvt_item = item
return = return.
COMMIT WORK AND WAIT.
chinaunix网友2010-10-19 20:29:24
很好的, 收藏了 推荐一个博客,提供很多免费软件编程电子书下载: http://free-ebooks.appspot.com