資源事務處理匯入Demo

2021-06-23 05:44:48 字數 1827 閱讀 3917

--資源事務處理

--插入介面表之後,會有成本管理器來處理介面資料,不需要自己提交請求

--但這樣如果在程式包中處理的話,就沒法得到錯誤訊息了,目前只是指令碼使用

--成本管理器:inv->設定->事務處理->介面管理器

declare

l_iface_rec wip.wip_cost_txn_inte***ce%rowtype;

l_cur_mfg_org_id number := 683; --current inv organization

l_cur_mfg_org_code varchar2(240) := 'we1';

l_user_id number := 0; --user id, sysadmin here

l_user_name varchar2(240) := 'setup_user14';

begin

--模擬登陸

--l_iface_rec.last_update_date := sysdate;

l_iface_rec.last_updated_by := fnd_global.user_id;

l_iface_rec.creation_date := sysdate;

l_iface_rec.created_by := fnd_global.user_id;

l_iface_rec.last_update_login := -1;

l_iface_rec.last_updated_by_name := l_user_name;

l_iface_rec.created_by_name := l_user_name;

l_iface_rec.transaction_type := 1;--normal resource transactions

l_iface_rec.process_phase := 1;--resource validation

l_iface_rec.process_status := 1;--pending

l_iface_rec.wip_entity_name := 'lcy_test01';--任務名

l_iface_rec.entity_type := 1;--standard discrete jobs 標準離散工單

l_iface_rec.organization_id := l_cur_mfg_org_id;--庫存組織

l_iface_rec.organization_code := l_cur_mfg_org_code;--組織縮寫

l_iface_rec.operation_seq_num := 10;--工序

l_iface_rec.resource_seq_num := 10;--資源序號

l_iface_rec.transaction_date := sysdate;

l_iface_rec.transaction_quantity := 1;--數量

l_iface_rec.transaction_uom := 'min';--單位

l_iface_rec.source_code := 'test only';

l_iface_rec.source_line_id := 987654321;

insert into wip.wip_cost_txn_inte***ce values l_iface_rec;

end;

/

PB事務處理

1 資料視窗更新,只要dberror有錯誤,而事先沒有做過任何commit工作,那麼rollback可以回滾到上次commit位置,即上次commit後所有的資料將被回滾。2 如果是直接寫入sql語句,只要資料庫出現錯誤,那麼rollback可以回滾到上次commit的位置,即上次commit後所有...

MySQL事務處理

start transaction,commit和rollback語法 start transaction begin work commit work and no chain no release rollback work and no chain no release set autocom...

ASP事務處理

asp事務處理。測試資料庫為sql server,伺服器為本機,資料庫名為test,表名為a,兩個欄位id int 主鍵標識,num int set conn server.createobject adodb.connection strconn provider sqloledb.1 persi...