<-----Google Analytics Code Start----> <-----Google Analytics Code Close---->
Skip to content

Green

color

Default screen resolution  Wide screen resolution  Increase font size  Decrease font size  Default font size  Skip to content Default color Pink color Green color Green color

Related Items

This website has now moved to http://apps2fusion.com





Extend VO in OA Framwork | Print |  E-mail
Written by Anil Passi   
Saturday, 09 December 2006
Please find an article that explains the steps to modify LOV [list of values] by extending [not customization] of OA Framework.

As you would already know, LOV’s in OA Framework are driven by View Objects.
In D2K, if we wish to modify a query of an LOV, we could do so using CUSTOM.pll.

But there were limitations in CUSTOM.pll when it came to mapping new LOV columns to Screen fields.

In this example, I will show you how something similar can be achieved without a single customization, by leveraging Extensions to View Objects using Jdeveloper[OA Framework].

There can be two variations to this requirement:-
a. Simply display a new field in LOV
b. Do the a) above plus map the new LOV field to existing field on main screen.
In this example, I will specify the steps for doing both a + b

Please note the following:-
1. This example below is a demonstration of steps, I haven’t implemented this specific example on any Production System. The idea is to get you started with doing extensions to view Objects OA Framework using jDeveloper.
2. I hope you have already read the article regarding extensions of EO, which was a real life iProcurement example for rebuilding charge accounts. The article for extending EO for iProc Account Generation can be accessed from this link
3. This specific demonstration was prepared on 11.5.10 CU2 instance.


Following steps will be followed to extend VO:-
1. We create a new custom database view that has extra columns which we wish to display in LOV. Alternately you can embed your new SQL Statement too in extended VO. However I find usage of view beneficial, because in the event of bug fixes, codefix can be delivered without hopefully touching OA Framework.
2. Next we extend the VO, but prior to doing so, you need to FTP all relevant the files from $JAVA_TOP/oracle/apps/../..
Include those directories in your Project Classpath in jDev.
You will also need to open the respective server.xml file to see those objects.
3. Optionally you may also decide to FTP the XML  MDS documents. These are in $XX_TOP/mds
4. Extend the view object
5. Deploy the extended files to $JAVA_TOP/oracle/apps/../..
6. Import the substitution definition using jpx
Note: The above 6 steps will add a new field to the VO, without actually customization of LOV VO
7. Personalize the LOV Region, by going to the LOV, and add a new region field using personalization[add new item]. Also using the personalization, define a mapping for the LOV field, so that its value gets copied to the desired field in main page.
Note: In order to do these personalization, you should have access to the MDS page, preferably in jdeveloper, so that you know exact names for those fields.


Modify View as below:-
CREATE OR REPLACE VIEW XXICX_PA_PROJECTS_EXPEND_V AS
SELECT ppev."PROJECT_ID"
       ,ppev."PROJECT_NUMBER"
       ,ppev."PROJECT_NAME"
       ,ppev."PROJECT_DESCRIPTION"
       ,ppev."START_DATE"
       ,ppev."COMPLETION_DATE"
       ,ppev."PROJECT_TYPE_CLASS_CODE"
       ,ppev."PROJECT_NUMBER_SORT_ORDER"
       ,ppev."PROJECT_TYPE"
       ,ppev."CARRYING_OUT_ORGANIZATION_ID"
       ,ppev."PROJECT_CURRENCY_CODE"
       ,ppev."ALLOW_CROSS_CHARGE_FLAG"
       ,ppev."PROJECT_RATE_DATE"
       ,ppev."PROJECT_RATE_TYPE"
       ,ppev."PROJECT_OU"
       ,ppev."EXPENDITURE_OU"
       ,ppev."PROJFUNC_CURRENCY_CODE"
       ,ppev."PROJFUNC_COST_RATE_DATE"
       ,ppev."PROJFUNC_COST_RATE_TYPE"
       ,lov.task_number AS xxicx_task_number
       ,lov.task_id AS xxicx_task_id
       ,xx_get_org_id_from_name(lov.org_name) AS xxicx_org_id
       ,lov.org_name AS xxicx_org_name
       ,lov.award_id AS xxicx_award_id
       ,lov.award_number AS xxicx_award_number
FROM   xx_por_project_lov_v lov, pa_projects_expend_v ppev
WHERE lov.project_id = ppev.project_id

  

Identify the VO to be extended, and doubleclick to open it. This is to ensure that you have FTP’ed the necessary objects correctly.
Image



Now, lets create a new VO, by right clicking on project

Image

 

 

For this demo, I am creating the extension in Standard namespace, however when doing changes for real system, you must do so in a custom directory location.
Give this new VO a name xxicxProjectPALovVOEx

Also specify that it extends oracle.apps.icx.lov.server.ProjectPALovVO

Image

 

Click next, and leave EO section blank here, as there is no Entity Object needed for this LOV. 

Image

 

Add the desired fields one by one. The existing columns from the VO being extended will already be listed here
Image

 


After adding all columns, the screen will look as below
Image

 

Now, you can enter your new query
Image

 

Here is the finalized list of columns in your query

Image

 

Important, note down the option to Generate java files for row level

Image

    

Extended View Object created as below

Image

 

 

Here is your Auto generated code [by jDeveloper]
You can see that the new VO class extends existing VO Class

Image

 

 

 Now do substitutions in BC4J, right click on project
Image

 

Select substitutions. On left pane you select the VO being substituted
and right hand pane the new VO

Image


This would have create a .jpx file for you as below.

<?xml version="1.0" encoding='windows-1252'?>
<!DOCTYPE JboProject SYSTEM "jbo_03_01.dtd">
<JboProject
   Name="xxIcxProjectLOVSubst"
   SeparateXMLFiles="true"
   PackageName="" >
   <DesignTime>
      <Attr Name="_version" Value="9.0.3.13.75" />
      <Attr Name="_jprName" Value="xxIcxProjectLOVSubst.jpr" />
      <Attr Name="_ejbPackage" Value="false" />
   </DesignTime>
   <Substitutes>
      <Substitute OldName ="oracle.apps.icx.por.schema.server.PoRequisitionLineEO" NewName ="oracle.apps.icx.por.schema.server.xxicPoRequisitionLineEO" />
   </Substitutes>
</JboProject>



Load the jpx file. For details see the article http://oracle.anilpassi.com/iprocurement-11.5.10-rebuild-charge-account-4.html

Now, personalize the LOV region, by navigating to LOV, so that a new field item can be created for each new column added to extended View Object
A sample entry will look like below. Effectively, here you create a field in LOV and link that to new column in extended View Object.

Image

Next, you go to the main page, Lets say we wish to copy the LOV field Award Number to a field named Award Number in main screen.

For this, you can use personalization to define column mapping, as below.
Image


Also need to Copy the extended files to $JAVA_TOP/oracle/apps/…/lov/server
I recompile those on server to ensure that nothing special happened on my PC.
$javac xxicxProjectPALovVOExRowImpl.java
$javac ProjectPALovVORowImpl.java
$javac  xxicxProjectPALovVOExImpl.java


Bounce the Apache

Comments (35)add
...
written by balkrishna , December 11, 2006
wat i have to read and practice to learn OA Framework because after one month i have to customize the sshr web pages using jdeveloper. i do not know java . i have to add tags and all the thigs nessacary to personilize the webpage


thanks

regards

balkrishna
...
written by balkrishna , December 11, 2006
wat i have to read and practice to learn OA Framework because after one month i have to customize the sshr web pages using jdeveloper. i do not know java . i have to add tags and all the thigs nessacary to personilize the webpage


thanks

regards

balkrishna
...
written by Ronaldo Blanc Rocha , December 18, 2006
Anil,

Im trying to extends some VOs in a HRMS system, but got no lucky!

I do a hello world page to test the system, and its ok... but there are no extensions in it.
I need to extends some EOs and VOs... and I got only errors.

Im new to OAF... can you help me??

thanx
...
written by Anil Passi , December 18, 2006
Hi Ronaldo,

Please let us know the errors that you are getting.

Thanks
Anil Passi
...
written by Ronaldo Blanc Rocha , December 18, 2006
Anil,

Im trying to extends some VOs in a HRMS system, but got no lucky!

I do a hello world page to test the system, and its ok... but there are no extensions in it.
I need to extends some EOs and VOs... and I got only errors.

Im new to OAF... can you help me??

thanx
...
written by Anil Passi , December 18, 2006
Hi Ronaldo,

Please let us know the errors that you are getting.

Thanks
Anil Passi
...
written by Anil Passi , December 21, 2006
Hi Rajesh,

$JAVA_TOP is included in CLASSPATH of Apps.

Hence you can create your custom directory in $JAVA_TOP and reference those files with your package names being directory names.


Thanks,
Anil Passi
...
written by Rajesh Khatri , December 21, 2006
Hi Anil,

Thanks for maintaining this blog.

I had a requirement wherein I need to provide a HTML page to upload files to the server. I have created the JSP page and HTML page. I also need to place the new jar files required by the JSP page and also include those in the classpath.

Can you please tell me the steps involved in deploying the same in Oracle Apps.

regards,
Rajesh Khatri
...
written by Anil Passi , December 21, 2006
Hi Rajesh,

$JAVA_TOP is included in CLASSPATH of Apps.

Hence you can create your custom directory in $JAVA_TOP and reference those files with your package names being directory names.


Thanks,
Anil Passi
...
written by Rajesh Khatri , December 21, 2006
Hi Anil,

Thanks for maintaining this blog.

I had a requirement wherein I need to provide a HTML page to upload files to the server. I have created the JSP page and HTML page. I also need to place the new jar files required by the JSP page and also include those in the classpath.

Can you please tell me the steps involved in deploying the same in Oracle Apps.

regards,
Rajesh Khatri
...
written by Anil Passi , January 04, 2007
Hi Kevin

That will certainly work. You might need to bounce the Apache after you have made changes to VO XML.

Note:- Changes done to VO query will not survive the Upgrade/Patches that re-deliver that VO.
Hence by Extending VO and Substituting, your customization will be upgrade safe.

Its your call as to the approach you wish to undertake.

Thanks,
Anil Passi
...
written by Anil Passi , January 04, 2007
Hi Kevin

That will certainly work. You might need to bounce the Apache after you have made changes to VO XML.

Note:- Changes done to VO query will not survive the Upgrade/Patches that re-deliver that VO.
Hence by Extending VO and Substituting, your customization will be upgrade safe.

Its your call as to the approach you wish to undertake.

Thanks,
Anil Passi
...
written by Sergey Lomov , January 09, 2007
In my previous message i mean parent VO package.
...
written by Anil Passi , January 09, 2007
.
.
.
Hi Kevin,

So you wish to hide or display a SubTab [i.e. a sub-menu] based on who the logged in person is?

Two options:-
1. Framework based...I am not sure how though. I think SPEL can work at item or region level but not sure about complete SubTab itself
2. customize fnd_menu_item_vl and based on fnd_global.employee_id filter out the record entry for PerDiem menu item entry.

Option 2 :- might just be used for experimental purposes as a very last and final option, as it is not recomended to modify core objects in APPS.

Thanks
Anil Passi
...
written by Sergey Lomov , January 09, 2007
In my previous message i mean parent VO package.
...
written by Anil Passi , January 09, 2007
.
.
.
Hi Kevin,

So you wish to hide or display a SubTab [i.e. a sub-menu] based on who the logged in person is?

Two options:-
1. Framework based...I am not sure how though. I think SPEL can work at item or region level but not sure about complete SubTab itself
2. customize fnd_menu_item_vl and based on fnd_global.employee_id filter out the record entry for PerDiem menu item entry.

Option 2 :- might just be used for experimental purposes as a very last and final option, as it is not recomended to modify core objects in APPS.

Thanks
Anil Passi
...
written by M , March 12, 2007
Hi Anil, So grateful for this comprehensive, one-and-only and extremely useful site of yours. I am new to Jdeveloper and have 3 main questions. I need to extend a VO in apps/per/irc/CandidateSearch (show 2 more columns in search results). Please see my questions: 1.) For getting the original VO, should I FTP all files from oracle/apps/per/irc/CandidateSearch/server? 2.) Which FTPed files should be put in jdevhome/myproject and which in jdevhome/myclasses? 3.) Sometimes substitution does not work as my VO was in a Subtab page, for which I raised a TAR with Oracle; waiting for the update. But essentially, have I done it the right way if I FTPed the original files into myclasses as well as myprojects?
...
written by Kiran , March 22, 2007
Hi Anil,
I recently started working on JDeveloper.. In the first glance it looked tough and confusing.. Your site helped me alot to understand.
Can you please give some detailed Info on the MDS repository. I heard varied answers on this.. When and Why we use XML Importer/Exporter. which XML files are actually moved into MDS database (JDR tables) and how personalization is effected.. I guess this is an important and difficult topic which everybody need thorough understanding for doing extensions/ customizations.
Thanks in advance,
K
...
written by Anil Passi , March 24, 2007
Hi K

Very good question. Infact inspired by your question I am currently writing something on very basics of MDS and OA Framework MDS Concept.

Concepts are important, hence a very good point raised by you indeed.

Many Thanks
Anil
...
written by Alex , April 05, 2007
Hi!
Yes, VO substitution been loaded as /oracle/apps/ar/hz/components/party/organization/server/customizations/site/0/HzPuiOrgOverviewVO
...
written by Alex , April 05, 2007
And extended vo should be visible within bc4j section of About This Page. But then error occurs, extended vo not visible on about page...
...
written by divya , April 12, 2007
Hi, I have deployed my OA pages on to the server and bounced it.When I am running pages from apps ,some of the LOVs in my page are opening and fetching values but when I say wuick select they are not returning the values to my main page though I have given lov mapping correclty.The browser is continuously showing the status running when I say quick select.This problem didnot exist when I was testing my page through jdeveloper 10.1.3. Can you please tell me what could be the problem. Thanks in advance. Divya.
...
written by Anil Passi , April 14, 2007
Hi Divya

If this works on jDev, then it should work on Hosted instance too.

However, the difference is that in jDev, your MDS changes are locally stored on your PC as XML. Hence it is possible that column mappings are missing. Have you applied column mapping personalizations on hosted server?

Also, try bouncing the mid-tier.

If still no luck, then use Diagnostics to set the Debug level in fwk to statement and see at what stage it is getting stuck[start scrolling from bottom of fwk debug messages]

Thanks
Anil Passi
...
written by Anil Passi , April 17, 2007
Hi Divya

I am glad you fixed the issue, and am even more glad that you shared your experience to help others that may face same problem too.

Regards,
Anil Passi
...
written by divya , April 17, 2007
Hi Anil,
Thank you for your response.I have tried bouncing the middle tier once but had the same problem.But I actually found out that the problem was with my local browser.I have tried opening the applications in mozilla as the browser opening from jdev also is mozilla and found that my oapages deployed were not having the lov problem , they were returning values to my main page.
Thanks again for your response.
Divya
...
written by souvik mukherjee , April 20, 2007
HI anil
I have one small question.
Yhis is not related to OAF as such. In iSUpplier if the supplier wants to accept the order as it is then how can he proceed? Whenever I open up the PO, the tabs above have request changes/req cancellation/etc but no simple accept tab. Is it that the instance on which I am working has some customizations?

ANother thing that I noticed is this: I took a PO and created a ASN for it. I then tried to change the Po and gave different dates as promised dates. How is it that Oracle allowed me to change an order after I created the ASN?
another bug which I found out is this : There is no check when I split a order line and give different quantities to the qiantity, I can exceed the original ordered quantity.I mean Oracle does not sum up the line quantities to tally with the ordered quantity.
Kindly let me know your views .
regards
Souvik
...
written by divya , May 16, 2007
Hi Anil
I am having 2 pages one main page and one child page.The main page has a header region and a table region.in the table region for everyline there is a attribute rule id and there is a link for each line in the table which opens the child page.The child page has another table region which will be opened with the lines for the ruleid passed as parameter.In both the pages for the tables i have an addrows button which will add a row and later the entered values will be commited into the database.Now i have a cancel button in the child page which will take me back to the main page with retain Am as true.when I click cancel in child page after I delete a line in the page or simply do nothing in the page the pages are working fine.But once I say add row in the child page and commit values and come back to the main page the rule id for the lines in the table for anyline is always considered as the rule id that I updated.So whenever I click on the lines link the child page is opening with the same ruleid for which I have commited values.How do I reset this ruleid to take the current rows rule id in the main page.Thanks in advance.
Regards,
Divya.
...
written by Michael , July 04, 2007
Hi Anil

Thanks for the conference in Copenhagen the first of June; however I forgot to ask you a question which troubles me. How to make a VO based on an EO with having to select a stupid key, without getting transient attributes?

In many cases I would like to create a VO based on joins and not on a specific key, and then let the user update an attribute by inserting / updating the data.

Here is a simple example VO

SELECT pap.segment1
,pap.NAME
FROM pa_projects_all pap
WHERE pap.project_status_code = 'APPROVED';

None of these attributes are keys, thus how can I base this VO on an EO?

PS This is just a very simplified VO and not the real code, but it illustrates the problem.
...
written by Alex , July 04, 2007
Hello and thanks for your articles ! Very useful !
You wrote about FTP'ing the XML MDS documents. Why uploading these files ? I thougth we stayed under JAVA_TOP directory.
Where do I have to put it ? Under myprojectsxxmds ?
Thanks !
...
written by Anil Passi , July 04, 2007
Hi Alex

In simple words, there are two type of XML Files in OAFwk
1. MDS
These are the page definitions UI related. These need to be loaded into the database by using a script or by using Functional Administrator Responsibility
You will find these xml files in jdevPackage/.../webui
2. BC4J xml files for AM, EO, VO
These need to be simply deployed to $JAVA_TOP/oracle/apps/.../server..

Thanks
Anil Passi
...
written by Anil Passi , July 06, 2007
Hi Michael [July 04, 2007],

Like most apps tables, PA_PROJECTS_ALL does not have a primary key.
When you create an EO, OA Fwk/jDeveloper creates a default Attribute for rowid and marks that as primary. This is required for BC4J to know the key used in modifying/deleting/locking.

Anyhow, you should not create a new EO on PA_PROJECTS_ALL.
Do the below:-
1. See if oracle delivers a out of the box EO on PA_PROJECTS_ALL
2. If a standard EO does not exist, then you can create one on your own, however direct inserts are not allowed on pa_projects_all. Hence you need to create pl/sql based entity object, i.e. by extending OAPlsqlEntityImpl. In the Insert/update etc methods of this EO, use the APIs like pa_project_pub.create_project or pa_project_pub.update_project

Thanks,
Anil Passi
How i can upload Self Service in Jdeveloper
written by kingmed , October 15, 2007
Hi,

How i can upload SSHR in local for extensible with Jdeveloper ?

Br
SPEL
written by Prasad CP , November 14, 2007
Anil ,
in iprocuremnet i did spel of making justification mandatory if its is urgent req , since urgent flag is a string i added one new boolean attribue and made spel on this attribute .
but now i get an error like view not found in the AM , does it mean that i need to add the extended vo to the AM ?


Extending HeaderVO Issue...??
written by Ajit_nair1 , December 19, 2007
Hello,

I need a urgent help.

Actually I am trying to modify the exisiting Print Quote Document which is actually getting called from a template cald ASOPRINTQUOTE.xsl

This particular xsl uses HeaderVO, LinesVO and PromptVO and hence I had to modify these xml and in turn the .java files.

I customized it by adding the new columns thru JDeveloper and extending the VO's and substituting them

In the process while extending the respective VO's comes a step wherein I need to specify(Thru JDeveloper) Application Short Name and Responsibility Key.
Now the issue is this particular Quote dicument can be accessed from 2 different respons. called

Oracle HTML Order Quoting Sales Agent(Its a OA framework with application top as QOT)
& Quoting Sales Agent.(Its form based with Application top as ASO)

I chose ASO as the top as all my .class files and .xml files are present in
oracle/apps/aso/print/server

Now then after extending the VO's and importing it etc . when I log in thru the reponsibilty
Oracle HTML Order Quoting Sales Agent , it gets me a error of stmt exception.
wheras
it runs via the respon Quoting Sales Agent and reproduces a PDF output without any data??

There are few questions I am looking out for an answer desperately.


1) My HeaderVO, LinesVO and PromptVO are extended, so do i need to extend the links present in that in my new extended VO' s as well.

2) My xsl stylesheet has a statement as

select values of:....../HeaderVO/HeaderRow/....etc etc

do i need to replace the above line to my new extended VO i.e

select values of:....../CustHeaderVO/HeaderRow/...etc etc

Kindly reply to me asap as I am in a development scenario..
Do let me kow if u need more clarity on this?

Regards,
Ajit
Do I need CO extension in this Scenario?
written by kishore Ryali , March 17, 2008
Hi Anil,
I was implementing all the OAF demos in ur site, on my way to get acquaintance with OAF.
I took Non-Catalog Request Page to display a new column "Supplier Num" in LOV and show the same value on the Non-Catalog Request Page. I did VO Extension and LOV Mapping and it all worked smilies/smiley.gif . But when I press "Clear All" button in the page, expect the new field all the other fields are getting cleared.

Do I need Controller extension to clear even my new field when "Clear All" is pressed?

Regards,
Kishore Ryali
You must be logged in to a comment. Please register if you do not have an account yet.

busy