Professional Documents
Culture Documents
AP Iexp Troubleshoot
AP Iexp Troubleshoot
Applications Integration
PROLOGUE
The backbone of this paper is to provide the Oracle Projects (PA) and Oracle Payables (AP) support people a better understanding of the various processes involved while integrating project related employee expense reports to payables. The paper aims to accomplish this by sighting in its cross hairs the interface processes with all the relevant details with extra ammunition in the form of background processing, case study and trouble shooting tips. The paper also encompasses details of flow of data during various processes.
Key items discussed for each integration point: 1. Data flow during each process and various tables involved which provides all the technical details of the processes. 2. Transactional flow between PA and AP module with all the functional details. 3. Required concurrent manager processes to push or pull data across the integration points and the order in which they should be invoked 4. Various Problems encountered during each process and error messages 5. Troubleshooting/Bug information whichever is applicable 6. Tips to overcome typical error messages. 7. New features in 11i and some of the setup parameters are also discussed briefly. Also this paper does a case study on how to integrate Oracle Projects and Oracle Payables modules to pay the employee expenses.
Encore Presentation
Applications Integration
Encore Presentation
Applications Integration
PA
AP INTEGRATION PROCESSES:
Oracle Payables integrates with Oracle Projects in such a way that Payables Invoices are created based on expense reports entered in Oracle Projects. Oracle Payables can also create pre-payments or advances in Oracle Payables and apply them to Oracle Projects expense reports. But in order to be able to apply pre-payments in Oracle Payables, the expense reports must have been already interfaced or loaded in to Oracle Payables.
We have a web-based Custom Expense application (fully integrated with Oracle Projects) using which all the employees fill up their expense reports online and assign them to the corresponding project & task codes along with all the expenditure details. Once the expense reports are verified by their respective Regional Coordinators, the status of the expense reports are set to VERIFIED and sent to their respective Managers for the approval. After the expense reports are approved by their respective District Managers, the status of these expense reports are set to APPROVED.
A Concurrent Program (SQL Script) is set up in Oracle Projects to execute once every week to transfer the APPROVED expense reports from the web interface into the Project Accounting interface table (Pa_transaction_interface_all). The following vital information is transferred at the web interface during the expense download: Employee_number, expenditure_item_date, project_number, task_number, expenditure_type, quantity, transaction_status_code and expenditure_ending_date.
Note: When populating the Pa_transaction_interface_all table by the import utility, make sure that the transaction_source column is populated exactly as defined in the Transaction Source window in Projects which is usually defined during the Implementation. (Setup->Expenditures->Transaction Sources).
Once the expense information is transferred into the Oracle Projects Interface, the following concurrent processes are invoked in order to complete the transfer into Oracle Payables in the same sequential order as shown below (either using Streamline process or invoking them individually) 1. PRC: Transaction Import 2. PRC: Distribute Expense Report Costs 3. PRC: Interface Expense Reports to Payables 4. AP: Payables Invoice Import 5. PRC: Tieback Expense Reports from Payables.
The following sections of this paper will provide a better understanding of the functionality of various concurrent processes along with the common problems encountered by Collective during PA to AP Integration processes and tips to overcome those typical error messages and exceptions. PRC: TRANSACTION IMPORT Transaction Import is an open Interface Process that allows us to validate and load transactions from external cost collection systems into Oracle Projects. Whenever we import the expense information from an external system
OAUG Forum at COLLABORATE 06
Copyright 2006 Lakshmi Sampath
Encore Presentation
Applications Integration
Oracle Projects records the transaction details and the source of the imported transactions during transaction import.
Transaction import loads transactions as pre-approved expenditure items and expenditure batches are created as having a status of RELEASED. This Import process transfers the data from the project interface table pa_transaction_interface_all in to the Project accounting tables pa_expenditure_batches_all, pa_expenditures_all, pa_expenditure_items_all.
pa_transaction_xface_ctrl_all is used internally by the transaction import program to control processing of pending transactions in the interface table by multiple concurrent requests. One record is inserted into this table for each unique combination of transaction_source/batch_name/expenditure type class record inserted into pa_transaction_interface_all. Each request for the Transaction Import process locks the unprocessed records in the pa_transaction_xface_ctrl_all table that meet the requests selection criteria thereby preventing other requests from attempting to import the same transactions.
Each unique batch name becomes an expenditure batch, and each unique expenditure type class, employee number, and expenditure ending date combination becomes expenditure with in the expenditure batch. The ending date of the expenditure batch is set to the maximum ending date of all the expenditures created within the batch.
PA_EXPENDITURE_GROUPS_ALL
PA_EXPENDITURE_ITEMS_ALL
PA_EXPENDITURE_BATCHES
PA_EXPENDITURES_ALL
Transaction Import automatically validates the data for compatibility with Oracle Projects by ensuring that the columns in the interface table reference the appropriate and active values and columns in Oracle Projects. This validates all the items with in expenditure before it creates expenditure. If at least one item in expenditure fails the validation, Oracle Projects rejects all the items in the expenditure. The rejection reason can be obtained from the transaction_rejection_code in pa_transaction_interface_all. During validation, Transaction Import Process checks whether the expenditure item falls within the project dates, the project status allows transactions, transaction controls and extensions allow the type of charge being made, expenditure items fall with in task dates, the task is a lowest task and is chargeable, the expenditure type is active and the employee is active. Transaction Import process generates two reports: An exception report listing all rejected transactions, and a summary report showing the successfully imported transactions. The exception report will provide rejection reasons for all rejected items. While only the items that are rejected appear on the exception report, Transaction
OAUG Forum at COLLABORATE 06
Copyright 2006 Lakshmi Sampath
Encore Presentation
Applications Integration
Import process rejects the entire expenditure and updates all the items in that expenditure with the status of rejected (sets Transaction_status_code =R in Pa_transaction_interface_all table). You must correct the rejected transactions and then re-run the process. Note: From version 11 onwards, a new form called review transactions has been added in Oracle Projects. (Navigation is: Expenditures -> Transaction Import -> Review Transactions). This form is extremely useful in expediting minor additions to the expenditure batches. This form can also be used to correct rejected transactions in the interface table using this form.
Encore Presentation
Applications Integration
Description: This happens when the expenditure is assigned to a project, which is no longer active. Solution: Assign the expenses to a different Project. 2. Rejection Code: PA_EX_PROJECT_DATE Description: This happens when the expenditure Item date is not within the active dates of the project. Solution: Assign the expenses to a different Project, which was active during the item date, or Change the project start date to an earlier date. 3. Rejection Code: EI_DATE_AFTER_END_DATE Description: This happens when the expenditure item date is after the expenditure ending dates. Solution: Change the expenditure_item_date or the expenditure_ending_date. 4. Rejection Code: INVALID_END_DATE Description: The value for the expenditure ending date is not a valid week ending date. Solution: Change the expenditure_ending_date to a valid weekending date. 5. Rejection Code: INVALID_PROJECT Description: No project exists with the project number specified. Solution: Check to make sure if the project exists. 6. Rejection Code: INVALID_EMPLOYEE Description: No employee exists with the employee number specified. Solution: Check to see if the employee information exists in Projects. 7. Rejection Code: PA_EXP_TASK_TC Description: The transaction violates an expenditure transaction control at the task level. If the transaction control has overlapping assignments with in this expenditure_item_date/ expenditure_ending_date, the transaction gets rejected with the above code. Solution: Make sure there are no overlaps in the PA_TRANSACTION_CONTROLS table for this task_id and project_id. 8. Rejection Code: PA_EXP_TYPE_INACTIVE Description: The expenditure item date falls outside the effective dates of the expenditure type. Solution: Change the expenditure item date, expenditure type, or expenditure types. 9. Rejection Code: PA_EXP_TASK_EFF Description: Expenditure item date is not within the active dates of the task. Solution: Change the expense report task_number to reflect the active task number. 10. Rejection Code: NO_ASSIGNMENT Description: The employee does not have any valid assignment. Solution: This was one of the issues with our Import. Even though the assignment information existed in all the HR tables, the assignment wouldnt show up in the Applications. We kept getting the rejection code NO ASSIGNMENT even after updating the member assignment in the forms. After doing some research on this issue, we figured out that: The min (effective_start_date) for each employee in per_all_assignments_f (per_assignments_f in V10.7) table should match the effective_start_date in per_all_people_f (per_people_f in V 10.7) table and date_start column in per_periods_of_service table. If they dont match, then the assignment wont show up in the Applications. So make sure the start dates of the employees in all the HR tables are in sync.
OAUG Forum at COLLABORATE 06
Copyright 2006 Lakshmi Sampath
Encore Presentation
Applications Integration
11. Rejection Code: NO_MATCHING_ITEM Description: No eligible expenditure item exists in PA for this adjustment. Solution: If the transaction is an adjustment with a negative quantity, and the unmatched negative flag is not set to Yes, an original, approved, un reversed expenditure item matching the transactions employee/organization, item date, expenditure type, project, task, reversing quantity, reversing cost and nonlabor resource and non-labor organization must exist. Also, the matching expenditure item must have been originally loaded from the same transaction source. Note: If the employee number is specified, transaction import ignores any value for the organization and derives the organization value based on the employees assignment. Transactions with any other expenditure type classes (other than Expense Reports) do not require an employee number.
Behind the scenes, this program distributes the expense report data from Pa_expenditures_all and Pa_expenditure_items_all tables in to pa_cost_distribution_lines_all table. This process picks up all the rows from Pa_expenditure_items_all table where the column cost_distributed_flag is set to N. Once the cost is distributed, the cost_distributed_flag will be set to Y
Auto accounting is a critical piece of project costing. When this distribute process runs, it invokes the Auto accounting function Expense Report Cost Account and populates the respective Debit CCID (dr_code_combination_id column) in the Pa_cost_distribution_lines_all table (cdl).
When distributing costs, Project Accounting refers to the transactions expenditure item date to determine the correct Project Accounting period to post the transaction to. The expenditure item date is the date the work was performed, or the date when the expense is expected to have incurred. If the respective Project Accounting period is closed, Project Accounting will post the transaction to the earliest open period, as PA Date is determined based on the first open or future period that is on or after the expenditure_item_date.
After the successful completion of the above process, a row will be created in pa_expenditure_batches_all table. Also, the transfer_status_code column in the cdl table will be set to P and batch_status_code column in Pa_expenditure_batches_all will be set to RELEASED
Encore Presentation
Applications Integration
PA_EXPENDITURES_ALL
PA_EXPENDITURE_ITEMS_ALL
PA_EXPENDITURE_BATCHES
PA_COST_DISTRIBUTION_LINES_ALL
1. Rejection Code: KEY_FLEX_FAIL-Invalid Accounting Flexfield and AA_NULL_CCID- Auto Accounting Error: null ccid Description: The GL account returned by Auto Accounting does not pass validation rules defined for the gl account and the code combination id derived by AutoAccounting is invalid respectively. Solution: Check to see if the project code, task code and Organization_id are correct. Find out which gl code the above combination will hit. Make sure you havent excluded this particular GL code in the Crossvalidation rules and make sure dynamic inserts are turned on. 2. Rejection Code: AA_FAIL - Incomplete Autoaccounting Rules Description: A GL account could not be determined for the cost distribution line, due to incomplete Auto Accounting setup Solution: Check to see if the Project_code, task_code, incurred_by_organization_id are correct. Everything should be in sync in order to avoid this. 3. Rejection Code: NO_PA_DATE Description: Project Accounting Period is not open Solution: Make sure your PA Period is open.
This PATTER process should be invoked after successful completion of PRC: Distribute Expense Report Costs
OAUG Forum at COLLABORATE 06
Copyright 2006 Lakshmi Sampath
Encore Presentation
Applications Integration
process. Irrespective of whether we run the interface process from PA to AP as a Streamline process or a Standalone process, this PRC: Interface Expense Reports to Payables Process is the nerve center of the integration between PA and AP.
The GL Date of the expense report cost determines the accounting period in which a transaction is posted to a GL account. In Oracle Projects, the GL Date for costs is the end date of the earliest open or future GL period that is on or after the latest PA Date of the cost distribution lines included in an expense report. All cost distribution lines for an expense report are sent together to Payables and use the same GL date. This GL date becomes the GL date of the invoice in payables.
This process invokes the autoaccounting function Expense Report Liability Account to populate the liability account (cr_code_combination_id in pa_cost_distribution_lines_all and accts_pay_code_combination_id in ap_expense_report_headers_all) for the invoices. It is imperative to note that the PA Auto accounting rule takes precedence over the employees default expense account when determining the invoice liability account (and also it does not invoke Account Generator/ Flexbuilder).
This interface program interfaces and transfers data from pa_cost_distribution_lines_all table (Oracle Projects) into ap_expense_report_headers_all and ap_expense_report_lines_all tables (Oracle Payables Interface). This process checks for transfer_status_code column in pa_cost_distribution_lines_all table. If the transfer_status_code column in cdl is set to P, then this process will interface those expense reports to AP. When this process starts, it will set the cost_distributed_flag column in the pa_expenditure_items_all table to S so that no other process will pick up these rows when the above concurrent program is in process.
If this process completes successfully, it will set the cost_distributed_flag column in pa_expenditure_items_all to Y and transfer_status_code column in pa_cost_distribution_lines_all table to T and purgeable_flag column in the ap_expense_report_headers_all table to No. If the process aborts in between due to some reason, then transfer_status_code column in pa_cost_distribution_lines_all table will be set to X and rejection_reason will indicate the reason why it failed and cost_distributed_flag in pa_expenditure_items_all table will remain as S
Note: If expense reports from any source fail to post to Payables, we may need to redistribute costs (using the PRC: Distribute Expense Report Costs process) before we send the expense reports to Payables again.
PA_COST_DISTRIBUTION_LINES_ALL
AP_EXPENSE_REPORT_HEADERS_ALL
AP_EXPENSE_REPORT_LINES_ALL
Encore Presentation
Applications Integration
Transactions may fail during distribution and interfacing if the Auto-accounting rules are incomplete. Typically, Auto-Accounting rules require occasional updates. For e.g. if a new expenditure type is created and is not updated in the Auto-Accounting rules, transactions using this new expenditure type turn out to be exceptions.
1. Problem: The process does not pick up expenditure items with transfer_status_code=P (pending). No error messages appear. Solution: Set Automatic Release to YES for PRC: Distribute Expense Report Costs. (Note: 1068250.6, 1060896.6) 2. Problem: After running the PRC: Submit Interface Streamline Processes with Streamline Option: DXEU, the process completes with a status of Error and Rejection Reason No Open Project Accounting Period or Could not create a valid GL Date. Solution: Verify all the periods are open in PA, AP and GL. (Note: 1080222.6)
3. Problem: After running the PRC: Submit Interface Streamline Processes either individually or as a streamline, you get an error Combination Missing Description: We got this error twice so far, both times tremendous time was spent analyzing and finding out the fix and both times, the fix was different but the approach was the same. Solution: Once you get the above error, check to make sure the Auto accounting rule is setup correctly for Liability rule for expense reports. If everything is setup correctly, and if you still get the above error, then do the following queries in SQL Plus: ( Advisory Note: Although the following solutions worked for us, it might/might not resolve your problem. Always consult Oracle for support and use the following solutions for research purposes only )
i)
select * from pa_cost_distribution_lines_all where transfer_status_code like X and transfer_rejection_reason like Missing data on record to be transferred% and cr_code_combination_id is null;
10
Encore Presentation
Applications Integration
or
select * from pa_cost_distribution_lines_all where expenditure_item_id in (select expenditure_item_id from pa_expenditure_items_all where cost_distributed_flag like S) *** If zero rows are returned, then do the following query. Otherwise go to
ii)
If no rows are retrieved here also, then this fix will not help. If a few rows are retrieved, then you can assume that PRC: Interface Expense Report costs to Payables was successful and there were some problems with the next two processes.
select * from ap_expense_report_headers_all where vouchno=0 and accts_pay_code_combination_id is null;
*** get the report_header_id for the retrieved rows If no rows are retrieved, then this error may be due to some other reason.
iii) select * from ap_expense_report_lines_all where report_header_id=&report_header_id;
If you have retrieved at least one row for i) and ii) and none for iii) then following may be the fix for your problem. But in any case open a TAR with Oracle and suggest them these solutions.
Solution I:
select where and count(*) from ap_expense_report_headers_all vouchno=0 accts_pay_code_combination_id is null;
If you get the count in multiples of 100, then this is due to bug #1551379 (Ref# TAR-13305123.6) You have to delete one expense report and process the rest of the expense reports first and then process one expense report separately. This will resolve the issue. This issue is finally resolved in 1701594 for versions 10.7, 11.0 and 11.5.
Solution II: Find out the Patch level you are on PA. Refer to bug# 502834 and 502829. The following solution worked for us: (Ref# TAR-12491720.600) After deleting the rows in ap_expense_report_headers_all, we updated the transfer_status_code in pa_cost_distribution_lines_all=P (from X) and then we applied the following patches, Server-side : 502834 and Client-side: 502829 and re-ran the process again. This resolved our problem.
11
Encore Presentation
Applications Integration
Payables processes all expense reports entered since the last time you submitted Payables Invoice Import and identifies the invoices you create from Oracle Projects expense reports with a source of Oracle Projects. If you enable the Automatically Create Employee As Supplier in the Payables Option, Payables automatically creates suppliers and supplier sites for employees who are not already suppliers. If you do not enable this option, you must manually enter the employee as a supplier before submitting Payables Invoice Import.
If PRC: Interface Expense Reports to Payables process is completed successfully, then this process will continue. Otherwise this will abort by itself.
AP_EXPENSE_REPORT_HEADERS_ALL AP_EXPENSE_REPORT_LINES_ALL
AP_INVOICES_ALL
AP_INVOICE_DISTRIBUTIONS_ALL
1. Rejection Code: Error Code: Addr Line [1-3] Too Large: Description: Invoice Import attempted to create a supplier from an employee and the address line for the employee home address exceeds 35 characters. This happens all the time because, In PA module, (per_addresses table) the datatype for address_line[1-3] have a datatype of varchar2(60) and in AP (po_vendor_sites table) the datatype for address_line[1-3] have a datatype of varchar2(35). So anytime, the address_line[1-3] exceeds 35 characters, we will get this error. Solution: Login to PA module, go to Setup, HR, Employees, Query the employee for whom we have this error, then click on More, Addresses and change the address line [1-3] and reduce the character length to less than 35 and do the import. It should work fine.
OAUG Forum at COLLABORATE 06
Copyright 2006 Lakshmi Sampath
12
Encore Presentation
Applications Integration
2. Rejection Code: Error Code: Create Duplicate Supplier: Description: This may be due to any of the following reasons: When you try to create an expense report for an employee name that is not already a supplier and a supplier name already exists for the same employee . Login to AP module, go to Suppliers screen and query the employee name and under Classification see if you have checked One Time Check box. Solution: If i) is true, you know what to do. If ii) is true then Remove the One Time Checkbox.
3. Rejection Code: Error Code: Create EFT Site Description: The Financials Option for payment method is Electronic. The employee exists as a supplier in Oracle Payables, but is missing a supplier site complete with bank information. Solution: Enter the necessary bank information in the supplier site.
4. Rejection Code: No Invoice Distributions with Negative amounts gets imported into Payables (Note1077676.6) Description: This happens when you use Paranthesis ( ) to denote a negative amount instead of minus sign. Payables will only recognize a negative amount in the following format -10 and not (10). Solution: Enter manual distributions for the invoices that have already been imported. For future imports, make sure the negative amounts use the minus sign.
5. Rejection Code: Error code: Create EDI Site Description: This is a Setup Problem. When we setup Supplier sites in Payables, the site name should be either OFFICE or HOME. If not, then we will get this exception. Solution: Create a new site called HOME or OFFICE for the supplier.
13
Encore Presentation
Applications Integration
EPILOGUE
All the sections that have been discussed in this paper aims to achieve not only a beneficial understanding but also to aid and assist the support folks in eliminating the life spans of the typical and not so typical problems encountered during each of the processes. And so with a closing thought that although tremendous advances have and are being made in this subject area to handle the processes and tackle all arising problems, this paper strives to be a small step in that direction and hopes to be a part of that tide in bringing to shore a trove of vital information.
ACKNOWLEDGEMENTS
I would like to express my sincere thanks and gratitude to my dear husband Ram Ganapathy from Dell Computer Corporation for all the inspiration and guidance provided in writing this paper.
OAUG Forum at COLLABORATE 06
Copyright 2006 Lakshmi Sampath
14
Encore Presentation
Applications Integration
15
Encore Presentation
Applications Integration
PA tables
(pa_expenditures_all pa_expenditure_items_all)
PA_cost_distribution_lines_all
AP Interface Tables
(ap_expense_report_headers_all
ap_expense_report_lines_all)
16