发表于:2007.07.20 22:45
分类: 一般分类
出处:http://mmccking.itpub.net/post/33129/311092
---------------------------------------------------------------
Log on
(Source code)
Call BAPI
(Source code)
Call BAPI
(Source code)
Call BAPI BapiService.TransactionCommit() (Source code)
Call BAPI
(Source code)
Call BAPI
(Source code)
Call BAPI BapiService.TransactionCommit() (Source code)
Log off
5 相关函数
'BALW_BAPIRETURN_GET2':取生成返回消息
CALL FUNCTION 'BALW_BAPIRETURN_GET2'
EXPORTING
TYPE = 'E'
CL = 'BC_BOR'
NUMBER = 163
PAR1 = MSG1_HLP
PAR2 = MSG2_HLP
IMPORTING
RETURN = RETURN.
BAPI_TRANSACTION_COMMIT 和 API_TRANSACTION_ROLLBACK: BAPI事务函数
BUFFER_SUBSCRIBE_FOR_REFRESH和BUFFER_REFRESH_ALL: 缓冲区处理函数
'TRANSACTION_BEGIN ,'TRANSACTION_STATUS' 和'TRANSACTION_END' 的调用示例
call function 'TRANSACTION_BEGIN' "94702/KB
importing "94702/KB
transaction_id = transaction_id "94702/KB
exceptions "94702/KB
others = 1. "94702/KB
call function 'BAPI_PO_CREATE' "94702/KB
exporting "94702/KB
po_header = po_head "94702/KB
importing "94702/KB
purchaseorder = h_ebeln "94702/KB
tables "94702/KB
po_items = po_item "94702/KB
po_item_schedules = po_sched "94702/KB
po_item_account_assignment = po_acct "94702/KB
po_item_text = po_text "94702/KB
return = return "94702/KB
exceptions "94702/KB
others = 0. "94702/KB
call function 'TRANSACTION_STATUS' "94702/KB
importing "94702/KB
status = status_of_transaction "94702/KB
exceptions "94702/KB
others = 1. "94702/KB
if status_of_transaction = commit_work. "94702/KB
commit work and wait. "94702/KB
endif. "94702/KB
call function 'TRANSACTION_END' "94702/KB
exporting "94702/KB
transaction_id = transaction_id "94702/KB
exceptions "94702/KB
others = 1. "94702/KB






