宁静致远,澹泊明志------ The Devil's Advocate
自我介绍
切换风格
订阅我的Blog
博客日历
文章归档...
最新发表...
博客统计...
网站链接...
资源
===========================================================
BAPI的程序框架
===========================================================
BAPI的程序框架

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

mmccking 发表于:2007.07.20 22:45 ::分类: ( 一般分类 ) ::阅读:(152次) :: 评论 (0) :: 引用 (0)

发表评论
标题

在此添加评论

称呼

邮箱地址(可选)

个人主页(可选)