Oracle EBS wip_job_schedule_interface
wip_job_schedule_interface
interface update wip requirement
DECLARE
l_schedule_iface_rec wip.wip_job_schedule_interface%ROWTYPE; --工单任务接口表
l_dtl_iface_rec wip.wip_job_dtls_interface%ROWTYPE; --工单工序组件接口表
l_user_id NUMBER := 1341;
BEGIN
--工单任务接口表
SELECT wip.wip_job_schedule_interface_s.NEXTVAL
INTO l_schedule_iface_rec.group_id
FROM dual;
--
SELECT wip.wip_job_schedule_interface_s.NEXTVAL
INTO l_schedule_iface_rec.header_id
FROM dual;
--
l_schedule_iface_rec.last_update_date := SYSDATE;
l_schedule_iface_rec.last_updated_by := l_user_id;
l_schedule_iface_rec.creation_date := SYSDATE;
l_schedule_iface_rec.created_by := l_user_id;
l_schedule_iface_rec.last_update_login := -1;
--
--l_schedule_iface_rec.allow_explosion := 'Y'
l_schedule_iface_rec.load_type := 3; --Update standard or non-standard Discrete Job
l_schedule_iface_rec.process_phase := 2; --Validation
l_schedule_iface_rec.process_status := 1; --Pending
--
l_schedule_iface_rec.wip_entity_id := 33049; --12407
l_schedule_iface_rec.organization_id := 104;
--l_schedule_iface_rec.start_quantity := 10;
l_schedule_iface_rec.completion_subinventory := 'BJC01';
l_schedule_iface_rec.completion_locator_id := 7;
--
INSERT INTO wip.wip_job_schedule_interface VALUES l_schedule_iface_rec;
--工单工序组件接口表
l_dtl_iface_rec.parent_header_id := l_schedule_iface_rec.header_id;
l_dtl_iface_rec.group_id := l_schedule_iface_rec.group_id;
--
l_dtl_iface_rec.wip_entity_id := l_schedule_iface_rec.wip_entity_id; --12407
l_dtl_iface_rec.organization_id := 104;
l_dtl_iface_rec.operation_seq_num := 10;
l_dtl_iface_rec.inventory_item_id_old := 32621; --'C699010049' 组件ID
--l_dtl_iface_rec.inventory_item_id_new := 32621;
l_dtl_iface_rec.wip_supply_type := 1; --供应类型 2.装配拉式 1.推式
l_dtl_iface_rec.supply_subinventory := 'DQC01'; --供应子库
l_dtl_iface_rec.supply_locator_id := 6; --供应货位
l_dtl_iface_rec.comments := 'test for wip interface'; --备注
--
l_dtl_iface_rec.load_type := 2; --
l_dtl_iface_rec.substitution_type := 1; --3:chage 1:delete 2:add
l_dtl_iface_rec.process_phase := 2; --Validation
l_dtl_iface_rec.process_status := 1; --Pending
--
l_dtl_iface_rec.last_update_date := SYSDATE;
l_dtl_iface_rec.last_updated_by := l_user_id;
l_dtl_iface_rec.creation_date := SYSDATE;
l_dtl_iface_rec.created_by := l_user_id;
l_dtl_iface_rec.last_update_login := -1;
--
INSERT INTO wip.wip_job_dtls_interface VALUES l_dtl_iface_rec;
dbms_output.put_line(l_schedule_iface_rec.group_id);
END;
--刘轶鹤转