Entries Tagged 'Development' ↓

Tale of one deployment

Recently we built a killer ADF Fusion application for one of our customers. The solution was built on time using JDeveloper 11g build 5536 (version important). We tested deployment on the integrated WebLogic server on one our Windows XP Pro laptops, deployed test WebLogic 10.3 server on Windows 2003 machine, installed matching ADF Runtime libraries and were in eager anticipation to see our creation run in a production-like environment.

Little did we know… Continue reading →

Why does offshore produce such a bad code?

Recently a good friend of mine asked me

Why does offshore produce such a bad code?

This is not the first time I was asked this question, not to mention myself asking this question. I knew the answer for this question for the last several years, but I did not know how to make change it.

These are my findings. Continue reading →

Location, Location, Location. Part 2.

While building a report, I was asked to print report title that matches the name of the concurrent program, date the report was executed, and the only report paremeter with its meaning.

The title of the report and execution date is simple. The parameter reads its values from an independent value set. So, I started to think how to get hold of the value set ID and what table do I need to read for the meaning, etc. And then!!! I recollected my own blog.

The resulting query is here without much explanations.

select fcr.actual_start_date report_start_date
, fcp.user_concurrent_program_name
, fu.user_name submitted_by
, fcr.argument1 parameter_code
, oe_sys_parameters_util.get_value(fdfcu.flex_value_set_id, fcr.argument1) parameter_description
from fnd_concurrent_requests fcr
, fnd_concurrent_programs_vl fcp
, fnd_user fu
, FND_DESCR_FLEX_COL_USAGE_VL fdfcu
where fcr.concurrent_program_id = fcp.concurrent_program_id
and fcr.requested_by = fu.user_id
and fdfcu.descriptive_flexfield_name = ‘$SRS$.’|| fcp.concurrent_program_name
and fdfcu.application_column_name = ‘ATTRIBUTE1′
and fcr.request_id = fnd_global.conc_request_id

Connecting the dots

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

Uploading Excel Spreadsheet into Oracle eBusiness Suite. Part 6.

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 →

Uploading Excel Spreadsheet into Oracle eBusiness Suite. Part 5.

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 →

Uploading Excel Spreadsheet into Oracle eBusiness Suite. Part 4.

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 →

Uploading Excel Spreadsheet into Oracle eBusiness Suite. Part 3.

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 →

Uploading Excel Spreadsheet into Oracle eBusiness Suite. Part 2.

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 →

Uploading Excel Spreadsheet into Oracle eBusiness Suite. Part 1

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 →