ITPub博客

首页 > 应用开发 > IT综合 > BAPI的程序框架

BAPI的程序框架

原创 IT综合 作者:mmccking 时间:2007-07-20 22:45:23 0 删除 编辑
BAPI的程序框架[@more@]

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

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/8356764/viewspace-927276/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 实用的SQL语句~!
下一篇: BAPI
请登录后发表评论 登录
全部评论
风太大,吹乱了我的头发~

注册时间:2008-03-11

  • 博文量
    94
  • 访问量
    403024