The following lines contain the word 'select', 'insert', 'update' or 'delete':
PROCEDURE : Insert_line()
**===========================================================================*/
procedure insert_line(X_Rowid IN OUT NOCOPY VARCHAR2,
X_Po_Line_Id IN OUT NOCOPY NUMBER,
X_Last_Update_Date DATE,
X_Last_Updated_By NUMBER,
X_Po_Header_Id NUMBER,
X_Line_Type_Id NUMBER,
X_Line_Num NUMBER,
X_Last_Update_Login NUMBER,
X_Creation_Date DATE,
X_Created_By NUMBER,
X_Item_Id NUMBER,
X_Item_Revision VARCHAR2,
X_Category_Id NUMBER,
X_Item_Description VARCHAR2,
X_Unit_Meas_Lookup_Code VARCHAR2,
X_Quantity_Committed NUMBER,
X_Committed_Amount NUMBER,
X_Allow_Price_Override_Flag VARCHAR2,
X_Not_To_Exceed_Price NUMBER,
X_List_Price_Per_Unit NUMBER,
X_Unit_Price NUMBER,
X_Quantity NUMBER,
X_Un_Number_Id NUMBER,
X_Hazard_Class_Id NUMBER,
X_Note_To_Vendor VARCHAR2,
X_From_Header_Id NUMBER,
X_From_Line_Id NUMBER,
x_from_line_location_id NUMBER, --
X_Min_Order_Quantity NUMBER,
X_Max_Order_Quantity NUMBER,
X_Qty_Rcv_Tolerance NUMBER,
X_Over_Tolerance_Error_Flag VARCHAR2,
X_Market_Price NUMBER,
X_Unordered_Flag VARCHAR2,
X_Closed_Flag VARCHAR2,
X_User_Hold_Flag VARCHAR2,
X_Cancel_Flag VARCHAR2,
X_Cancelled_By NUMBER,
X_Cancel_Date DATE,
X_Cancel_Reason VARCHAR2,
X_Firm_Status_Lookup_Code VARCHAR2,
X_Firm_Date DATE,
X_Vendor_Product_Num VARCHAR2,
X_Contract_Num VARCHAR2,
X_Taxable_Flag VARCHAR2,
X_Tax_Code_Id NUMBER,
X_Type_1099 VARCHAR2,
X_Capital_Expense_Flag VARCHAR2,
X_Negotiated_By_Preparer_Flag VARCHAR2,
X_Attribute_Category VARCHAR2,
X_Attribute1 VARCHAR2,
X_Attribute2 VARCHAR2,
X_Attribute3 VARCHAR2,
X_Attribute4 VARCHAR2,
X_Attribute5 VARCHAR2,
X_Attribute6 VARCHAR2,
X_Attribute7 VARCHAR2,
X_Attribute8 VARCHAR2,
X_Attribute9 VARCHAR2,
X_Attribute10 VARCHAR2,
X_Reference_Num VARCHAR2,
X_Attribute11 VARCHAR2,
X_Attribute12 VARCHAR2,
X_Attribute13 VARCHAR2,
X_Attribute14 VARCHAR2,
X_Attribute15 VARCHAR2,
X_Min_Release_Amount NUMBER,
X_Price_Type_Lookup_Code VARCHAR2,
X_Closed_Code VARCHAR2,
X_Price_Break_Lookup_Code VARCHAR2,
X_Ussgl_Transaction_Code VARCHAR2,
X_Government_Context VARCHAR2,
X_Closed_Date DATE,
X_Closed_Reason VARCHAR2,
X_Closed_By NUMBER,
X_Transaction_Reason_Code VARCHAR2,
X_revise_header BOOLEAN,
X_revision_num NUMBER,
-- Bug 902976, zxzhang, 10/04/99
-- Change REVISED_DATE from VarChar(25) to Date.
-- X_revised_date VARCHAR2,
X_revised_date DATE,
X_approved_flag VARCHAR2,
X_header_row_id VARCHAR2,
X_type_lookup_code VARCHAR2,
X_ship_to_location_id NUMBER,
X_ship_org_id NUMBER,
X_need_by_date DATE,
X_promised_date DATE,
X_receipt_required_flag VARCHAR2,
X_invoice_close_tolerance NUMBER,
X_receive_close_tolerance NUMBER,
X_planned_item_flag VARCHAR2,
X_outside_operation_flag VARCHAR2,
X_destination_type_code VARCHAR2,
X_expense_accrual_code VARCHAR2,
X_dist_blk_status VARCHAR2,
X_accrue_on_receipt_flag IN OUT NOCOPY VARCHAR2,
X_ok_to_autocreate_ship VARCHAR2,
X_autocreated_ship IN OUT NOCOPY BOOLEAN,
X_line_location_id IN OUT NOCOPY NUMBER,
X_vendor_id NUMBER,
X_Global_Attribute_Category VARCHAR2,
X_Global_Attribute1 VARCHAR2,
X_Global_Attribute2 VARCHAR2,
X_Global_Attribute3 VARCHAR2,
X_Global_Attribute4 VARCHAR2,
X_Global_Attribute5 VARCHAR2,
X_Global_Attribute6 VARCHAR2,
X_Global_Attribute7 VARCHAR2,
X_Global_Attribute8 VARCHAR2,
X_Global_Attribute9 VARCHAR2,
X_Global_Attribute10 VARCHAR2,
X_Global_Attribute11 VARCHAR2,
X_Global_Attribute12 VARCHAR2,
X_Global_Attribute13 VARCHAR2,
X_Global_Attribute14 VARCHAR2,
X_Global_Attribute15 VARCHAR2,
X_Global_Attribute16 VARCHAR2,
X_Global_Attribute17 VARCHAR2,
X_Global_Attribute18 VARCHAR2,
X_Global_Attribute19 VARCHAR2,
X_Global_Attribute20 VARCHAR2,
X_Expiration_Date DATE,
-- Mahesh Chandak(GML-OPM).bug# 1548597.Add secondary_unit_of_measure,secondary_ quantity,preferred_grade for CR.base_uom and base_qty won't be used in future..
-- Preetam Bamb (GML-OPM) Added the following fields to replace PO_LINES flexfield
-- Bug# 1056597
X_Base_Uom VARCHAR2,
X_Base_Qty NUMBER,
X_Secondary_Uom VARCHAR2,
X_Secondary_Qty NUMBER,
X_Qc_Grade VARCHAR2,
--togeorge 10/03/2000
--added oke columns
X_oke_contract_header_id NUMBER default null,
X_oke_contract_version_id NUMBER default null,
--mchandak 1548597
X_Secondary_Unit_Of_Measure VARCHAR2 default null,
X_Secondary_Quantity NUMBER default null,
X_Preferred_Grade VARCHAR2 default null,
p_contract_id IN NUMBER DEFAULT NULL, --
X_job_id IN NUMBER default null, --
X_contractor_first_name IN VARCHAR2 default null, --
X_contractor_last_name IN VARCHAR2 default null, --
X_assignment_start_date IN DATE default null, --
X_amount_db IN NUMBER default null, --
X_order_type_lookup_code IN VARCHAR2 default null, --
X_purchase_basis IN VARCHAR2 default null, --
X_matching_basis IN VARCHAR2 default null, --
--
X_Base_Unit_Price NUMBER DEFAULT NULL,
--
p_manual_price_change_flag IN VARCHAR2 default null, --
p_consigned_from_supplier_flag IN VARCHAR2 default null, --bug 3523348
p_org_id IN NUMBER default null --
) is
X_Progress varchar2(3) := NULL;
/* Insert the PO Line */
po_lines_pkg_si.insert_row(
X_Rowid ,
X_Po_Line_Id ,
X_Last_Update_Date ,
X_Last_Updated_By ,
X_Po_Header_Id ,
X_Line_Type_Id ,
X_Line_Num ,
X_Last_Update_Login ,
X_Creation_Date ,
X_Created_By ,
X_Item_Id ,
X_Item_Revision ,
X_Category_Id ,
X_Item_Description ,
X_Unit_Meas_Lookup_Code ,
X_Quantity_Committed ,
X_Committed_Amount ,
X_Allow_Price_Override_Flag ,
X_Not_To_Exceed_Price ,
X_List_Price_Per_Unit ,
--
-- Bug 3417479
X_Base_Unit_Price,
--
X_Unit_Price ,
X_Quantity ,
X_Un_Number_Id ,
X_Hazard_Class_Id ,
X_Note_To_Vendor ,
X_From_Header_Id ,
X_From_Line_Id ,
x_from_line_location_id , --
X_Min_Order_Quantity ,
X_Max_Order_Quantity ,
X_Qty_Rcv_Tolerance ,
X_Over_Tolerance_Error_Flag ,
X_Market_Price ,
X_Unordered_Flag ,
X_Closed_Flag ,
X_User_Hold_Flag ,
X_Cancel_Flag ,
X_Cancelled_By ,
X_Cancel_Date ,
X_Cancel_Reason ,
X_Firm_Status_Lookup_Code ,
X_Firm_Date ,
X_Vendor_Product_Num ,
X_Contract_Num ,
X_Taxable_Flag ,
X_Tax_Code_Id ,
X_Type_1099 ,
X_Capital_Expense_Flag ,
X_Negotiated_By_Preparer_Flag ,
X_Attribute_Category ,
X_Attribute1 ,
X_Attribute2 ,
X_Attribute3 ,
X_Attribute4 ,
X_Attribute5 ,
X_Attribute6 ,
X_Attribute7 ,
X_Attribute8 ,
X_Attribute9 ,
X_Attribute10 ,
X_Reference_Num ,
X_Attribute11 ,
X_Attribute12 ,
X_Attribute13 ,
X_Attribute14 ,
X_Attribute15 ,
X_Min_Release_Amount ,
X_Price_Type_Lookup_Code ,
X_Closed_Code ,
X_Price_Break_Lookup_Code ,
NULL , --
X_Government_Context ,
X_Closed_Date ,
X_Closed_Reason ,
X_Closed_By ,
X_Transaction_Reason_Code ,
X_Global_Attribute_Category ,
X_Global_Attribute1 ,
X_Global_Attribute2 ,
X_Global_Attribute3 ,
X_Global_Attribute4 ,
X_Global_Attribute5 ,
X_Global_Attribute6 ,
X_Global_Attribute7 ,
X_Global_Attribute8 ,
X_Global_Attribute9 ,
X_Global_Attribute10 ,
X_Global_Attribute11 ,
X_Global_Attribute12 ,
X_Global_Attribute13 ,
X_Global_Attribute14 ,
X_Global_Attribute15 ,
X_Global_Attribute16 ,
X_Global_Attribute17 ,
X_Global_Attribute18 ,
X_Global_Attribute19 ,
X_Global_Attribute20 ,
X_Expiration_Date ,
/** Mahesh Chandak(GML)bug# 1548597 base_uom and base_qty won't be used
in the future.we are keeping secondary_uom,secondary_qty and qc_grade for
supporting Common Purchasing. we will have 3 new fields secondary_unit_of_measu
re, secondary_quantity and preferred_grade columns in the table **/
-- Preetam Bamb (GML-OPM) Added the following fields to replace PO_LINES flexfield
-- Bug# 1056597
X_Base_Uom ,
X_Base_Qty ,
X_Secondary_Uom,
X_Secondary_Qty,
X_Qc_Grade,
--togeorge 10/03/2000
--added oke columns
X_oke_contract_header_id ,
X_oke_contract_version_id ,
-- start of 1548597
X_Secondary_unit_of_measure ,
X_Secondary_quantity ,
X_preferred_grade ,
-- end of 1548597
p_contract_id, --
X_job_id, --
X_contractor_first_name, --
X_contractor_last_name, --
X_assignment_start_date, --
X_amount_db, --
X_order_type_lookup_code, --
X_purchase_basis, --
X_matching_basis, --
p_manual_price_change_flag, --
p_org_id, --
l_ip_category_id --
);
SELECT nvl(msi.invoice_close_tolerance,X_invoice_close_tolerance_tmp),
nvl(msi.receive_close_tolerance,X_receive_close_tolerance_tmp),
msi.receipt_required_flag,
msi.inspection_required_flag,
--
decode(msi.tracking_quantity_ind,
g_chktype_TRACKING_QTY_IND_S,msi.secondary_default_ind,NULL),
msi.grade_control_flag,
decode(msi.tracking_quantity_ind,
g_chktype_TRACKING_QTY_IND_S,msi.secondary_uom_code,NULL)
--
INTO X_invoice_close_tolerance_tmp,
X_receive_close_tolerance_tmp,
temp_receipt_required_flag,
temp_inspection_required_flag,
l_secondary_default_ind, l_grade_control_flag, l_secondary_uom_code --
FROM mtl_system_items msi
WHERE msi.inventory_item_id = X_item_id
AND msi.organization_id =X_ship_org_id;
SELECT unit_of_measure INTO x_secondary_unit_of_measure_s
FROM mtl_units_of_measure
WHERE uom_code = l_secondary_uom_code ;
the value passed into this procedure insert_line() - Take a
note of that. SI 02/16 */
-- bug 451195
-- Added USSGL transaction code in autocreate shipment
--
IF X_item_id is NOT NULL and X_ship_org_id is not NULL THEN
l_outsourced_assembly := po_core_s.get_outsourced_assembly(X_item_id, X_ship_org_id);
X_last_update_date ,
X_last_updated_by ,
X_creation_date ,
X_created_by ,
X_last_update_login ,
X_po_header_id ,
X_po_line_id ,
X_type_lookup_code ,
X_quantity ,
X_ship_to_location_id ,
X_ship_org_id ,
X_need_by_date ,
X_promised_date ,
X_unit_price ,
X_tax_code_id ,
X_taxable_flag ,
X_enforce_ship_to_location ,
X_receiving_routing_id ,
X_inspection_required_flag ,
--X_receipt_required_flag ,
X_receipt_required_flag_tmp ,
X_qty_rcv_tol ,
X_qty_rcv_exception_code ,
X_days_early_receipt_allowed ,
X_days_late_receipt_allowed ,
X_allow_substitute_receipts ,
X_receipt_days_exception_code ,
X_invoice_close_tolerance_tmp ,
X_receive_close_tolerance_tmp ,
X_item_status ,
X_outside_operation_flag ,
X_destination_type_code ,
X_expense_accrual_code ,
X_item_id ,
NULL ,
X_accrue_on_receipt_flag ,
X_autocreated_ship ,
X_unit_meas_lookup_code, -- Added Parameter Bug 731564
X_order_type_lookup_code, --
X_matching_basis, --
-- start of bug# 1548597
X_secondary_unit_of_measure_s ,
X_secondary_quantity_shipment ,
X_preferred_grade_shipment,
p_consigned_from_supplier_flag, --bug 3523348
-- end of bug# 1548597
p_org_id, --
l_outsourced_assembly --
);
po_message_s.sql_error('insert_line', x_progress, sqlcode);
end insert_line;