The following lines contain the word 'select', 'insert', 'update' or 'delete':
Procedure OAInsertTempData(
p_report_header_info IN AP_WEB_DFLEX_PKG.ExpReportHeaderRec,
p_report_lines_info IN AP_WEB_DFLEX_PKG.ExpReportLines_A,
p_receipt_errors IN AP_WEB_UTILITIES_PKG.receipt_error_stack,
Custom1_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom2_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom3_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom4_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom5_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom6_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom7_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom8_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom9_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom10_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom11_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom12_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom13_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom14_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom15_Array IN AP_WEB_DFLEX_PKG.CustomFields_A);
l_DataDefaultedUpdateable BOOLEAN;
l_DataDefaultedUpdateable,
l_parse_header_errors,
l_parse_receipt_errors,
l_errortype,
l_techstack
);
l_temp_array.delete; -- bug 5358186
l_debug_info := 'Inserts into the Temporary Table';
OAInsertTempData(
l_report_header_info,
l_report_lines_info,
l_validate_receipt_errors,
Custom1_Array,
Custom2_Array,
Custom3_Array,
Custom4_Array,
Custom5_Array,
Custom6_Array,
Custom7_Array,
Custom8_Array,
Custom9_Array,
Custom10_Array,
Custom11_Array,
Custom12_Array,
Custom13_Array,
Custom14_Array,
Custom15_Array);
Procedure called by OAExpReport to insert into the Temporary Tables .
Input
p_report_header_info IN AP_WEB_DFLEX_PKG.ExpReportHeaderRec,
p_report_lines_info IN AP_WEB_DFLEX_PKG.ExpReportLines_A,
p_receipt_errors IN AP_WEB_UTILITIES_PKG.receipt_error_stack,
Custom1_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom2_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom3_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom4_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom5_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom6_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom7_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom8_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom9_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom10_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom11_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom12_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom13_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom14_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom15_Array IN AP_WEB_DFLEX_PKG.CustomFields_A
Output
p_error_type
p_return_status
p_msg_count
p_msg_data
InputOutput
None
Assumptions
None
Date
01-DEC-2000
*/
Procedure OAInsertTempData(
p_report_header_info IN AP_WEB_DFLEX_PKG.ExpReportHeaderRec,
p_report_lines_info IN AP_WEB_DFLEX_PKG.ExpReportLines_A,
p_receipt_errors IN AP_WEB_UTILITIES_PKG.receipt_error_stack,
Custom1_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom2_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom3_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom4_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom5_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom6_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom7_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom8_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom9_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom10_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom11_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom12_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom13_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom14_Array IN AP_WEB_DFLEX_PKG.CustomFields_A,
Custom15_Array IN AP_WEB_DFLEX_PKG.CustomFields_A) IS
l_debug_info varchar2(1000);
l_debug_info := 'Delete existing data in temporary files';
DELETE FROM ap_web_disc_headers_gt;
DELETE FROM ap_web_disc_lines_gt;
l_debug_info := 'Insert header into temporary table';
INSERT INTO ap_web_disc_headers_gt (EMPLOYEE_ID,
COST_CENTER,
TEMPLATE_ID,
PURPOSE,
REIMBURSEMENT_CURRENCY_CODE,
OVERRIDE_APPROVER_NAME
) VALUES(
to_number(p_report_header_info.employee_id),
p_report_header_info.cost_center,
to_number(p_report_header_info.template_id),
p_report_header_info.purpose,
p_report_header_info.reimbursement_currency_code,
p_report_header_info.override_approver_name);
l_debug_info := 'Insert line info into temporary table';
INSERT INTO ap_web_disc_lines_gt (
START_DATE,
END_DATE,
DAILY_AMOUNT,
RECEIPT_AMOUNT,
RATE,
PARAMETER_ID,
CURRENCY_CODE,
GROUP_VALUE,
JUSTIFICATION,
RECEIPT_MISSING_FLAG,
PROJECT_NUMBER,
TASK_NUMBER,
AWARD_NUMBER,
AMOUNT_INCLUDES_TAX_FLAG,
TAX_CODE_ID,
VAT_CODE,
RECEIPT_ERRORS_FLAG,
ATTRIBUTE_CATEGORY,
ATTRIBUTE1,
ATTRIBUTE2,
ATTRIBUTE3,
ATTRIBUTE4,
ATTRIBUTE5,
ATTRIBUTE6,
ATTRIBUTE7,
ATTRIBUTE8,
ATTRIBUTE9,
ATTRIBUTE10,
ATTRIBUTE11,
ATTRIBUTE12,
ATTRIBUTE13,
ATTRIBUTE14,
ATTRIBUTE15)
VALUES(
to_date(p_report_lines_info(i).start_date, AP_WEB_INFRASTRUCTURE_PKG.getDateFormat),
to_date(p_report_lines_info(i).end_date, AP_WEB_INFRASTRUCTURE_PKG.getDateFormat),
AP_WEB_DB_UTIL_PKG.CharToNumber(p_report_lines_info(i).daily_amount),
AP_WEB_DB_UTIL_PKG.CharToNumber(p_report_lines_info(i).receipt_amount),
to_number(p_report_lines_info(i).rate),
to_number(p_report_lines_info(i).parameter_id),
p_report_lines_info(i).currency_code,
p_report_lines_info(i).group_value,
p_report_lines_info(i).justification,
p_report_lines_info(i).receipt_missing_flag,
p_report_lines_info(i).project_number,
p_report_lines_info(i).task_number,
p_report_lines_info(i).award_number,
p_report_lines_info(i).amount_includes_tax,
to_number(p_report_lines_info(i).taxId),
p_report_lines_info(i).tax_code,
decode(p_receipt_errors(i).error_text, null, C_No, C_Yes),
l_item_description,
P_AttributeCol(1),
P_AttributeCol(2),
P_AttributeCol(3),
P_AttributeCol(4),
P_AttributeCol(5),
P_AttributeCol(6),
P_AttributeCol(7),
P_AttributeCol(8),
P_AttributeCol(9),
P_AttributeCol(10),
P_AttributeCol(11),
P_AttributeCol(12),
P_AttributeCol(13),
P_AttributeCol(14),
P_AttributeCol(15));
DELETE FROM ap_web_disc_headers_gt;
DELETE FROM ap_web_disc_lines_gt;
END OAInsertTempData;
FND_MSG_PUB.Delete_Msg;
FND_MSG_PUB.Delete_Msg;
SELECT 1
INTO v_numRows
FROM dual
WHERE exists
(SELECT 1
FROM ap_expense_report_params expTypes
WHERE expTypes.company_policy_id IS NOT NULL
AND expTypes.category_code in ('MILEAGE', 'PER_DIEM')
AND trunc(sysdate) <= trunc(NVL(expTypes.end_date, sysdate))
AND expTypes.parameter_id = p_parameter_id);
SELECT 1
INTO v_numRows
FROM dual
WHERE EXISTS
(SELECT 1
FROM ap_expense_report_params expTypes
WHERE expTypes.company_policy_id IS NOT NULL
AND expTypes.category_code in ('ACCOMMODATIONS', 'AIRFARE', 'CAR_RENTAL', 'MEALS')
AND trunc(sysdate) <= trunc(NVL(expTypes.end_date, sysdate))
AND expTypes.parameter_id = p_parameter_id);
SELECT 1
INTO v_numRows
FROM dual
WHERE EXISTS
(SELECT 1
FROM ap_expense_report_params expTypes,
ap_pol_cat_options catOptions
WHERE
((catOptions.category_code = 'ACCOMMODATIONS'
AND (END_DATE_FIELD = p_reqd_enabled
OR MERCHANT_FIELD = p_reqd_enabled))
OR
(catOptions.category_code = 'AIRFARE'
AND (MERCHANT_FIELD = p_reqd_enabled
OR TICKET_CLASS_FIELD = p_reqd_enabled
OR TICKET_NUMBER_FIELD = p_reqd_enabled
OR LOCATION_FROM_FIELD = p_reqd_enabled
OR LOCATION_TO_FIELD = p_reqd_enabled))
OR
(catOptions.category_code = 'CAR_RENTAL'
AND (MERCHANT_FIELD = p_reqd_enabled))
OR
(catOptions.category_code = 'MEALS'
AND (ATTENDEES_FIELD = p_reqd_enabled
OR ATTENDEES_NUMBER_FIELD = p_reqd_enabled))
OR
(catOptions.category_code = 'MILEAGE'
AND (DESTINATION_FIELD = p_reqd_enabled
OR LICENSE_PLATE_FIELD = p_reqd_enabled))
)
AND expTypes.category_code = catOptions.category_code
AND trunc(sysdate) <= trunc(NVL(expTypes.end_date, sysdate))
AND expTypes.parameter_id = p_parameter_id);
SELECT 1
INTO v_numRows
FROM dual
WHERE EXISTS
(SELECT 1
FROM ap_expense_report_params expTypes
WHERE expTypes.itemization_required_flag = C_Yes
AND trunc(sysdate) <= trunc(NVL(expTypes.end_date, sysdate))
AND expTypes.parameter_id = p_parameter_id);
SELECT 1
INTO v_numRows
FROM dual
WHERE EXISTS
(SELECT 1
FROM ap_web_vat_setup
WHERE
ENABLED_CODE = C_Yes
AND
(ENABLE_MERCHANT_NAME_CODE = C_REQUIRED
OR ENABLE_MERCHANT_RECEIPT_CODE = C_REQUIRED
OR ENABLE_MERCHANT_TAX_REG_CODE = C_REQUIRED
OR ENABLE_MERCHANT_TAXPAYER_CODE = C_REQUIRED
OR ENABLE_MERCHANT_REFERENCE_CODE = C_REQUIRED));
SELECT 1
INTO v_numRows
FROM dual
WHERE EXISTS
(SELECT 1
FROM AP_POL_EXRATE_OPTIONS WHERE ENABLED = 'Y');
Deleted all occurances of l_PC_present.
Have a diff with earlier version for knowing the occurance of the
policy violations checking.
*/
PROCEDURE CheckForMileagePerDiemPolicy(
p_user_id IN NUMBER,
p_report_header_info IN AP_WEB_DFLEX_PKG.ExpReportHeaderRec,
p_report_lines_info IN OUT NOCOPY AP_WEB_DFLEX_PKG.ExpReportLines_A,
p_header_errors IN OUT NOCOPY AP_WEB_UTILITIES_PKG.expError,
p_receipts_errors IN OUT NOCOPY AP_WEB_UTILITIES_PKG.receipt_error_stack) IS
l_receipt_count BINARY_INTEGER;
| can add other fields to the record PolicyRateOptionsRec and select
| the select statement to get values for other fields
|
| PARAMETERS
| None
|
| MODIFICATION HISTORY
| Date Author Description of Changes
| 28-JUL-2003 Srihari Koukuntla Created
|
*=======================================================================*/
PROCEDURE GetPolicyRateOptions(p_policyRateOptions OUT NOCOPY PolicyRateOptionsRec)
IS
BEGIN
SELECT nvl(default_exchange_rates,'N')
INTO p_policyRateOptions.default_exchange_rates
FROM ap_pol_exrate_options WHERE enabled = 'Y';