BAPI的程式框架

mmccking發表於2007-07-20
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部落格 ” ,連結:http://blog.itpub.net/8356764/viewspace-927276/,如需轉載,請註明出處,否則將追究法律責任。

相關文章