The following lines contain the word 'select', 'insert', 'update' or 'delete':
PROCEDURE Delete_Error_Records(p_batch_id NUMBER,
p_adjustments_exist IN VARCHAR2,
p_process_tax IN VARCHAR2,
p_process_configurations IN VARCHAR2)
IS
l_return_status VARCHAR2(1);
DELETE from OE_ORDER_HOLDS
WHERE header_id = G_ERROR_REC.header_id(i);
DELETE from OE_SALES_CREDITS
WHERE header_id = G_ERROR_REC.header_id(i);
INV_SalesOrder.Delete_MTL_Sales_Orders_Bulk
(p_api_version_number => 1.0
,p_error_rec => G_ERROR_REC
,x_return_status => l_return_status
,x_message_count => l_msg_count
,x_message_data => l_msg_data
);
oe_debug_pub.add( 'ERROR IN DELETE_MTL_SALES_ORDERS_BULK :' ||L_RETURN_STATUS ) ;
DELETE from OE_ORDER_LINES
WHERE orig_sys_line_ref in
(select orig_sys_line_ref from oe_lines_iface_all a
where nvl(a.error_flag, 'N') = 'Y'
and a.orig_sys_document_ref=G_ERROR_REC.orig_sys_document_ref(i));
DELETE from OE_ORDER_HEADERS
WHERE header_id = G_ERROR_REC.header_id(i)
and not exists (select 1 from oe_order_lines
where header_id=G_ERROR_REC.header_id(i));
DELETE from OE_ORDER_LINES
WHERE header_id = G_ERROR_REC.header_id(i);
DELETE from OE_ORDER_HEADERS
WHERE header_id = G_ERROR_REC.header_id(i);
DELETE from ONT_DBI_CHANGE_LOG
WHERE header_id = G_ERROR_REC.header_id(i);
DELETE from OE_PRICE_ADJUSTMENTS
WHERE header_id = G_ERROR_REC.header_id(i);
OE_BULK_CONFIG_UTIL.Delete_Configurations
( p_error_rec => G_ERROR_REC
,x_return_status => l_return_status
);
oe_debug_pub.add( 'ERROR IN OE_BULK_CONFIG_UTIL.Delete_Configurations :'
||L_RETURN_STATUS ) ;
oe_debug_pub.add( 'Exiting Delete_Error_Records :');
, 'Delete_Error_Records'
);
END Delete_Error_Records;
UPDATE OE_HEADERS_IFACE_ALL
SET ERROR_FLAG = 'Y'
WHERE REQUEST_ID = G_REQUEST_ID
AND ORDER_SOURCE_ID = G_ERROR_REC.order_source_id(i)
AND ORIG_SYS_DOCUMENT_REF = G_ERROR_REC.orig_sys_document_ref(i)
AND NOT EXISTS
(SELECT 1
FROM oe_lines_iface_all b
WHERE b.orig_sys_document_ref = G_ERROR_REC.orig_sys_document_ref(i)
AND b.order_source_id = G_ERROR_REC.order_source_id(i)
AND nvl(error_flag, 'N') = 'N');
UPDATE OE_HEADERS_IFACE_ALL
SET ERROR_FLAG = 'Y'
WHERE REQUEST_ID = G_REQUEST_ID
AND ORDER_SOURCE_ID = G_ERROR_REC.order_source_id(i)
AND ORIG_SYS_DOCUMENT_REF = G_ERROR_REC.orig_sys_document_ref(i);
PROCEDURE Update_DBI_Log
( p_line_rec IN OE_WSH_BULK_GRP.Line_Rec_Type
, x_return_status OUT NOCOPY VARCHAR2
)
IS
l_header_id NUMBER;
l_last_update_date DATE;
INSERT INTO ONT_DBI_CHANGE_LOG
( HEADER_ID
,LINE_ID
,SET_OF_BOOKS_ID
,CURRENCY_CODE
,LAST_UPDATE_DATE
)
VALUES
( p_line_rec.header_id(I)
,p_line_rec.line_id(I)
,l_set_of_books_id
,l_currency_code
,sysdate
);
,'Update_DBI_log');
END Update_DBI_Log;
SELECT hsecs INTO l_start_time from v$timer;
SELECT hsecs INTO l_end_time from v$timer;
SELECT hsecs INTO l_start_time from v$timer;
SELECT hsecs INTO l_end_time from v$timer;
SELECT hsecs INTO l_start_time from v$timer;
SELECT hsecs INTO l_end_time from v$timer;
SELECT hsecs INTO l_start_time from v$timer;
SELECT hsecs INTO l_end_time from v$timer;
SELECT hsecs INTO l_start_time from v$timer;
SELECT hsecs INTO l_end_time from v$timer;
SELECT hsecs INTO l_start_time from v$timer;
SELECT hsecs INTO l_end_time from v$timer;
SELECT hsecs INTO l_start_time from v$timer;
SELECT hsecs INTO l_end_time from v$timer;
SELECT hsecs INTO l_start_time from v$timer;
SELECT hsecs INTO l_end_time from v$timer;
SELECT hsecs INTO l_start_time from v$timer;
SELECT hsecs INTO l_end_time from v$timer;
SELECT hsecs INTO l_start_time from v$timer;
SELECT hsecs INTO l_end_time from v$timer;
SELECT hsecs INTO l_start_time from v$timer;
SELECT hsecs INTO l_end_time from v$timer;
-- Selecting hsecs from v$times is changed to execute only when debug
-- is enabled, as hsec is used for logging only when debug is enabled.
IF l_debug_level > 0 Then
SELECT hsecs INTO l_start_time from v$timer;
-- Selecting hsecs from v$times is changed to execute only when debug
-- is enabled, as hsec is used for logging only when debug is enabled.
IF l_debug_level > 0 Then
SELECT hsecs INTO l_end_time from v$timer;
select hsecs into l_start_time from v$timer;
select hsecs into l_end_time from v$timer;
SELECT hsecs INTO l_start_time from v$timer;
OE_Bulk_Header_Util.Insert_Headers
( p_header_rec => G_HEADER_REC
,p_batch_id => p_batch_id
);
SELECT hsecs INTO l_end_time from v$timer;
FND_FILE.PUT_LINE(FND_FILE.LOG,'Time spent in Insert_headers is (sec) '||((l_end_time-l_start_time)/100));
SELECT hsecs INTO l_start_time from v$timer;
OE_Bulk_Line_Util.Insert_Lines
( p_line_rec => G_LINE_REC
);
SELECT hsecs INTO l_end_time from v$timer;
FND_FILE.PUT_LINE(FND_FILE.LOG,'Time spent in Insert_Lines is (sec) '||((l_end_time-l_start_time)/100));
SELECT hsecs INTO l_start_time from v$timer;
SELECT hsecs INTO l_end_time from v$timer;
-- Selecting hsecs from v$times is changed to execute only when debug
-- is enabled, as hsec is used for logging only when debug is enabled.
IF l_debug_level > 0 Then
SELECT hsecs INTO l_start_time from v$timer;
Update_DBI_Log(p_line_rec => G_LINE_REC
,x_return_status => l_return_status
);
-- Selecting hsecs from v$times is changed to execute only when debug
-- is enabled, as hsec is used for logging only when debug is enabled.
IF l_debug_level > 0 Then
SELECT hsecs INTO l_end_time from v$timer;
FND_FILE.PUT_LINE(FND_FILE.LOG,'Time spent in Update DBI Logs is (sec) '
||((l_end_time-l_start_time)/100));
-- Selecting hsecs from v$times is changed to execute only when debug
-- is enabled, as hsec is used for logging only when debug is enabled.
IF l_debug_level > 0 Then
SELECT hsecs INTO l_start_time from v$timer;
OE_Bulk_Price_Pvt.Insert_Adjustments(p_batch_id, l_return_status);
-- Selecting hsecs from v$times is changed to execute only when debug
-- is enabled, as hsec is used for logging only when debug is enabled.
IF l_debug_level > 0 Then
SELECT hsecs INTO l_end_time from v$timer;
FND_FILE.PUT_LINE(FND_FILE.LOG,'Time spent in Inserting Price Adjs is (sec) '
||((l_end_time-l_start_time)/100));
-- Selecting hsecs from v$times is changed to execute only when debug
-- is enabled, as hsec is used for logging only when debug is enabled.
IF l_debug_level > 0 Then
SELECT hsecs INTO l_start_time from v$timer;
-- Selecting hsecs from v$times is changed to execute only when debug
-- is enabled, as hsec is used for logging only when debug is enabled.
IF l_debug_level > 0 Then
SELECT hsecs INTO l_end_time from v$timer;
Delete_Error_Records(p_batch_id,
p_adjustments_exist,
p_process_tax,
p_process_configurations);
-- Selecting hsecs from v$times is changed to execute only when debug
-- is enabled, as hsec is used for logging only when debug is enabled.
IF l_debug_level > 0 Then
SELECT hsecs INTO l_start_time from v$timer;
-- Selecting hsecs from v$times is changed to execute only when debug
-- is enabled, as hsec is used for logging only when debug is enabled.
IF l_debug_level > 0 Then
SELECT hsecs INTO l_end_time from v$timer;
SELECT hsecs INTO l_start_time from v$timer;
SELECT hsecs INTO l_end_time from v$timer;
SELECT hsecs INTO l_start_time from v$timer;
SELECT hsecs INTO l_end_time from v$timer;
SELECT 'Y'
INTO l_adjustments_exist
FROM OE_PRICE_ADJS_INTERFACE a, OE_HEADERS_IFACE_ALL h
WHERE h.batch_id = p_batch_id
AND a.order_source_id = h.order_source_id
AND a.orig_sys_document_ref = h.orig_sys_document_ref
AND rownum = 1;
SELECT hsecs INTO l_start_time from v$timer;
SELECT hsecs INTO l_end_time from v$timer;
SELECT hsecs INTO l_start_time from v$timer;
SELECT hsecs INTO l_end_time from v$timer;
SELECT hsecs INTO l_start_time from v$timer;
OE_Bulk_Value_To_Id.INSERT_ERROR_MESSAGES(p_batch_id);
SELECT hsecs INTO l_end_time from v$timer;
SELECT hsecs INTO l_start_time from v$timer;
SELECT hsecs INTO l_end_time from v$timer;
SELECT count(*)
INTO l_count
FROM fnd_descr_flex_column_usages
WHERE APPLICATION_ID = 660
AND DESCRIPTIVE_FLEXFIELD_NAME = p_flex_name
AND ENABLED_FLAG = 'Y'
AND ROWNUM = 1;