首页  ·  知识 ·  生产制造
WIP工单interface的开发示例代码
网友      编辑:德仔   图片来源:网络
Interface的开发是Oracle ERP中重要的组成部分。 insert into wip_job_schedule_interface (last_update_date, last_updated_b
Interface的开发是Oracle ERP中重要的组成部分。
insert into wip_job_schedule_interface
(last_update_date,
last_updated_by,
last_updated_by_name,
creation_date,
created_by,
created_by_name,
last_update_login,
group_id,
source_code,
process_phase,
process_status,
source_line_id,
organization_id,
organization_code,
load_type,
status_type,
first_unit_start_date,
first_unit_completion_date,
last_unit_start_date,
last_unit_completion_date,
line_id,
line_code,
primary_item_id,
bom_revision,
bom_revision_date,
bom_reference_id,
routing_reference_id,
routing_revision_date,
completion_subinventory,
completion_locator_id,
wip_supply_type,
class_code,
lot_number,
job_name,
description,
firm_planned_flag,
alternate_routing_designator,
alternate_bom_designator,
net_quantity,
start_quantity,
attribute_category,
attribute1,
attribute2,
attribute3,
attribute4,
attribute5,
attribute6,
attribute7,
attribute8,
attribute9,
attribute10,
attribute11,
attribute12,
attribute13,
attribute14,
attribute15,
priority,
allow_explosion,
header_id,
date_released)
values
(sysdate --last_update_date ,
,
v_user_id --last_updated_by,
,
null --last_updated_by_name
,
sysdate --creation_date ,
,
v_user_id --created_by ,
,
null --created_by_name
,
fnd_profile.value('LOGIN_ID') --last_update_login ,
,
v_group_id --group_id ,
,
null --r_so_line.order_number || '(' || r_so_line.line_number || ')' --source_code ,
,
2 -- 2,stand for processing --process_phase
,
wip_constants.pending -- 1,stand for pending --process_status
,
null --p_so_line_id --source_line_id ,
,
r_so_line.ship_from_org_id --organization_id ,
,
null --organization_code
,
v_load_type ---load_type 1-create standard work order,4- create non-standard work order
,
wip_constants.unreleased -- 3,--lc.status_type, --status_type ,3-release
,
v_start_date -- lc.scheduled_start_date, --first_unit_start_date ,
,
null -- lc.scheduled_completion_date,--first_unit_completion_date ,
,
null --lc.scheduled_start_date, --last_unit_start_date ,
,
v_schedule_completion_date -- lc.scheduled_completion_date,--last_unit_completion_date ,
,
null ---line_id ,
,
null --line_code
,
r_so_line.inventory_item_id ---primary_item_id ,
,
v_bom_revision ---bom_revision
,
null --sysdate --bom revision date
,
v_bom_reference_id ---bom_refference_id
,
null --routing_reffernce_id
,
null --routing_revision_date
,
r_so_line.subinventory --completion_subinventory ,
,
null --completion_locator_id ,
,
7 --wip_supply_type , 'Based in bill'
,
v_class_code ---class_code ,
,
v_wip_entity_name --lot_number ,
,
v_wip_entity_name --job_name ,
,
r_so_line.user_item_description --description ,
,
null --firm_planned_flag ,
,
null --alternate_routing_designator,
,
null --alternate_bom_designator ,
,
r_so_line.ordered_quantity --net_quantity ,
,
r_so_line.ordered_quantity --start_quantity ,
,
null --attribute_category
,
null --attribute1 ,
,
null --attribute2 ,
,
null --attribute3 ,
,
null --attribute4 ,
,
null --attribute5 ,
,
null --attribute6 ,
,
null --attribute7 ,
,
null --attribute8 ,
,
null --attribute9 ,
,
null --attribute10 ,
,
null --attribute11 ,
,
v_completion_date_dff --attribute12 ,
,
null --attribute13 ,
,
null --attribute14 ,
,
null --attribute15 ,
,
10 --priority ,
,
v_need_explode --allow_explosion ,
,
v_header_id --header_id ,
,
null --date_released
);

insert into wip_job_dtls_interface
(operation_seq_num,
inventory_item_id_old,
inventory_item_id_new,
quantity_per_assembly,
last_update_date,
last_updated_by,
creation_date,
created_by,
last_update_login,
department_id,
wip_supply_type,
date_required,
required_quantity,
quantity_issued,
supply_subinventory,
supply_locator_id,
mrp_net_flag,
mps_required_quantity,
mps_date_required,
auto_request_material,
comments,
attribute1,
attribute14,
attribute15,
load_type,
substitution_type,
interface_id,
group_id,
parent_header_id,
process_phase,
process_status,
organization_id)
values
(1 --operation_seq_num
,
null --r_so_line.inventory_item_id --inventory_item_id_new
,
r_so_line.inventory_item_id --inventory_item_id_new
,
1 --quantity_per_assembly
,
sysdate --last_update_date
,
v_user_id --last_updated_by
,
sysdate --creation_date
,
v_user_id --created_by
,
fnd_profile.value('LOGIN_ID') --last_update_login ,
,
null --department_id
,
1 --wip_supply_type 'PUSH'
,
r_so_line.schedule_ship_date --date_required
,
r_so_line.ordered_quantity --required_quantity
,
0 --quantity_issued
,
null --r_so_line.subinventory --supply_subinventory
,
null --supply_locator_id
,
1 --mrp_net_flag
,
null --r_so_line.ordered_quantity --mps_required_quantity
,
null --r_so_line.schedule_ship_date --mps_date_required
,
null --auto_request_material
,
null --comments
,
nvl(v_comp_revision, '00') --attribute1
,
null --attribute14
,
null --attribute15
,
wip_job_details.wip_mtl_requirement --load_type
,
wip_job_details.wip_add --substitution_type 'Add'
,
v_header_id --null --interface_id
,
v_group_id --group_id
,
v_header_id --parent_header_id
,
2 --process_phase
,
1 --process_status
,
r_so_line.ship_from_org_id --organization_id
);
 
本文作者:网友 来源:网络
CIO之家 www.ciozj.com 微信公众号:imciow
    >>频道首页  >>网站首页   纠错  >>投诉
版权声明:CIO之家尊重行业规范,每篇文章都注明有明确的作者和来源;CIO之家的原创文章,请转载时务必注明文章作者和来源;
延伸阅读
也许感兴趣的
我们推荐的
主题最新
看看其它的