The following lines contain the word 'select', 'insert', 'update' or 'delete':
D_update_result_set CONSTANT VARCHAR2(100) :=
PO_LOG.get_subprogram_base(D_PACKAGE_BASE,'update_result_set');
D_delete_result_set_auto CONSTANT VARCHAR2(100) :=
PO_LOG.get_subprogram_base(D_PACKAGE_BASE,'delete_result_set_auto');
D_delete_result_set CONSTANT VARCHAR2(100) :=
PO_LOG.get_subprogram_base(D_PACKAGE_BASE,'delete_result_set');
D_insert_result CONSTANT VARCHAR2(100) :=
PO_LOG.get_subprogram_base(D_PACKAGE_BASE,'insert_result');
c_price_update_tol_ge_zero CONSTANT VARCHAR2(30) := 'C_PRICE_UPDATE_TOL_GE_ZERO';
c_last_updated_by CONSTANT VARCHAR2(30) := 'C_LAST_UPDATED_BY';
c_last_update_date CONSTANT VARCHAR2(30) := 'C_LAST_UPDATE_DATE';
c_uom_update CONSTANT VARCHAR2(30) := 'C_UOM_UPDATE';
c_item_desc_update CONSTANT VARCHAR2(30) := 'C_ITEM_DESC_UPDATE';
c_ip_category_id_update CONSTANT VARCHAR2(30) := 'C_IP_CATEGORY_ID_UPDATE';
c_negotiated_by_prep_update CONSTANT VARCHAR2(50) := 'C_NEGOTIATED_BY_PREPARER_UPDATE';
c_category_id_update CONSTANT VARCHAR2(30) := 'C_CATEGORY_ID_UPDATE';
c_unit_price_update CONSTANT VARCHAR2(30) := 'C_UNIT_PRICE_UPDATE';
c_amount_update CONSTANT VARCHAR2(30) := 'C_AMOUNT_UPDATE';
c_accruals_allow_update CONSTANT VARCHAR2(30) := 'C_ACCRUALS_ALLOW_UPDATE';
c_retro_account_allows_update CONSTANT VARCHAR2(30) := 'C_RETRO_ACCOUNT_ALLOWS_UPDATE';
, c_price_update_tol_ge_zero
, c_amount_limit_ge_zero
, c_amt_limit_ge_amt_agreed
, c_amount_agreed_ge_zero
, c_amount_agreed_not_null
, c_effective_le_expiration
, c_effective_from_le_order_date
, c_effective_to_ge_order_date
, c_contract_start_le_order_date
, c_contract_end_ge_order_date
, c_agent_id_not_null
, c_hdr_ship_to_loc_not_null
, c_vendor_id_not_null
, c_vendor_site_id_not_null
, c_segment1_not_null
);
, c_accruals_allow_update
, c_no_timecards_exist
, c_no_pending_receipts
, c_retro_account_allows_update
-- ECO# 4708990/4586199: Obsoleting some messages
--, c_warn_amt_based_notif_ctrls
);
c_last_updated_by,
c_last_update_date,
c_release_num,
c_po_release_id,
c_release_date,
c_revised_date,
c_printed_date,
c_closed_date,
c_terms_id_header,
c_ship_via_lookup_code,
c_fob_lookup_code,
c_freight_terms_lookup_code,
c_shipping_control,
c_approval_status,
c_acceptance_required_flag);
c_pdoi_line_update_vs CONSTANT po_tbl_varchar2000
:= po_tbl_varchar2000(c_uom_update,
c_unit_price_update,
c_amount_update, -- bug 5258790
c_item_desc_update,
c_ip_category_id_update,
c_category_id_update);
c_pdoi_line_blanket_update_vs CONSTANT po_tbl_varchar2000
:= po_tbl_varchar2000(c_negotiated_by_prep_update);
SELECT PO_VALIDATION_RESULT_SET_ID_S.NEXTVAL
INTO l_nextval
FROM DUAL
;
PROCEDURE delete_result_set(
p_result_set_id IN NUMBER
)
IS
d_mod CONSTANT VARCHAR2(100) := D_delete_result_set;
DELETE FROM PO_VALIDATION_RESULTS_GT
WHERE result_set_id = p_result_set_id
;
PO_LOG.stmt(d_mod,100,'Deleted result set. SQL%ROWCOUNT',SQL%ROWCOUNT);
END delete_result_set;
PROCEDURE delete_result_set_auto(
p_result_set_id IN NUMBER
)
IS
PRAGMA AUTONOMOUS_TRANSACTION;
d_mod CONSTANT VARCHAR2(100) := D_delete_result_set_auto;
delete_result_set(p_result_set_id => p_result_set_id);
END delete_result_set_auto;
INSERT INTO PO_VALIDATION_RESULTS_GT
( result_set_id
, result_type
, entity_type
, entity_id
, message_application
, message_name
, column_name
, token1_name
, token1_value
, token2_name
, token2_value
, token3_name
, token3_value
, token4_name
, token4_value
, token5_name
, token5_value
, token6_name
, token6_value
)
VALUES
( p_result_set_id_tbl(i)
, p_result_type_tbl(i)
, p_table_name_tbl(i)
, p_table_id_tbl(i)
, p_message_application_tbl(i)
, p_message_name_tbl(i)
, p_column_name_tbl(i)
, p_token1_name_tbl(i)
, p_token1_value_tbl(i)
, p_token2_name_tbl(i)
, p_token2_value_tbl(i)
, p_token3_name_tbl(i)
, p_token3_value_tbl(i)
, p_token4_name_tbl(i)
, p_token4_value_tbl(i)
, p_token5_name_tbl(i)
, p_token5_value_tbl(i)
, p_token6_name_tbl(i)
, p_token6_value_tbl(i)
);
PO_LOG.stmt(d_mod,d_position,'Inserted data. SQL%ROWCOUNT',SQL%ROWCOUNT);
UPDATE PO_VALIDATION_RESULTS_GT
SET
result_set_id = p_new_result_set_id
WHERE
result_set_id = p_old_result_set_id
;
SELECT
result_set_id
, NVL(result_type,c_result_type_FAILURE)
, entity_type
, entity_id
, NVL(message_application,c_PO)
, message_name
, column_name
, token1_name
, token1_value
, token2_name
, token2_value
, token3_name
, token3_value
, token4_name
, token4_value
, token5_name
, token5_value
, token6_name
, token6_value
BULK COLLECT INTO
l_result_set_id_tbl
, l_result_type_tbl
, l_table_name_tbl
, l_table_id_tbl
, l_message_application_tbl
, l_message_name_tbl
, l_column_name_tbl
, l_token1_name_tbl
, l_token1_value_tbl
, l_token2_name_tbl
, l_token2_value_tbl
, l_token3_name_tbl
, l_token3_value_tbl
, l_token4_name_tbl
, l_token4_value_tbl
, l_token5_name_tbl
, l_token5_value_tbl
, l_token6_name_tbl
, l_token6_value_tbl
FROM
PO_VALIDATION_RESULTS_GT
WHERE
result_set_id = p_result_set_id
;
delete_result_set(p_result_set_id => p_result_set_id);
on the data and insert results into the PO_VALIDATION_RESULTS table.
Parameter descriptions:
x_result_set_id
This parameter identifies rows in PO_VALIDATION_RESULTS
that have been generated by the validation procedure.
The following columns must be populated
by the validation procedure:
result_id
PO_VALIDATION_RESULT_ID_S.nextval
result_set_id
x_result_set_id
table_name
table_id
The name of the table on which the validation is acting,
and the primary key of the table row.
column_name
The name of the column of the pending table to which
this validation result corresponds.
result_type
This should be populated with the default interpretation
of this result (WARNING, ERROR, FATAL, etc.).
If this column is not populated, ERROR should be assumed.
message_application
message_name
The dictionary message for this result.
If message_application is not populated, PO should be assumed.
Additionally, the validation procedure must populate the columns
token1_name, token1_value, token2_name, token2_value, ...
if any tokens are used in the dictionary message.
x_result_type
This parameter contains a summary of the results.
If all validations are successful and no results have been
generated, it will be SUCCESS. Otherwise, it will be
equal to the most serious result_type of the validation
results.
*/
----------------------------------------------------------------------------
--Pre-reqs: None.
--Modifies:
-- PO_VALIDATION_RESULTS
--Locks: None.
--Function:
-- Executes a set of validations in the order determined
-- by the validation set list.
-- Validation results will be stored in PO_VALIDATION_RESULTS.
--
-- Calls to validate_set may be chained together,
-- as the x_result_set_id and x_result_type parameters
-- are IN OUT.
--
-- Example:
--
-- <>
-- BEGIN
--
-- -- Common validations
--
-- validate_set(
-- p_validation_set => c_dist_common_val_set
-- , p_distributions => l_dist_id_tbl
-- , x_result_set_id => l_result_set_id
-- , x_result_type => l_result_type
-- );
l_create_or_update_item VARCHAR2(1);
WHEN 'CREATE_OR_UPDATE_ITEM' THEN
l_create_or_update_item := p_parameter_value_tbl(i);
WHEN c_price_update_tol_ge_zero THEN
PO_VAL_HEADERS.price_update_tol_ge_zero(
p_header_id_tbl => p_headers.po_header_id
, p_price_update_tol_tbl => p_headers.price_update_tolerance
, x_results => x_results
, x_result_type => l_result_type
);
p_column_val_selector => 'END_DATE',
p_message_name => 'PO_PDOI_INVALID_END_DATE',
p_validation_id => PO_VAL_CONSTANTS.c_end_date,
x_results => x_results,
x_result_type => l_result_type);
WHEN c_last_update_date THEN
PO_VALIDATION_HELPER.not_null(p_calling_module => p_calling_program,
p_value_tbl => PO_TYPE_CONVERTER.to_po_tbl_varchar4000(p_headers.last_update_date),
p_entity_id_tbl => p_headers.interface_id,
p_entity_type => c_entity_type_header,
p_column_name => 'LAST_UPDATE_DATE',
p_message_name => 'PO_PDOI_COLUMN_NOT_NULL',
p_validation_id => PO_VAL_CONSTANTS.c_last_update_date,
x_results => x_results,
x_result_type => l_result_type);
WHEN c_last_updated_by THEN
PO_VALIDATION_HELPER.not_null(p_calling_module => p_calling_program,
p_value_tbl => PO_TYPE_CONVERTER.to_po_tbl_varchar4000(p_headers.last_updated_by),
p_entity_id_tbl => p_headers.interface_id,
p_entity_type => c_entity_type_header,
p_column_name => 'LAST_UPDATED_BY',
p_message_name => 'PO_PDOI_COLUMN_NOT_NULL',
p_validation_id => PO_VAL_CONSTANTS.c_last_updated_by,
x_results => x_results,
x_result_type => l_result_type);
p_create_or_update_item => l_create_or_update_item,
p_inventory_org_id => l_inventory_org_id,
x_result_set_id => l_result_set_id,
x_result_type => l_result_type);
WHEN c_uom_update THEN
-- validate unit_meas_lookup_code against po_lines_all and po_units_of_measure_val_v
-- for the Update case
PO_VAL_LINES2.uom_update(p_id_tbl => p_lines.interface_id,
p_unit_meas_lookup_code_tbl => p_lines.unit_meas_lookup_code,
p_order_type_lookup_code_tbl => p_lines.order_type_lookup_code,
p_po_header_id_tbl => p_lines.po_header_id,
p_po_line_id_tbl => p_lines.po_line_id,
x_results => x_results,
x_result_set_id => l_result_set_id,
x_result_type => l_result_type);
WHEN c_unit_price_update THEN
-- In the UPDATE case, unit_price cannot be negative. Also handle #DEL.
PO_VAL_LINES2.unit_price_update
( p_id_tbl => p_lines.interface_id,
p_po_line_id_tbl => p_lines.po_line_id, -- bug5008206
p_draft_id_tbl => p_lines.draft_id, -- bug5258790
p_unit_price_tbl => p_lines.unit_price,
x_results => x_results,
x_result_set_id => l_result_set_id, -- bug5008206
x_result_type => l_result_type
);
WHEN c_amount_update THEN
-- In the UPDATE case, unit_price cannot be negative. Also handle #DEL.
PO_VAL_LINES2.amount_update
( p_id_tbl => p_lines.interface_id,
p_po_line_id_tbl => p_lines.po_line_id, -- bug5008206
p_draft_id_tbl => p_lines.draft_id, -- bug5258790
p_amount_tbl => p_lines.amount,
x_results => x_results,
x_result_set_id => l_result_set_id, -- bug5008206
x_result_type => l_result_type
);
WHEN c_item_desc_update THEN
PO_VAL_LINES2.item_desc_update(p_id_tbl => p_lines.interface_id,
p_item_description_tbl => p_lines.item_description,
p_item_id_tbl => p_lines.item_id,
p_inventory_org_id => l_inventory_org_id,
p_po_header_id_tbl => p_lines.po_header_id,
p_po_line_id_tbl => p_lines.po_line_id,
x_results => x_results,
x_result_set_id => l_result_set_id,
x_result_type => l_result_type);
WHEN c_ip_category_id_update THEN
-- Validate ip_category_id is valid if not empty.
PO_VAL_LINES2.ip_category_id_update(p_id_tbl => p_lines.interface_id,
p_ip_category_id_tbl => p_lines.ip_category_id,
x_result_set_id => l_result_set_id,
x_results => x_results,
x_result_type => l_result_type);
WHEN c_negotiated_by_prep_update THEN
--------------------------------------------------------------------------------------
-- Called in update case for Blanket, negotiated_by_preparer must be NULL, 'Y' or 'N'.
--------------------------------------------------------------------------------------
PO_VAL_LINES2.negotiated_by_prep_update(p_id_tbl => p_lines.interface_id,
p_negotiated_by_preparer_tbl => p_lines.negotiated_by_preparer_flag,
x_results => x_results,
x_result_type => l_result_type);
WHEN c_category_id_update THEN
-------------------------------------------------------------------------
-- If either item_id or job_id are populated, then you are not allowed to change the po_category_id
-- If change is allowed, the new category_id must be valid.
-------------------------------------------------------------------------
PO_VAL_LINES2.category_id_update(p_id_tbl => p_lines.interface_id,
p_category_id_tbl => p_lines.category_id,
p_po_line_id_tbl => p_lines.po_line_id,
p_order_type_lookup_code_tbl => p_lines.order_type_lookup_code,
p_item_id_tbl => p_lines.item_id,
p_job_id_tbl => p_lines.job_id,
p_inventory_org_id => l_inventory_org_id,
x_result_set_id => l_result_set_id,
x_results => x_results,
x_result_type => l_result_type);
p_create_or_update_item_flag => l_create_or_update_item,
x_results => x_results,
x_result_type => l_result_type);
p_create_or_update_item_flag => l_create_or_update_item,
x_results => x_results,
x_result_type => l_result_type);
p_create_or_update_item_flag => l_create_or_update_item,
p_validation_id => PO_VAL_CONSTANTS.c_line_preferred_grade,
x_results => x_results,
x_result_set_id => l_result_set_id,
x_result_type => l_result_type);
IF l_create_or_update_item <> 'Y' THEN
PO_VALIDATION_HELPER.ensure_null(p_calling_module => p_calling_program,
p_value_tbl => PO_TYPE_CONVERTER.to_po_tbl_varchar4000(p_lines.qty_rcv_exception_code),
p_entity_id_tbl => p_lines.interface_id,
p_entity_type => c_entity_type_line,
p_column_name => 'QTY_RCV_EXCEPTION_CODE',
p_message_name => 'PO_PDOI_COLUMN_NULL',
p_token1_name => 'COLUMN_NAME',
p_token1_value => 'QTY_RCV_EXCEPTION_CODE',
p_token2_name => 'VALUE',
p_token2_value_tbl => PO_TYPE_CONVERTER.to_po_tbl_varchar4000(p_lines.qty_rcv_exception_code),
x_results => x_results,
x_result_type => l_result_type);
IF l_create_or_update_item <> 'Y' THEN
PO_VALIDATION_HELPER.ensure_null(p_calling_module => p_calling_program,
p_value_tbl => PO_TYPE_CONVERTER.to_po_tbl_varchar4000(p_lines.market_price),
p_entity_id_tbl => p_lines.interface_id,
p_entity_type => c_entity_type_line,
p_column_name => 'MARKET_PRICE',
p_message_name => 'PO_PDOI_COLUMN_NULL',
p_token1_name => 'COLUMN_NAME',
p_token1_value => 'MARKET_PRICE',
p_token2_name => 'VALUE',
p_token2_value_tbl => PO_TYPE_CONVERTER.to_po_tbl_varchar4000(p_lines.market_price),
p_validation_id => PO_VAL_CONSTANTS.c_market_price_null,
x_results => x_results,
x_result_type => l_result_type);
p_create_or_update_item_flag => l_create_or_update_item,
x_results => x_results,
x_result_type => l_result_type);
p_create_or_update_item_flag => l_create_or_update_item,
x_results => x_results,
x_result_type => l_result_type);
p_create_or_update_item_flag => l_create_or_update_item,
p_validation_id => PO_VAL_CONSTANTS.c_loc_preferred_grade,
x_results => x_results,
x_result_set_id => l_result_set_id,
x_result_type => l_result_type);
IF l_create_or_update_item <> 'Y' THEN
PO_VALIDATION_HELPER.ensure_null(p_calling_module => p_calling_program,
p_value_tbl => PO_TYPE_CONVERTER.to_po_tbl_varchar4000(p_line_locations.qty_rcv_tolerance),
p_entity_id_tbl => p_line_locations.interface_id,
p_entity_type => c_entity_type_line_location,
p_column_name => 'QTY_RCV_TOLERANCE',
p_message_name => 'PO_PDOI_COLUMN_NULL',
p_token1_name => 'COLUMN_NAME',
p_token1_value => 'QTY_RCV_TOLERANCE',
p_token2_name => 'VALUE',
p_token2_value_tbl => PO_TYPE_CONVERTER.to_po_tbl_varchar4000(p_line_locations.qty_rcv_tolerance),
p_validation_id => PO_VAL_CONSTANTS.c_qty_rcv_tolerance_null,
x_results => x_results,
x_result_type => l_result_type);
IF l_create_or_update_item <> 'Y' THEN
PO_VALIDATION_HELPER.ensure_null(p_calling_module => p_calling_program,
p_value_tbl => PO_TYPE_CONVERTER.to_po_tbl_varchar4000(p_line_locations.receipt_required_flag),
p_entity_id_tbl => p_line_locations.interface_id,
p_entity_type => c_entity_type_line_location,
p_column_name => 'RECEIPT_REQUIRED_FLAG',
p_message_name => 'PO_PDOI_COLUMN_NULL',
p_token1_name => 'COLUMN_NAME',
p_token1_value => 'RECEIPT_REQUIRED_FLAG',
p_token2_name => 'VALUE',
p_token2_value_tbl => PO_TYPE_CONVERTER.to_po_tbl_varchar4000(p_line_locations.receipt_required_flag),
p_validation_id => PO_VAL_CONSTANTS.c_receipt_reqd_flag_null,
x_results => x_results,
x_result_type => l_result_type);
IF l_create_or_update_item <> 'Y' THEN
PO_VALIDATION_HELPER.ensure_null(p_calling_module => p_calling_program,
p_value_tbl => PO_TYPE_CONVERTER.to_po_tbl_varchar4000(p_line_locations.inspection_required_flag),
p_entity_id_tbl => p_line_locations.interface_id,
p_entity_type => c_entity_type_line_location,
p_column_name => 'INSPECTION_REQUIRED_FLAG',
p_message_name => 'PO_PDOI_COLUMN_NULL',
p_validation_id => PO_VAL_CONSTANTS.c_inspection_reqd_flag_null,
x_results => x_results,
x_result_type => l_result_type);
IF l_create_or_update_item <> 'Y' THEN
PO_VALIDATION_HELPER.ensure_null(p_calling_module => p_calling_program,
p_value_tbl => PO_TYPE_CONVERTER.to_po_tbl_varchar4000(p_line_locations.receipt_days_exception_code),
p_entity_id_tbl => p_line_locations.interface_id,
p_entity_type => c_entity_type_line_location,
p_column_name => 'RECEIPT_DAYS_EXCEPTION_CODE',
p_message_name => 'PO_PDOI_COLUMN_NULL',
p_token1_name => 'COLUMN_NAME',
p_token1_value => 'RECEIPT_DAYS_EXCEPTION_CODE',
p_token2_name => 'VALUE',
p_token2_value_tbl => PO_TYPE_CONVERTER.to_po_tbl_varchar4000(p_line_locations.receipt_days_exception_code),
p_validation_id => PO_VAL_CONSTANTS.c_receipt_days_except_null,
x_results => x_results,
x_result_type => l_result_type);
IF l_create_or_update_item <> 'Y' THEN
PO_VALIDATION_HELPER.ensure_null(p_calling_module => p_calling_program,
p_value_tbl => PO_TYPE_CONVERTER.to_po_tbl_varchar4000(p_line_locations.invoice_close_tolerance),
p_entity_id_tbl => p_line_locations.interface_id,
p_entity_type => c_entity_type_line_location,
p_column_name => 'INVOICE_CLOSE_TOLERANCE',
p_message_name => 'PO_PDOI_COLUMN_NULL',
p_token1_name => 'COLUMN_NAME',
p_token1_value => 'INVOICE_CLOSE_TOLERANCE',
p_token2_name => 'VALUE',
p_token2_value_tbl => PO_TYPE_CONVERTER.to_po_tbl_varchar4000(p_line_locations.invoice_close_tolerance),
p_validation_id => PO_VAL_CONSTANTS.c_invoice_close_toler_null,
x_results => x_results,
x_result_type => l_result_type);
IF l_create_or_update_item <> 'Y' THEN
PO_VALIDATION_HELPER.ensure_null(p_calling_module => p_calling_program,
p_value_tbl => PO_TYPE_CONVERTER.to_po_tbl_varchar4000(p_line_locations.receive_close_tolerance),
p_entity_id_tbl => p_line_locations.interface_id,
p_entity_type => c_entity_type_line_location,
p_column_name => 'RECEIVE_CLOSE_TOLERANCE',
p_message_name => 'PO_PDOI_COLUMN_NULL',
p_token1_name => 'COLUMN_NAME',
p_token1_value => 'RECEIVE_CLOSE_TOLERANCE',
p_token2_name => 'VALUE',
p_token2_value_tbl => PO_TYPE_CONVERTER.to_po_tbl_varchar4000(p_line_locations.receive_close_tolerance),
p_validation_id => PO_VAL_CONSTANTS.c_receive_close_toler_null,
x_results => x_results,
x_result_type => l_result_type);
IF l_create_or_update_item <> 'Y' THEN
PO_VALIDATION_HELPER.ensure_null(p_calling_module => p_calling_program,
p_value_tbl => PO_TYPE_CONVERTER.to_po_tbl_varchar4000(p_line_locations.days_early_receipt_allowed),
p_entity_id_tbl => p_line_locations.interface_id,
p_entity_type => c_entity_type_line_location,
p_column_name => 'DAYS_EARLY_RECEIPT_ALLOWED',
p_message_name => 'PO_PDOI_COLUMN_NULL',
p_token1_name => 'COLUMN_NAME',
p_token1_value => 'DAYS_EARLY_RECEIPT_ALLOWED',
p_token2_name => 'VALUE',
p_token2_value_tbl => PO_TYPE_CONVERTER.to_po_tbl_varchar4000(p_line_locations.days_early_receipt_allowed),
p_validation_id => PO_VAL_CONSTANTS.c_days_early_rcpt_allowed_null,
x_results => x_results,
x_result_type => l_result_type);
IF l_create_or_update_item <> 'Y' THEN
PO_VALIDATION_HELPER.ensure_null(p_calling_module => p_calling_program,
p_value_tbl => PO_TYPE_CONVERTER.to_po_tbl_varchar4000(p_line_locations.days_late_receipt_allowed),
p_entity_id_tbl => p_line_locations.interface_id,
p_entity_type => c_entity_type_line_location,
p_column_name => 'DAYS_LATE_RECEIPT_ALLOWED',
p_message_name => 'PO_PDOI_COLUMN_NULL',
p_token1_name => 'COLUMN_NAME',
p_token1_value => 'DAYS_LATE_RECEIPT_ALLOWED',
p_token2_name => 'VALUE',
p_token2_value_tbl => PO_TYPE_CONVERTER.to_po_tbl_varchar4000(p_line_locations.days_late_receipt_allowed),
p_validation_id => PO_VAL_CONSTANTS.c_days_late_rcpt_allowed_null,
x_results => x_results,
x_result_type => l_result_type);
IF l_create_or_update_item <> 'Y' THEN
PO_VALIDATION_HELPER.ensure_null(p_calling_module => p_calling_program,
p_value_tbl => PO_TYPE_CONVERTER.to_po_tbl_varchar4000(p_line_locations.enforce_ship_to_location_code),
p_entity_id_tbl => p_line_locations.interface_id,
p_entity_type => c_entity_type_line_location,
p_column_name => 'ENFORCE_SHIP_TO_LOCATION_CODE',
p_message_name => 'PO_PDOI_COLUMN_NULL',
p_token1_name => 'COLUMN_NAME',
p_token1_value => 'ENFORCE_SHIP_TO_LOCATION_CODE',
p_token2_name => 'VALUE',
p_token2_value_tbl => PO_TYPE_CONVERTER.to_po_tbl_varchar4000(p_line_locations.enforce_ship_to_location_code),
p_validation_id => PO_VAL_CONSTANTS.c_enforce_shipto_loc_code_null,
x_results => x_results,
x_result_type => l_result_type);
IF l_create_or_update_item <> 'Y' THEN
PO_VALIDATION_HELPER.ensure_null(p_calling_module => p_calling_program,
p_value_tbl => PO_TYPE_CONVERTER.to_po_tbl_varchar4000(p_line_locations.allow_substitute_receipts_flag),
p_entity_id_tbl => p_line_locations.interface_id,
p_entity_type => c_entity_type_line_location,
p_column_name => 'ALLOW_SUBSTITUTE_RECEIPTS_FLAG',
p_message_name => 'PO_PDOI_COLUMN_NULL',
p_token1_name => 'COLUMN_NAME',
p_token1_value => 'ALLOW_SUBSTITUTE_RECEIPTS_FLAG',
p_token2_name => 'VALUE',
p_token2_value_tbl => PO_TYPE_CONVERTER.to_po_tbl_varchar4000(p_line_locations.allow_substitute_receipts_flag),
p_validation_id => PO_VAL_CONSTANTS.c_allow_sub_receipts_flag_null,
x_results => x_results,
x_result_type => l_result_type);
IF l_create_or_update_item <> 'Y' THEN
PO_VALIDATION_HELPER.ensure_null(p_calling_module => p_calling_program,
p_value_tbl => PO_TYPE_CONVERTER.to_po_tbl_varchar4000(p_line_locations.receiving_routing_id),
p_entity_id_tbl => p_line_locations.interface_id,
p_entity_type => c_entity_type_line_location,
p_column_name => 'RECEIVING_ROUTING_ID',
p_message_name => 'PO_PDOI_COLUMN_NULL',
p_token1_name => 'COLUMN_NAME',
p_token1_value => 'RECEIVING_ROUTING_ID',
p_token2_name => 'VALUE',
p_token2_value_tbl => PO_TYPE_CONVERTER.to_po_tbl_varchar4000(p_line_locations.receiving_routing_id),
p_validation_id => PO_VAL_CONSTANTS.c_receiving_routing_null,
x_results => x_results,
x_result_type => l_result_type);
WHEN c_accruals_allow_update THEN
PO_PRICE_HELPER.accruals_allow_update(
p_line_id_tbl => p_lines.po_line_id
, x_results => x_results
, x_result_type => l_result_type
);
WHEN c_retro_account_allows_update THEN
PO_PRICE_HELPER.retro_account_allows_update(
p_line_id_tbl => p_lines.po_line_id
, p_price_break_lookup_code_tbl => p_lines.price_break_lookup_code
, x_results => x_results
, x_result_type => l_result_type
);
ELSIF (p_lines IS NOT NULL AND p_action='UPDATE' AND p_headers IS NULL AND p_line_locations IS NULL AND
p_distributions IS NULL AND p_price_differentials IS NULL) THEN
d_position := 20;
l_validation_set MULTISET UNION DISTINCT c_pdoi_line_update_vs;
l_validation_set MULTISET UNION DISTINCT c_pdoi_line_blanket_update_vs;
SELECT VR.rowid
BULK COLLECT INTO l_rowid_tbl
FROM PO_VALIDATION_RESULTS_GT VR
WHERE VR.result_set_id = p_result_set_id
;