Entries from September 2009 ↓
September 28th, 2009 — Development
While doing research for the next release of Hermes, Premiertec’s flagship project management tool, I came across a task where I had to parse a string like
apps.xxpt_chain_controller_pkg.execute
into procedure name, package name and optional schema name. To achieve this I had to count the number of dots in the string.
Being naturally lazy, I decided to give Internet a spin and find a ready answer. To my dismay, all the ready-to-go answers were PL/SQL procedures of questionable quality. The ingenuity of developers did not go beyond reading the string symbol by symbol and, literally, counting dots.
If you are interviewing a PL/SQL developer, please, use this example as an interview question with the proper answer as
select length(p_string) – length(replace(p_string, ‘.’)) from dual
September 21st, 2009 — Development, Fusion, Oracle, R12
Writing Java Concurrent Program
Any Java class that implements interface oracle.apps.fnd.cp.request.JavaConcurrentProgram can be registered as a concurrent program.
The only method which needs to be implemented is
public void runProgram(oracle.apps.fnd.cp.request.CpContext cpcontext)
CpContext provides developer with all attributes of a PL/SQL concurrent program such as output file, log file, and return status plus a database connection. A typical implementation of this method looks like Continue reading →
September 18th, 2009 — Development, Fusion, Oracle, R12
Storing CLOB in database table
Once we have the input stream converted into an ASCII string, we need to store it in the custom table. To perform this operation, we need to generate primary key, and extract the purpose for the upload.
We already discussed the query which generated globally unique primary key, and creation of a view object PrimaryKeyGeneratorVO based on this query. The method which generates the primary key becomes
protected Number generatePrimaryKey()
{
OAViewObject viewObject = getPrimaryKeyGeneratorVO();
viewObject.setMaxFetchSize(1);
viewObject.executeQuery();
return (Number) (viewObject.first().getAttribute(”Id”));
}
Continue reading →
September 17th, 2009 — Development, Fusion, Oracle, R12
Converting Excel to CSV
There are several open source and commercial Java libraries that are capable of reading Excel workbooks. Among those are Apache POI , JExcelAPI, JCom, ExtenXLS7 to name a few. We will use JExcelAPI to recognize and process Excel files. Continue reading →
September 16th, 2009 — Development, Fusion, Oracle, R12
Building UI
First of all, we need to define business objects and explain their usage. The page we are building contains one field on top of the page where the user specifies the file to upload, and then a table below where user select the purpose for the upload. Continue reading →
September 15th, 2009 — Development, Fusion, R12
Technical Design
We build a new OAF page for the user to specify the file to upload. Since we are building a generic mechanism, the user also specifies the purpose of the upload. For example, price lists, or project budgets, or manual invoices. The list of purposes is presented as a table with name and description of the purpose for the upload. An advanced implementation can also display a URL for the file template which users can download and populate with data. Continue reading →
September 14th, 2009 — Development, Fusion, Oracle, R12
Almost any Oracle eBusiness Suite implementation faces a requirement to upload data from Excel. Why? Sometimes, because the end users are used to Excel interface. For example, purchasing department has its own Excel template for requisitions which’s been used for years and everybody likes it and wants to keep on using it. There are also situations where Excel provides a perfect environment for data manipulation and preparation. We found this to be the case almost on all our implementation of Oracle Project Accounting with monthly updates to project budgets. Continue reading →
September 3rd, 2009 — Development
How many of you need to print the address of an operating unit on a custom report or OAF page? How many of you need to include the county? How many of you ended up with a query like
select haou.name organization_name, flv.meaning county
from hr_all_organization_units haou
, hr_locations_all hl
, fnd_lookup_values_vl flv
where haou.location_id = hl.location_id
and flv.lookup_type = hl.style || ‘_COUNTY’
and flv.lookup_code = hl.region_1
and learn that it does not work in Europe? Let me tell you something… Continue reading →
September 1st, 2009 — Development, Fusion, Oracle, R12
Consider the following simple task. The client is running Oracle eBusiness Suite release 11i or 12, and needs to print customer statements or AR dunning letters in a nice looking format with pictures, diagrams, hyperlinks, and fine print.
Definitely, we will be using BI Publisher to convert XML produced by the customer statement or dunning letter report into whatever format our client desires. The key question is: how to apply BI Publisher to customer statement output since customer statement is a spawned process which, as of time of this article, does not allow for BI Publisher template application!? Continue reading →