Friday, June 25, 2010

Generating report using Java Concurrent Program

While browsing through a standard Cocurrent program, found a interesting and unusual way of generating report using Java Concurrent program.

Program Name : CLE: AP Purchasing Ledger Report
Short Name : CLEF224PVR
Java code called : JCP4XDODataEngine.java
Data template attached in Data Definition : CLEF224PVR.xml
RTF Template representing the design : CLEF224PVR.rtf

The java program calls the data template which has the main SQL query. This file is a xml file and it internally also refers to database package. Later this is processed with RTF template to generate the output. Besides check out the java program to know how to write into log file and access concurrent program parameters and other context values.

Wednesday, June 23, 2010

How to create a VPD (Virtual Private Database) Policy on a table or view in 10g

Standard Package DBMS_RLS can be used to add, delete, enable, disable, refresh VPD policies.

dbms_rls.add_policy('APPS','PO_HEADERS_V','accesscontrol_PO_HEADERS','system','f_policy_po,sec_relevant_cols=>'ORDER_AMOUNT',sec_relevant_cols_opt => dbms_rls.ALL_ROWS);

Parameter 1 - object owner
parameter 2 - Object Table/ View Name
Parameter 3 - Policy Name
parameter 4 - schema of the policy function
Parameter 5 - database function which returns a where clause as string (the function will have the logic to restrict the records to be fetched)
sec_relevant_cols - the column of which the data is restricted from viewing to the user
sec_relevant_cols - setting it to dbms_rls.ALL_ROWS would display all the rows to a user with blank data shown for the restricted column for the records which are non viewable.

Friday, June 18, 2010

Free Java Book

Click here to get free book on Java

How to add a column to LOV in OA Framework?

A. You extend the base view object, and add additional column to this view object's query
B. Using personalizations, add a new field to the specific LOV Page. This can be done by using "create new item" in OA Framework Personalizations.
C. Map the new field that was created above to view object column, by specifying the source view object and souce column.

To know more how to Extend VO in OAF click here

How to remove substitution/extension to a VO object in OAF

There are three ways, but firstly you must understand the basics of how Oracle stores OA Framework substitutions. When you load the substitutions using jpxImporter, Oracle creates a site level personalization, which gets stored in the database. Now to rollback/remove/disable viewobject substitutions
Option A. Delete personalization, using jdr_util.delete_documents
Alternately use "Functional Administrator" responsibility to delete the personalization
Option B. Disable personalization that corresponds to substitution, again using Functional Administrator
Option C. Set profile "Disable personalization" to Yes at site level

The common thing about all three options above is that they all pertain to removal of personalizations that were created as result of view object substitution in OA Framework.

Wednesday, June 16, 2010

How to check standard VO Object has any extension?

Use the following query to find if there is any extension to a given VO Object. Give VO name as parameter to the query.

SELECT JA.* FROM JDR_PATHS JP, JDR_ATTRIBUTES JA
WHERE JP.PATH_DOCID = JA.ATT_COMP_DOCID
AND JP.PATH_NAME = 'VO_OBJECT_NAME'

In the attribute name column against customize column you would find the extensions.

Monday, June 14, 2010

Virtual Private Database

Learn VPD through following links

10g
11g