您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

EBS 替代接收实例、sql查询及接口程序

2024/12/19 8:11:28发布19次查看
ebs版本:11i今天做了一外围接口,需要用到替代接收,以前没做过,现研究了下。1、设置物料可替代接收属性:职责:库存超级用户菜单:物料-》主组织物料-》接收-
ebs版本:11i
今天做了一外围接口,需要用到替代接收,以前没做过,现研究了下。
1、设置物料可替代接收属性:
职责:库存超级用户
菜单:物料-》主组织物料-》接收-》允许替代接收:“是”
此处对应 mtl_system_items_b.allow_substitute_receipts_flag 字段,存储为'y'/'n',默认空为不允许替代接收。
2、复制一个物料用于测试:
新建一个物料301000010000010,输入物料描述后,工具菜单-》复制自。输入要复制的物料编码,即30100001000001,完成即可。 然后将此物料分配给某个组织。
3、维护一个替代接收关系:
菜单:物料-》产品关系
在弹出的快捷窗口中选择“新建”,起始物料输入源物料,,终止物料输入新建的物料,类型选择“替代”,保存。
4、创建采购订单并审批:
职责:采购超级用户
菜单:采购订单-》采购订单
采购物料录入源物料30100001000001,数量100。
在发运-》接收控制中,选择“允许替代接收”并选择接收方式为“直接交货”。
发运组织选择给新物料分配的那个组织。
依次填写发运、分配信息,保存并审批。
订单编号:810007928
5、接收:
职责:采购超级用户
菜单:接收-》接收
选择发运填写的组织,输入订单编号:810007928并查找,弹出窗口中选新建接收,关闭此小窗口。
在行标签页可以看到默认显示物料是订单物料,可以在此字段上选择,即可看到刚维护的替代接收的物料。
该行信息录入完毕后,勾选此行前的复选框,保存即可。
6、查询接收事务处理:
稍等几十秒,等待接收事务处理完成后即可查询是否替代接收成功。
职责:采购超级用户
菜单:接收-》接收事务处理汇总
查询界面输入采购订单编号:810007928, 亦可在物料栏位输入替代接收的物料编码,查找。
选择查出的记录,点击事务处理按钮。
可以看到接收物料是新建的替代接收物料,成功了!
相关sql:
1、物料是否允许替代接收:
select nvl(msi.allow_substitute_receipts_flag, 'n') from mtl_system_items_b msi where msi.inventory_item_id = pi_item_id and msi.organization_id = pi_organization_id and inventory_item_status_code in ('有效', 'active') and nvl(enabled_flag, 'n') = 'y' and nvl(start_date_active, trunc(pi_transaction_date)) trunc(pi_transaction_date);
2、订单发运行是否允许替代接收
select nvl(plla.allow_substitute_receipts_flag, 'n') from po_headers_allpha,po_lines_allpla,po_distributions_all pda,po_line_locations_all plla where 1 = 1 and pda.po_distribution_id = pi_distribution_id and pda.line_location_id = plla.line_location_id and pda.po_header_id = pha.po_header_id and pla.po_header_id = pha.po_header_id and pla.po_line_id = pda.po_line_id and pha.po_header_id = pi_header_id and nvl(plla.cancel_flag, 'n') 'y' and nvl(plla.closed_code, 'open') not in('closed', 'closed for receiving', 'finally closed') and nvl(plla.approved_flag, 'n') = 'y';
3、供应商是否允许替代接收
select nvl(pv.allow_substitute_receipts_flag, 'n') from po_vendors pv where vendor_id = vn_vendor_id;
4、是否存在产品关系
select count(1) from mtl_related_items_all_v mri where 1 = 1 and mri.inventory_item_id = vn_item_id and mri.related_item_id = vn_substitute_item_id and mri.relationship_type_id = 2 and mri.reciprocal_flag = 'y' and sysdate between nvl(mri.start_date, sysdate) andnvl(mri.end_date, sysdate);
接口程序:
相比普通物料的采购接收,在插入rti(rcv_transaction_interface)时,替代接收需注意以下字段。
1、inspection_status_code
   替代接收:'not inspected'
   普通接收:null。
2、substitute_unordered_code
   替代接收:'substitute'
   普通接收:null
3、substitute_item_id
   替代接收:替代接收物料id
   普通接收:null
另,退货时,rti中所填写的item_id为接收物料的id,并非订单物料id。
附:接口程序样例及测试脚本。
本文出自 “路漫漫其修远兮…” 博客,请务必保留此出处
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product