The following lines contain the word 'select', 'insert', 'update' or 'delete':
PROCEDURE RCV_824_INSERT (X_Interface_Header IN RCV_ROI_PREPROCESSOR.header_rec_type,
X_Type IN VARCHAR2) IS
/* This is for creating the lines row for 824 */
cursor get_header_error_rows is
select error_message, error_message_name
from po_interface_errors pie
where
pie.interface_header_id = X_interface_header.header_record.header_interface_id and
pie.interface_line_id is null;
The interface_header_id can be null only in the case of error messages inserted
for transactions that are processed thru forms.
But we generate Application advices for errors that occur while processing
the ROI. Not for errors generated thru forms. So we can remove the nvl condition.
Also added a condition pie.interface_header_id is not null. */
cursor get_line_error_rows is
select item_num, document_num, document_line_num,
barcode_label, error_message, error_message_name
from rcv_transactions_interface rti, po_interface_errors pie
where pie.interface_line_id = rti.interface_transaction_id and
pie.interface_header_id =
X_interface_header.header_record.header_interface_id and
pie.interface_line_id is not null and
pie.interface_header_id is not null;
SELECT msi.concatenated_segments, poh.segment1, pol.line_num, rsl.bar_code_label,
error_message, error_message_name
FROM po_interface_errors pie, rcv_shipment_lines rsl ,
mtl_system_items_kfv msi, po_headers poh, po_lines pol
WHERE pol.po_line_id = rsl.po_line_id
AND poh.po_header_id = rsl.po_header_id
AND msi.inventory_item_id (+)= rsl.item_id
AND NVL(msi.organization_id, rsl.to_organization_id) = rsl.to_organization_id
AND pie.interface_line_id = rsl.shipment_line_id
AND NVL(pie.interface_header_id , X_interface_header.header_record.header_interface_id) =
X_interface_header.header_record.header_interface_id
AND pie.interface_line_id is not null;
select tp_header_id, address_line1, address_line2, address_line3,
city, zip, country, state, province, ece_tp_location_code
into x_tp_header_id, x_entity_address1, x_entity_address2, x_entity_address3,
x_entity_city, x_entity_postal_code, x_entity_country, x_entity_state,
x_entity_province, x_tp_location_code
from po_vendor_sites where po_vendor_sites.vendor_site_id = X_interface_header.header_record.vendor_site_id;
asn_debug.put_line('RCV_824_S.RCV_824_INSERT ' || sqlcode);
END RCV_824_INSERT;
PROCEDURE rcv_824_insert(
x_interface_header IN rcv_shipment_header_sv.headerrectype,
x_type IN VARCHAR2
) IS
x_temp rcv_roi_preprocessor.header_rec_type;
rcv_824_insert(x_temp,x_type);
END rcv_824_insert;