The following lines contain the word 'select', 'insert', 'update' or 'delete':
Select resource_id,resource_code
from bom_resources
where organization_id =p_organization_id;
select br.resource_id,br.resource_code,br.resource_type
from
cst_activities ca,
bom_department_resources bdr,
bom_resources br
where br.organization_id = p_organization_id
and bdr.department_id = (select department_id
from wip_operations
where organization_id = p_organization_id
and wip_entity_id =p_wip_entity_id
and operation_seq_num = p_operation_seq_num )
and br.resource_id = bdr.resource_id
and br.default_activity_id = ca.activity_id (+)
and nvl(ca.disable_date(+),sysdate+1) > sysdate
and nvl(br.disable_date,sysdate+1) > sysdate
and (ca.organization_id is null or ca.organization_id =p_organization_id );
select wor.resource_seq_num,
br.resource_code,
br.resource_id
from cst_activities ca,
bom_resources br,
wip_operation_resources wor
where wor.repetitive_schedule_id is null
and br.organization_id = wor.organization_id
and wor.resource_id = br.resource_id
and wor.activity_id = ca.activity_id (+)
and nvl(ca.disable_date(+),sysdate+1)> sysdate
and wor.organization_id = p_organization_id
and wor.wip_entity_id =p_wip_entity_id
and wor.operation_seq_num = p_operation_seq_num ;
select distinct muc.uom_code
from mtl_uom_conversions muc,mtl_units_of_measure muom
where muom.uom_code = muc.uom_code
and muc.inventory_item_id = 0
and nvl(muc.disable_date,sysdate+1) >sysdate
and muc.uom_class in (select muc2.uom_class
from mtl_uom_conversions muc2,bom_resources br
where muc2.inventory_item_id = 0
and muc2.uom_code = br.unit_of_measure
and br.resource_id = l_temp_res_id1);
select distinct full_name,person_id,employee_number
from per_people_f
where
p_start_time BETWEEN EFFECTIVE_START_DATE AND EFFECTIVE_END_DATE --for bug 8532793
and person_id in (select person_id
from bom_resource_employees
where organization_id =p_organization_id
and resource_id = l_temp_res_id2 );
select distinct serial_number
from bom_dept_res_instances
where instance_id in (select instance_id
from bom_resource_equipments
where organization_id =p_organization_id
and resource_id =l_temp_res_id3 );
select distinct bd.department_code, bd.department_id
from bom_department_resources bdr, bom_departments bd
where bdr.department_id = bd.department_id
and bdr.resource_id = l_temp_res_id4 ;
select reason_name
from mtl_transaction_reasons
where nvl(disable_date, sysdate + 1) > sysdate;
select resource_seq_num
from wip_operation_resources
where wip_entity_id = p_wip_entity_id
and operation_seq_num = p_operation_seq_num
and organization_id = p_organization_id
and resource_id = l_resource_id;
select resource_seq_num
from wip_operation_resources
where wip_entity_id = p_wip_entity_id
and operation_seq_num = p_operation_seq_num
and organization_id = p_organization_id
order by resource_seq_num desc;
select resource_id into l_resource_id from bom_resources where resource_code = p_resource_code and organization_id = p_organization_id ;
select instance_id into l_instance_id from bom_resource_employees where resource_id = l_temp_res_id and person_id = l_actual_employee_id;
SELECT hourly_labor_rate
INTO x_actual_resource_rate
FROM wip_employee_labor_rates
WHERE employee_id = l_actual_employee_id
AND organization_id = p_organization_id
AND effective_date = (
SELECT MAX(effective_date)
FROM wip_employee_labor_rates
WHERE employee_id = l_actual_employee_id
AND organization_id = p_organization_id
AND effective_date <= sysdate
);
select instance_id into l_instance_id from bom_dept_res_instances where resource_id = l_temp_res_id and serial_number = l_equip_serial_no ;
select owning_department into l_owning_department_id from wip_discrete_jobs where wip_entity_id = p_wip_entity_id;
select wdj.status_type, we.entity_type
into l_status_type, l_we_entity_type
from wip_discrete_jobs wdj, wip_entities we
where wdj.wip_entity_id = we.wip_entity_id
and wdj.wip_entity_id = l_wip_entity_id;
PROCEDURE insert_into_wcti(
p_api_version IN NUMBER
,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
,p_commit IN VARCHAR2 := fnd_api.g_false
,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
,p_wip_entity_id IN NUMBER
,p_operation_seq_num IN NUMBER
,p_organization_id IN NUMBER
,p_transaction_qty IN NUMBER
,p_transaction_date IN DATE
,p_resource_seq_num IN NUMBER
,p_uom IN VARCHAR2
,p_resource_code IN VARCHAR2
,p_reason_name IN VARCHAR2
,p_reference IN VARCHAR2
,p_instance_id IN NUMBER
,p_serial_number IN VARCHAR2
,p_charge_dept_id IN NUMBER
,p_attribute_category IN VARCHAR2
,p_attribute1 IN VARCHAR2
,p_attribute2 IN VARCHAR2
,p_attribute3 IN VARCHAR2
,p_attribute4 IN VARCHAR2
,p_attribute5 IN VARCHAR2
,p_attribute6 IN VARCHAR2
,p_attribute7 IN VARCHAR2
,p_attribute8 IN VARCHAR2
,p_attribute9 IN VARCHAR2
,p_attribute10 IN VARCHAR2
,p_attribute11 IN VARCHAR2
,p_attribute12 IN VARCHAR2
,p_attribute13 IN VARCHAR2
,p_attribute14 IN VARCHAR2
,p_attribute15 IN VARCHAR2
,p_actual_resource_rate IN NUMBER
,p_employee_id IN NUMBER
,p_employee_number IN VARCHAR2
,x_return_status OUT NOCOPY VARCHAR2
,x_msg_count OUT NOCOPY NUMBER
,x_msg_data OUT NOCOPY VARCHAR2)
IS
l_api_name CONSTANT VARCHAR2(30) := 'insert_into_wcti';
select resource_seq_num
from wip_operation_resources
where wip_entity_id =l_wip_entity_id1 and
organization_id = l_organization_id1 and
operation_seq_num = l_operation_seq_num1 ;
SAVEPOINT get_insert_into_wcti_pvt;
select wip_transactions_s.nextval into l_groupid from dual;
select organization_code into l_organization_code from mtl_parameters where organization_id = l_organization_id;
select wip_entity_name,entity_type,primary_item_id
into l_wip_entity_name, l_entity_type , l_primary_item_id
from wip_entities where organization_id = l_organization_id and wip_entity_id = l_wip_entity_id;
select project_id,task_id into l_project_id, l_task_id from wip_discrete_jobs
where organization_id = l_organization_id and wip_entity_id = l_wip_entity_id;
SELECT
chargeable_flag
INTO
l_project_task_chargeable
FROM pjm_tasks_v
WHERE
project_id=l_project_id
AND task_id=l_task_id;
select min(acct_period_id) into l_acct_period_id from org_acct_periods
where trunc(l_transaction_date) >= trunc(period_start_date)
and trunc(l_transaction_date) <= trunc(schedule_close_date)
and organization_id = l_organization_id
and period_close_date is null;
select bd.department_id,bd.department_code
into l_department_id, l_department_code
from wip_operations wo, bom_departments bd
where wo.wip_entity_id = l_wip_entity_id and wo.organization_id = l_organization_id
and wo.operation_seq_num = l_operation_seq_num and wo.department_id = bd.department_id(+);
select reason_id into l_reason_id from mtl_transaction_reasons where reason_name = p_reason_name;
select br.resource_id,
br.resource_code,
br.resource_type,
br.unit_of_measure uom_code,
br.default_basis_type basis_type,
ca.activity_id,
ca.activity,
br.standard_rate_flag
into
l_resource_id,
l_resource_code,
l_resource_type,
l_uom,
l_basis_type,
l_activity_id,
l_activity_name,
l_standard_rate_flag
from
cst_activities ca,
bom_department_resources bdr,
bom_resources br
where br.organization_id = l_organization_id
and bdr.department_id = (select department_id
from wip_operations
where organization_id = l_organization_id
and wip_entity_id = l_wip_entity_id
and operation_seq_num = l_operation_seq_num)
and br.resource_id = bdr.resource_id
and br.default_activity_id = ca.activity_id (+)
and nvl(ca.disable_date(+),sysdate+1) > sysdate
and nvl(br.disable_date,sysdate+1) > sysdate
and (ca.organization_id is null or ca.organization_id = l_organization_id)
and resource_code = p_resource_code;
select nvl(usage_rate_or_amount,0)
into l_usage_rate_or_amount
from wip_operation_resources
where wip_entity_id = l_wip_entity_id
and operation_seq_num = l_operation_seq_num
and resource_seq_num = l_res_seq_num_temp
and organization_id = l_organization_id;
select scheduled_start_date, scheduled_completion_date
into l_start_date, l_completion_date
from wip_discrete_jobs where wip_entity_id = l_wip_entity_id;
insert into wip_operation_resources(
WIP_ENTITY_ID
,OPERATION_SEQ_NUM
,RESOURCE_SEQ_NUM
,ORGANIZATION_ID
,REPETITIVE_SCHEDULE_ID
,LAST_UPDATE_DATE
,LAST_UPDATED_BY
,CREATION_DATE
,CREATED_BY
,LAST_UPDATE_LOGIN
,REQUEST_ID
,PROGRAM_APPLICATION_ID
,PROGRAM_ID
,PROGRAM_UPDATE_DATE
,RESOURCE_ID
,UOM_CODE
,BASIS_TYPE
,USAGE_RATE_OR_AMOUNT
,ACTIVITY_ID
,SCHEDULED_FLAG
,ASSIGNED_UNITS
,AUTOCHARGE_TYPE
,STANDARD_RATE_FLAG
,APPLIED_RESOURCE_UNITS
,APPLIED_RESOURCE_VALUE
,START_DATE
,COMPLETION_DATE
,ATTRIBUTE_CATEGORY
,ATTRIBUTE1
,ATTRIBUTE2
,ATTRIBUTE3
,ATTRIBUTE4
,ATTRIBUTE5
,ATTRIBUTE6
,ATTRIBUTE7
,ATTRIBUTE8
,ATTRIBUTE9
,ATTRIBUTE10
,ATTRIBUTE11
,ATTRIBUTE12
,ATTRIBUTE13
,ATTRIBUTE14
,ATTRIBUTE15
,RELIEVED_RES_COMPLETION_UNITS
,RELIEVED_RES_SCRAP_UNITS
,RELIEVED_RES_COMPLETION_VALUE
,RELIEVED_RES_SCRAP_VALUE
,RELIEVED_VARIANCE_VALUE
,TEMP_RELIEVED_VALUE
,RELIEVED_RES_FINAL_COMP_UNITS
,DEPARTMENT_ID
,PHANTOM_FLAG
,PHANTOM_OP_SEQ_NUM
,PHANTOM_ITEM_ID
,SCHEDULE_SEQ_NUM
,SUBSTITUTE_GROUP_NUM
,REPLACEMENT_GROUP_NUM
,PRINCIPLE_FLAG
,SETUP_ID
,PARENT_RESOURCE_SEQ )
values(
l_wip_entity_id
,l_operation_seq_num
,p_resource_seq_num
,l_organization_id
,null
,sysdate
,FND_GLOBAL.user_id
,sysdate
,FND_GLOBAL.user_id
,null
,null
,null
,null
,null
,l_resource_id
,l_uom
,l_basis_type
,0 -- usage rate or amount
,null -- activity id
,2 -- scheduled flag
,1 -- assigned units
,2 --autocharge type
,2 -- standard rate flag
,0 -- applied resource units
,0 -- applied resource value
,l_start_date
,l_completion_date
,null
,null
,null
,null
,null
,null
,null
,null
,null
,null
,null
,null
,null
,null
,null
,null
,null
,null
,null
,null
,null
,null
,null
,l_department_id --populate operations dept. id
,null
,null
,null
,null
,null
,null
,null
,null
,null
);
insert into wip_cost_txn_interface(
transaction_id,
last_update_date,
last_updated_by,
last_updated_by_name,
creation_date,
created_by,
created_by_name,
last_update_login,
request_id,
program_application_id,
program_id,
program_update_date,
group_id,
source_code,
source_line_id,
process_phase,
process_status,
transaction_type,
organization_id,
organization_code,
wip_entity_id,
wip_entity_name,
entity_type,
line_id,
line_code,
primary_item_id,
repetitive_schedule_id,
transaction_date,
acct_period_id,
operation_seq_num,
resource_seq_num,
department_id,
department_code,
employee_id,
employee_num,
resource_id,
resource_code,
resource_type,
usage_rate_or_amount,
basis_type,
autocharge_type,
standard_rate_flag,
transaction_quantity,
transaction_uom,
primary_quantity,
primary_uom,
primary_uom_class,
actual_resource_rate,
currency_code,
currency_conversion_date,
currency_conversion_type,
currency_conversion_rate,
currency_actual_resource_rate,
activity_id,
activity_name,
reason_id,
reason_name,
reference,
move_transaction_id,
rcv_transaction_id,
po_header_id,
po_line_id,
receiving_account_id,
project_id,
task_id,
attribute_category,
attribute1,
attribute2,
attribute3,
attribute4,
attribute5,
attribute6,
attribute7,
attribute8,
attribute9,
attribute10,
attribute11,
attribute12,
attribute13,
attribute14,
attribute15,
completion_transaction_id,
phantom_flag,
xml_document_id,
charge_department_id,
instance_id
) values (
NULL, -- transaction_id
SYSDATE, -- last_update_date
FND_GLOBAL.user_id, -- last_updated_by
FND_GLOBAL.user_name, -- last_updated_by_name
SYSDATE, -- creation_date
FND_GLOBAL.user_id, -- created_by
FND_GLOBAL.user_name, -- created_by_name
NULL, -- last_update_login
NULL, -- request_id
NULL, -- program_application_id
NULL, -- program_id
NULL, -- program_update_date
NULL, -- groupid
null, --source_code
NULL, -- source_line_id
2, -- process_phase
1, -- process_status
1, -- transaction_type
l_organization_id,
l_organization_code,
l_wip_entity_id,
l_wip_entity_name,
l_entity_type,
null,
null,
l_primary_item_id,
null, --x_first_schedule_id
l_transaction_date,
l_acct_period_id,
l_operation_seq_num,
p_resource_seq_num,
l_department_id,
l_department_code,
decode(p_employee_id,0,null,p_employee_id),
p_employee_number, -- employee number
l_resource_id,
l_resource_code,
l_resource_type,
decode(l_usage_rate_or_amount,0,null,l_usage_rate_or_amount), --usage_rate_or_amount
l_basis_type,
2, -- autocharge_type
l_standard_rate_flag,
p_transaction_qty,
l_txn_uom,
l_primary_qty,
l_uom,
NULL, -- primary_uom_class
p_actual_resource_rate,
null, -- currency_code
null, -- currency_conversion_date
null, -- currency_conversion_type
null, -- currency_conversion_rate
null, -- currency_actual_resource_rate
l_activity_id,
l_activity_name,
decode(l_reason_id,0,null,l_reason_id),
p_reason_name,
p_reference,
null, -- move_transaction_id
null, -- rcv_transaction_id
null, -- po_header_id
null, -- po_line_id
null, -- receiving_account_id
l_project_id,
l_task_id,
l_attribute_category,
l_attribute1,
l_attribute2,
l_attribute3,
l_attribute4,
l_attribute5,
l_attribute6,
l_attribute7,
l_attribute8,
l_attribute9,
l_attribute10,
l_attribute11,
l_attribute12,
l_attribute13,
l_attribute14,
l_attribute15,
null,
null,
null,
decode(p_charge_dept_id,0,null,p_charge_dept_id),
decode(p_instance_id,0,null,p_instance_id)
);
WIP_EAM_RESOURCE_TRANSACTION.insert_into_wori (
p_api_version => 1.0
,p_init_msg_list => fnd_api.g_false
,p_commit => fnd_api.g_false
,p_validation_level => fnd_api.g_valid_level_full
,p_wip_entity_id => l_wip_entity_id
,p_operation_seq_num => l_operation_seq_num
,p_organization_id => l_organization_id
,p_resource_seq_num => p_resource_seq_num
,p_instance_id => p_instance_id
,p_serial_number => p_serial_number
,p_start_date => l_start_date
,p_completion_date => l_completion_date
,x_return_status => l_return_status
,x_msg_count => l_msg_count
,x_msg_data => l_msg_data );
ROLLBACK TO get_insert_into_wcti_pvt;
ROLLBACK TO get_insert_into_wcti_pvt;
ROLLBACK TO get_insert_into_wcti_pvt;
END insert_into_wcti;
PROCEDURE insert_into_wori(
p_api_version IN NUMBER
,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
,p_commit IN VARCHAR2 := fnd_api.g_false
,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
,p_wip_entity_id IN NUMBER
,p_operation_seq_num IN NUMBER
,p_organization_id IN NUMBER
,p_resource_seq_num IN NUMBER
,p_instance_id IN NUMBER
,p_serial_number IN VARCHAR2
,p_start_date IN DATE
,p_completion_date IN DATE
,x_return_status OUT NOCOPY VARCHAR2
,x_msg_count OUT NOCOPY NUMBER
,x_msg_data OUT NOCOPY VARCHAR2)
IS
l_api_name CONSTANT VARCHAR2(30) := 'insert_into_wori';
select instance_id
from wip_op_resource_instances
where wip_entity_id = p_wip_entity_id and
organization_id = p_organization_id and
operation_seq_num = p_operation_seq_num and
resource_seq_num = p_resource_seq_num and
instance_id = p_instance_id ;
SAVEPOINT get_insert_into_wori_pvt;
insert into wip_op_resource_instances (
wip_entity_id,
operation_seq_num,
resource_seq_num,
organization_id,
last_update_date,
last_updated_by,
creation_date,
created_by,
last_update_login,
instance_id,
serial_number,
start_date,
completion_date,
batch_id )
values
(p_wip_entity_id,
p_operation_seq_num,
p_resource_seq_num,
p_organization_id,
sysdate,
FND_GLOBAL.user_id,
sysdate,
FND_GLOBAL.user_id,
null,
p_instance_id,
p_serial_number,
p_start_date,
p_completion_date,
null);
ROLLBACK TO get_insert_into_wori_pvt;
ROLLBACK TO get_insert_into_wori_pvt;
ROLLBACK TO get_insert_into_wori_pvt;
END insert_into_wori;
select rct.organization_id,
rct.wip_entity_id,
rct.wip_operation_seq_num,
rct.wip_resource_seq_num,
wo.department_id,
rct.po_header_id,
rct.po_line_id,
rct.vendor_id,
rct.vendor_site_id,
pla.item_id,
pla.category_id,
pla.item_description,
nvl(plla.need_by_date,wo.first_unit_start_date),
pla.order_type_lookup_code
into l_organization_id,
l_wip_entity_id,
l_operation_seq_num,
l_resource_seq_num,
l_department_id,
l_po_header_id,
l_po_line_id,
l_vendor_id,
l_vendor_site_id,
l_item_id,
l_category_id,
l_item_description,
l_need_by_date,
l_order_type_lookup_code
from rcv_transactions rct, po_lines_all pla, po_line_types plt,
po_line_locations_all plla, wip_operations wo
where pla.po_header_id (+) = rct.po_header_id
and pla.po_line_id (+) = rct.po_line_id
and rct.po_line_location_id = plla.line_location_id (+)
and pla.line_type_id = plt.line_type_id (+)
and plt.outside_operation_flag = 'N'
and rct.wip_entity_id = wo.wip_entity_id (+)
and rct.organization_id = wo.organization_id (+)
and rct.wip_operation_seq_num = wo.operation_seq_num (+)
and rct.transaction_id = p_rcv_txn_id;
select sum( nvl(pd.quantity_delivered, 0) )
into l_quantity_received
from
po_lines_all pol,
po_distributions_all pd,
po_line_types plt
where
pol.po_line_id = pd.po_line_id
AND pol.line_type_id = plt.line_type_id
AND upper(nvl(plt.outside_operation_flag, 'N')) = 'N'
AND pd.destination_type_code = 'SHOP FLOOR'
AND( pd.PO_RELEASE_ID IS NOT NULL OR pd.DISTRIBUTION_TYPE = 'STANDARD')
AND upper(nvl(pol.cancel_flag, 'N')) <> 'Y'
AND pd.wip_entity_id = l_wip_entity_id
AND pd.wip_operation_seq_num = l_operation_seq_num
AND pd.destination_organization_id = l_organization_id
AND pol.item_id = l_item_id;
select 1, nvl(required_quantity,0)
into l_status, l_required_quantity
from wip_requirement_operations
where wip_entity_id = l_wip_entity_id
and organization_id = l_organization_id
and operation_seq_num = l_operation_seq_num
and inventory_item_id = l_item_id;
update wip_requirement_operations
set required_quantity = nvl(l_quantity_received,0)
where wip_entity_id = l_wip_entity_id
and organization_id = l_organization_id
and operation_seq_num = l_operation_seq_num
and inventory_item_id = l_item_id;
update wip_requirement_operations
set required_quantity = nvl(l_quantity_received,0)
where wip_entity_id = l_wip_entity_id
and organization_id = l_organization_id
and operation_seq_num = l_operation_seq_num
and inventory_item_id = l_item_id;
insert into WIP_REQUIREMENT_OPERATIONS
(INVENTORY_ITEM_ID,
ORGANIZATION_ID,
WIP_ENTITY_ID,
OPERATION_SEQ_NUM,
LAST_UPDATE_DATE,
LAST_UPDATED_BY,
CREATION_DATE,
CREATED_BY,
DEPARTMENT_ID,
WIP_SUPPLY_TYPE,
DATE_REQUIRED,
REQUIRED_QUANTITY,
QUANTITY_ISSUED,
QUANTITY_PER_ASSEMBLY,
MRP_NET_FLAG,
AUTO_REQUEST_MATERIAL,
VENDOR_ID,
UNIT_PRICE)
values
( l_item_id,
l_organization_id,
l_wip_entity_id,
nvl(l_operation_seq_num,1),
sysdate,
FND_GLOBAL.USER_ID,
sysdate,
FND_GLOBAL.USER_ID,
l_department_id,
1,
l_need_by_date,
nvl(l_primary_quantity,0),
0,
nvl(l_primary_quantity,0),
1,
'Y',
l_vendor_id,
l_unit_price
);
select 1, max (direct_item_sequence_id), sum(nvl(required_quantity,0))
into l_status , l_direct_item_id, l_required_quantity
from wip_eam_direct_items
where wip_entity_id = l_wip_entity_id
and organization_id = l_organization_id
and operation_seq_num = l_operation_seq_num
and description = l_item_description;
select uom
into l_uom
from wip_eam_direct_items
where wip_entity_id = l_wip_entity_id
and organization_id = l_organization_id
and operation_seq_num = l_operation_seq_num
and description = l_item_description
and direct_item_sequence_id = l_direct_item_id;
select sum(round(inv_convert.inv_um_convert(0,38,quantity_received,
uom_code,l_uom, NULL,NULL),3))
into l_quantity_received
from (SELECT uom.uom_code, sum(pda.quantity_delivered) quantity_received
FROM po_line_types plt, mtl_units_of_measure uom, po_lines_all pla, po_distributions_all pda
WHERE pda.destination_type_code = 'SHOP FLOOR' AND (pda.PO_RELEASE_ID IS NOT NULL OR pda.DISTRIBUTION_TYPE = 'STANDARD')
AND pla.line_type_id = plt.line_type_id
AND upper(nvl(plt.outside_operation_flag, 'N')) = 'N' AND pla.po_line_id = pda.po_line_id
AND pla.unit_meas_lookup_code = uom.unit_of_measure (+)
AND upper(nvl(pla.cancel_flag, 'N')) <> 'Y' AND pla.item_description = l_item_description
AND pda.wip_entity_id = l_wip_entity_id AND pda.wip_operation_seq_num = l_operation_seq_num
AND pda.destination_organization_id = l_organization_id
GROUP BY uom.uom_code);
update wip_eam_direct_items
set required_quantity = l_quantity_received
where wip_entity_id = l_wip_entity_id
and organization_id = l_organization_id
and operation_seq_num = l_operation_seq_num
and direct_item_sequence_id = l_direct_item_id;
update wip_eam_direct_items
set required_quantity = nvl(l_quantity_received,0),
amount = amount + p_unit_price
where wip_entity_id = l_wip_entity_id
and organization_id = l_organization_id
and operation_seq_num = l_operation_seq_num
and direct_item_sequence_id = l_direct_item_id;
insert into WIP_EAM_DIRECT_ITEMS
(DESCRIPTION,
PURCHASING_CATEGORY_ID,
DIRECT_ITEM_SEQUENCE_ID,
OPERATION_SEQ_NUM,
DEPARTMENT_ID,
WIP_ENTITY_ID,
ORGANIZATION_ID,
SUGGESTED_VENDOR_ID,
SUGGESTED_VENDOR_SITE_ID,
SUGGESTED_VENDOR_CONTACT_ID,
UNIT_PRICE,
AUTO_REQUEST_MATERIAL,
REQUIRED_QUANTITY,
UOM,
NEED_BY_DATE,
CREATED_BY,
CREATION_DATE,
LAST_UPDATE_DATE,
LAST_UPDATED_BY,
order_type_lookup_code,
amount
)
values
( l_item_description,
l_category_id,
wip_eam_di_seq_id_s.nextval,
nvl(l_operation_seq_num,1),
l_department_id,
l_wip_entity_id,
l_organization_id,
l_vendor_id,
l_vendor_site_id,
null,
decode(l_order_type_lookup_code, 'AMOUNT', 0, l_unit_price),
'Y',
l_primary_quantity,
l_primary_uom,
l_need_by_date,
FND_GLOBAL.USER_ID,
sysdate,
sysdate,
FND_GLOBAL.USER_ID,
l_order_type_lookup_code,
l_unit_price );
end; -- end of insertion into WIP_EAM_DIRECT_ITEMS table