A %B4%F3%CD%AC%C8%CB%CB%EF%B9%DA%BB%AA%C9%B6%C8%CB%B0%A1%A3%BF Cs.adxpansion.com

Hotguyguide Hot Guy Guide En 2012 02 17 Presidents Day Wealth Photos N 1284666 Hot Guy Guide 黃金隧道 | BAPI_GOODSMVT_CREATE to post Goods Movement

Hotguyguide Hot Guy Guide En 2012 02 17 Presidents Day Wealth Photos N 1284666 Hot Guy Guide



Hotguyguide 1284666 蛃earch 2012
search searchaysearchq Wealth Guide 0 Guy 2searchyo Wealth 2 Guide 1 五月 2012 »
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
文章归档...
六月 2009(2篇)
五月 2009(3篇)
四月 2009(11篇)
三月 2009(5篇)
二月 2009(7篇)
一月 2009(1篇)
十二月 2008(2篇)
十一月 2008(51篇)
十月 2008(39篇)
九月 2008(1篇)
八月 2008(1篇)
六月 2008(1篇)
五月 2008(13篇)
四月 2008(30篇)
三月 2008(10篇)
二月 2008(16篇)
一月 2008(46篇)
十二月 2007(82篇)
十一月 2007(19篇)
十月 2007(11篇)
九月 2007(7篇)
八月 2007(10篇)
七月 2007(1篇)
六月 2007(1篇)
五月 2007(19篇)
四月 2007(9篇)
最新发表...
国际金融作业二答案
国际金融作业一答案
一个显示图标的ABAP例子
有关IDoc的一些东西
每日一函数(2009/05/03)
根据税码取得税率函数
從字串中的第n位開始取l長度的子字串
取字串右邊指定長度的子字串
取字串左邊指定長度的子字串
自己写的截取小数位的函数
每日一函数(2009/04/28)
维护采购单与信息记录的的联系
如何设定最小包装
有关SAP中的批次管理
GUI_PICTURE以及context_menu学习笔记
ALV Tree的使用方法
C#反射(System.Reflection )
C#将自己的程序添加到右键菜单
Visual C# 快捷键
C#控制只能程序运行一个
C#网络编程经典代码
禁用系统帐号(USER_INFO_1008)的实例
判断当前用户是否为系统管理员的实例
检验系统帐号是否存在的实例
获取系统帐户密码周期的实例
用VB写的一个组件,实现添加系统用户,并添加到指定组
API在VB中应用技巧2
API在VB中应用技巧1
09年1月份銀行貨幣學考試重點復習資料及答案
Client之间的复习操作
货币银行学--多项选择
Javascript实现自动滚屏功能
鼠标跟踪时钟效果
JavaScrip实现倒计时功能
每日一函数(2008/11/28)
《成本管理》判断题
How to use CONCATENATE
成本管理习题
SAP常用的快捷键
每日一函数(2008/11/19)
几个常用tcode的用法
如何创建可维护的后台配置功能
《企业信息管理》期末练兵综合测试题
采购订单中税额的计算方法
SAP标准名词
每日一函数(2008/11/16)
《企业信息管理》形成性作业答案
公司概论练习四
公司概论练习三
公司概论练习二
博客统计...
总文章数: 398
总评论数: 161
总引用数: 0
总浏览数: 2429769
网站链接...
资源
Powered by:
Blog Provider:
Designed by:
===========================================================
BAPI_GOODSMVT_CREATE to post Goods Movement
===========================================================
作者: tolyhuang(> 发表于:2007.11.26 11:48
分类: SAP
出处:post/29951/418093
---------------------------------------------------------------
The following is an abap program making used of the BAPI function BAPI_GOODSMVT_CREATE to do Goods Receipts for Purchase Order after importing the data from an external system.
* BAPI TO Upload Inventory Data
*
* GMCODE Table T158G - 01 - MB01 - Goods Receipts for Purchase Order
* 02 - MB31 - Goods Receipts for Prod Order
* 03 - MB1A - Goods Issue
* 04 - MB1B - Transfer Posting
* 05 - MB1C - Enter Other Goods Receipt
* 06 - MB11
*
* 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
*
report zbapi_goodsmovement.

parameters: p-file like rlgrap-filename default
'c:sapdataTEST.txt'.
parameters: e-file like rlgrap-filename default
'c:sapdatagdsmvterror.txt'.

parameters: xpost like sy-datum default sy-datum.

data: begin of gmhead.
include structure bapi2017_gm_head_01.
data: end of gmhead.

data: begin of gmcode.
include structure bapi2017_gm_code.
data: end of gmcode.

data: begin of mthead.
include structure bapi2017_gm_head_ret.
data: end of mthead.

data: begin of itab occurs 100.
include structure bapi2017_gm_item_create.
data: end of itab.

data: begin of errmsg occurs 10.
include structure bapiret2.
data: end of errmsg.

data: wmenge like iseg-menge,
errflag.

data: begin of pcitab occurs 100,
ext_doc(10), "External Document Number
mvt_type(3), "Movement Type
doc_date(8), "Document Date
post_date(8), "Posting Date
plant(4), "Plant
material(18), "Material Number
qty(13), "Quantity
recv_loc(4), "Receiving Location
issue_loc(4), "Issuing Location
pur_doc(10), "Purchase Document No
po_item(3), "Purchase Document Item No
del_no(10), "Delivery Purchase Order Number
del_item(3), "Delivery Item
prod_doc(10), "Production Document No
scrap_reason(10), "Scrap Reason
upd_sta(1), "Update Status
end of pcitab.

call function 'WS_UPLOAD'
exporting
filename = p-file
filetype = 'DAT'
* IMPORTING
* FILELENGTH =
tables
data_tab = pcitab
* EXCEPTIONS
* FILE_OPEN_ERROR = 1
* FILE_READ_ERROR = 2
* NO_BATCH = 3
* GUI_REFUSE_FILETRANSFER = 4
* INVALID_TYPE = 5
* OTHERS = 6
.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
exit.
endif.

gmhead-pstng_date = sy-datum.
gmhead-doc_date = sy-datum.
gmhead-pr_uname = sy-uname.
gmcode-gm_code = '01'. "01 - MB01 - Goods Receipts for Purchase Order

loop at pcitab.
itab-move_type = pcitab-mvt_type.
itab-mvt_ind = 'B'.
itab-plant = pcitab-plant.
itab-material = pcitab-material.
itab-entry_qnt = pcitab-qty.
itab-move_stloc = pcitab-recv_loc.
itab-stge_loc = pcitab-issue_loc.
itab-po_number = pcitab-pur_doc.
itab-po_item = pcitab-po_item.
concatenate pcitab-del_no pcitab-del_item into itab-item_text.
itab-move_reas = pcitab-scrap_reason.

append itab.
endloop.

loop at itab.
write:/ itab-material, itab-plant, itab-stge_loc,
itab-move_type, itab-entry_qnt, itab-entry_uom,
itab-entry_uom_iso, itab-po_number, itab-po_item,
pcitab-ext_doc.
endloop.

call function 'BAPI_GOODSMVT_CREATE'
exporting
goodsmvt_header = gmhead
goodsmvt_code = gmcode
* TESTRUN = ' '
* IMPORTING
goodsmvt_headret = mthead
* MATERIALDOCUMENT =
* MATDOCUMENTYEAR =
tables
goodsmvt_item = itab
* GOODSMVT_SERIALNUMBER =
return = errmsg
.
clear errflag.
loop at errmsg.
if errmsg-type eq 'E'.
write:/'Error in function', errmsg-message.
errflag = 'X'.
else.
write:/ errmsg-message.
endif.
endloop.

if errflag is initial.
commit work and wait.
if sy-subrc ne 0.
write:/ 'Error in updating'.
exit.
else.
write:/ mthead-mat_doc, mthead-doc_year.
perform upd_sta.
endif.
endif.

*---------------------------------------------------------------------*
* FORM UPD_STA *
*---------------------------------------------------------------------*
* ........ *
*---------------------------------------------------------------------*
form upd_sta.
loop at pcitab.
pcitab-upd_sta = 'X'.
modify pcitab.
endloop.

call function 'WS_DOWNLOAD'
exporting
filename = p-file
filetype = 'DAT'
* IMPORTING
* FILELENGTH =
tables
data_tab = pcitab
* EXCEPTIONS
* FILE_OPEN_ERROR = 1
* FILE_READ_ERROR = 2
* NO_BATCH = 3
* GUI_REFUSE_FILETRANSFER = 4
* INVALID_TYPE = 5
* OTHERS = 6
.

endform.

tolyhuang 发表于:2007.11.26 11:48 ::分类: ( SAP ) ::阅读:(64023次) :: 评论 (39) :: 引用 (0)
svlqktAeMpby [回复]

and the cheap information The view U prescription ultram informationbathroom in purchase but abilities, xanax bar pictures, ohsc, xanax prescription, vloafv, buy xanax legally, otebl, xanax overdose fatal, =DDD, xanax half life in urine, %[[[, xanax dosage for anxiety, 774, generic xanax prices, =-[, xanax 500 micrograms, =))), what is xanax xr, uicndo, xanax bars information, cukqbv, xanax online overnight, 99643, what is xanax, qfhpb, xanax withdrawal stories, vdiafz, xanax withdrawal treatment, 572,

xanax overdose how many 评论于:2012.05.18 20:02
OyGjJeRWBXOHrDuxI [回复]
qHotguyguide Hot Guy Guide En 2012 02 17 Presidents Day Wealth Photos N 1284666 Hot Guy Guide 黃金隧道 | BAPI_GOODSMVT_CREATE to post Goods Movement d Dates zHotguyguide Hot Guy Guide En 2012 02 17 Presidents Day Wealth Photos N 1284666 Hot Guy Guide 黃金隧道 | BAPI_GOODSMVT_CREATE to post Goods Movement u Images