API导入

虚拟核算上线总结:
1.物料组织分配
方法:API导入.
详细步骤: 1.将所要进行物料组织分配的/修改状态的物料导入物料接口表.
2.运行导入物料,选择相应的参数(处理集)
接口表导入示范:
INSERT INTO mtl_system_items_interface
(process_flag, --1为待处理,2为分配完成,3为异常,4为验证通过导入异常,5为导入过

程中,6为导入成功
transaction_type, --新分配物料则为CREATE,更新物料状态则为UPDATE
item_number, --物料编码
description, --物料描述
organization_id, --需分配到的组织
set_process_id, --处理集,自己定义,届时在后续的导入物料的请求中作为参数
item_type, --物料类型
inventory_item_status_code, --物料状态
primary_uom_code, --单位
attribute7 --额外属性
)
VALUES (1,
'CREATE',
'*********',
'*********************',
***,
1,
'FG',
'Inactive',
'Tai',
''
);
2.通过API导入帐户别名接收
步骤:1.查询出所要使用的帐户别名的DISPOSITION_ID,DISTRIBUTION_ACCOUNT,脚本如下
select mgd.DISPOSITION_ID,mgd.DISTRIBUTION_ACCOUNT
from MTL_GENERIC_DISPOSITIONS mgd
where mgd.SEGMENT1='*****'
2.根据上面的查询出的DISTRIBUTION_ACCOUNT
select code_combination_id, segment1 , segment2, segment3 , segment4 , segment5
from gl_code_combinations a
where code_combination_id =****--DISTRIBUTION_ACCOUNT
3.查询出现有量导入接口表mtl_transactions_interface

Insert into mtl_transactions_interface(
transaction_uom,
transaction_date,
source_code,
source_line_id,
source_header_id,
process_flag ,
transaction_mode ,
lock_flag ,
locator_id ,
last_update_date ,
last_updated_by ,
creation_date ,
created_by ,
inventory_item_id ,
subinventory_code,
organization_id,
transaction_source_name,
transaction_source_id,
transaction_quantity ,
primary_quantity ,
transaction_type_id ,
dst_segment1,
dst_segment2,
dst_segment3,
dst_segment4,
dst_segment5,
transaction_interface_id)
VALUES (
'Ea', --transaction uom
SYSDATE, --transaction date
'Account alias receipt', --source code 可以随便填写
'1', --source line id --用于事物处理追溯用,随便填写
'1', --source header id --用于事物处理追溯用,随便填写
1, --process flag,'1' for ready, ’2’ for not ready
3 , --transaction mode,2为并行处理,3为后台处理
2 , --lock flag 1位locked,2为null
'' , --locator id
SYSDATE , --last update date
0, --last updated by
SYSDATE , --creation date
0, --created by
355734, --inventory item id
'*****', --From subinventory code
***, --organization id
'', --transaction source 账户别名名称
***, --transaction source id 账户别名disposition_id
***, --transaction quantity ---注意,帐户别名接收数量为正,帐户别名发放数量为负
***, --Primary quantity ---同上
41, --transaction type id,41为帐户别名接收,31为帐户别名发放
'***', --segment1 account combination ---账户别名帐套段,需要更改
'***', --segment2 account combination ---账户别名帐套段,需要更改
'****', --segment3 account combination ---账户别名帐套段,需要更改
'*', --segment4 account combination ---账户别名帐套段,需要更改
'*', --segment5 account combination ---账户别名帐套段,需要更改
mtl_material_transactions_s.NEXTVAL--transaction interface id
);
4.提交并发请求,将接口表中的数据过到正式事物处理
declare
l_request_id number;
begin
l_request_id:= fnd_request.submit_request('INV','INCTCM','',to_char(sysdate,'YYYY/MM/DD

HH24:MI:SS'),false,chr(0));
end;


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

转载于:http://blog.itpub.net/302844/viewspace-85965/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值