Monday, May 7, 2012

Tax Codes not enabled for Internet Expenses


Try the following SQL scripts to help you identify if the setup of tax codes were correctly done or upgraded:

--Query 1
SELECT lookup_code, meaning, description
FROM zx_input_classifications_v
WHERE lookup_type = 'ZX_INPUT_CLASSIFICATIONS'
AND org_id =
AND enabled_flag = 'Y'

--Query 2
SELECT lookup_code, meaning, description
FROM zx_input_classifications_v
WHERE lookup_type = 'ZX_WEB_EXP_TAX_CLASSIFICATIONS'
AND org_id =  
AND enabled_flag = 'Y'

If the tax code appears in both queries, then the tax code should appear in the Internet Expenses module, when the tax code only appears in query 1 above, then you know there is an issue with the tax code.

To fix this issue, follow the additional setups identified in Oracle note 1312692.1 : Payables - Upgrade - Tax Codes not Enabled for Internet Expenses OIE

Tuesday, May 1, 2012

Steps for debugging issues in Oracle


How to capture the back-end FND debugging messages thrown when errors are thrown.

See the action plan below:

(a) Set the following profile options at your user level

FND: Diagnostics: Yes
FND: Debug Log Enabled: Yes
FND: Debug Log Level: Statement
FND: Debug Log Mode: Asynchronous with Cross-Tier Sequencing
FND: Debug Log Module to %


(b) Go to the form or prior step where the issue arises.

At this point, run the following SQL:

select max(log_sequence) from fnd_log_messages;

Note the max(log_sequence) value as &start


(c) Then proceed to replicate the error.

After clicking away the error, re-run the SQL:

select max(log_sequence) from fnd_log_messages;

Note the max(log_sequence) value as &end


(d) Then run

SELECT substr(module,1,70), MESSAGE_TEXT, timestamp, log_sequence
FROM fnd_log_messages msg
WHERE log_sequence between &start and &end
ORDER BY LOG_SEQUENCE


(e) REMOVE PROFILE OPTION VALUES AT YOUR USER LEVEL!!!!


Wednesday, April 11, 2012

R12 SLA Tree: a visual diagram

>> ADR JED JLT

>>>> JLD


>>>>>> AAD

>>>>>>>> SLAM

Where:
ADR = Account Derivation Rules
JED = Journal Entry Description
JLT = Journal Line Type
JLD = Journal Line Definition
AAD = Application Accounting Definition
SLAM = Subledger Accounting Method

Friday, March 2, 2012

Using Folders to manage AP Invoice workloads

Remember the old days when AP functions and workloads were split between AP Invoice Officers using the first letter of the supplier name (we called this the alphabet split), or using the invoice date, or the invoice receipt date.

In today's world, with ERP systems and scanning solutions, the processing of AP invoices is mostly automated. Invoices are often automatically created or imported into the AP Invoice workbench using interface tables or a scanning solution. With these systems in place the majority of invoices do not require any human intervention, while others do. For this last group, the workload distribution can be achieved in different ways, alphabetically, by invoice date (invoice receipt date), or by evenly distributing the workload to the AP Officers using the count of invoices.

I have replicated the alphabet split approach using form folders with embedded queries, sorting unprocessed invoices by first letter of the supplier name, this worked nicely, but this approach had a few disadvantages:
- the workload was often not evenly distributed,
- all invoices from the same supplier were processed by the same AP officer, employee morale was low as the work was monotonous,
- suppliers often called the AP officer directly to find out when their invoices were going to be paid, instead of calling the designated hotline,
- other AP officers did not know how to process these invoices, if there were any particularities related tho this supplier,
- some suppliers would request special attention or request the AP officer to process their invoices in a particular way, instead of applying the standardized process.

The second approach defined above, by distributing the workload using dates, also does not split the workload evenly between the AP Officers, affecting employee morale as well.

The evenly distributed workload approach seems like the best option and can easily be implemented by using the same Form Folders with embedded queries. How did we achieve this you may ask, here's how we did it. We grouped the last 2 digits of the INVOICE_ID (numeric value) into ranges of values, e.g. we created 5 folders with the following ranges: 00-19, 20-39, 40-59, 60-79, and finally 80-99.
So when invoices are migrated from the interface or from the invoice scanning software, the unprocessed AP invoices are allocated evenly between all 5 AP Officers.

I put a smile on the face of the AP manager when this solution was implemented. The team immediately felt more engaged and valued.

Monday, February 20, 2012

How to setup a defaulting DFF value of Default Type SQL Statement

If you need to repeat a value already part of the original transaction and automatically populate it in another area of the same transaction, in this case: the data is located on the AP Invoice header and it needs to be passed to the invoice line.

Then you need to create a DFF with a default type of 'SQL Statement' at the destination level and pass a bind variable into the 'where' clause of the select statement.

Here's an example: let's say there is a value (e.g. attribute4) in the AP invoice header that needs to be copied down to each AP invoice lines, you simply need to have the following default SQL statement for the DFF created at the invocie line level:

select aph.attribute4
from ap_invoice_lines_all apl, ap_invoices_all aph
where aph.invoice_id = apl.invoice_id
and apl.invoice_id = :INV_SUM_FOLDER.invoice_id

In order for the attribute4 from the invoice header to default automatically to the invoice lines, the last clause of the query above requires to pass a bind variable, in this case, it corresponds to ":INV_SUM_FOLDER.invoice_id"

To get the value above, Navigate to the form where the data is located, then extract the 'block'.'field' information by navigating to Help > Diagnostic > Examine

Prefix the combination of the 'block'.'field' with a " : "

My friend Cathy B. also pointed me to this excellent reference explaining Bind Variables: http://docs.oracle.com/cd/A60725_05/html/comnls/us/fnd/values19.htm

Thursday, October 6, 2011

Another helpful query from my friend Jon B.

This query is useful when troubleshooting the WF mailer, and to see if there is an issue with it.

Select * From Wf_Notifications
Where Trunc(Begin_Date) > Trunc(Sysdate-3)
order by 1 desc;

When the WF Mailer issue gets resolved, all notifications with a FAILED or ERROR mail status can be resent using the following concurrent program under the System Administrator responsibility: Resend Failed/Error Workflow Notifications

Wednesday, September 14, 2011

How to set the context in R12

--sometimes you need to run the following:

ALTER SESSION SET NLS_LANGUAGE= 'AMERICAN';

--to set the context, provide the org_id in the SQL script below:
begin
mo_global.set_policy_context('S',"<"org_id">");
end;

--to fetch data for all operating units, and for a specific application
begin
mo_global.init('SQLAP');
end;