Fusion Blog

EBS Blog


Contact Us

OA Framework - All Articles
  • Register

Oracle Gold Partners, our very popular training packages, training schedule is listed here
Designed by Five Star Rated Oracle Press Authors & Oracle ACE's.

webinar new Click here to raise Support Ticket. Get reply within 48 hours.

Search Courses

User Rating: 5 / 5

Star ActiveStar ActiveStar ActiveStar ActiveStar Active

In this article, I will demo how you can extend a page so as to add a new DropDown Picklist to an existing page.
In this example, I will be using an iExpense page.

Current Business Scenario
The mileage section in iExpenses page does not have FuelType DropDown field in main section.
Users need to go to Detail Region to enter a value into that field

Image below shows the current screen

Change as per Business Requirement
Make the Fuel Type dropdown list available within the main section of the Mileage Screen.
The user must not be forced to navigate to Detail Section.
Hence we need to create a new field, such that
        a. It maps to a base table column [via ViewObject Attribute]
        b. The list of values within dropdown list come from another View Object that provides LOV for Fuel Types


In the main section of the screen is based on a view object named MileageLinesVO, which has an attribute named FuelType
    However :-
        a. There is no "screen field" in the main section of Mileage Entry screen for FuelType DB Column/Attribute
        b. Any VO to be used within the page, must be present within AM of the page, which happens to be WebExpensesAM.
            But in this case, "DetailFuelTypesVO"[used for Picklist dropdown] is not within the AM "WebExpensesAM"
            Hence, we need to either extend the WebExpensesAM to add DetailFuelTypesVO to WebExpensesAM
            We can add a couple of lines in the controller to create a relationship between AM and Picklist VO

Solution :-
    a. Extend the controller against the page, in this case we extend oracle.apps.ap.oie.webui.MileageListCO
    b. Get a handle to the existing AM on this page, which in this case is WebExpensesAM
        You can get a handle to AM by using
                OAApplicationModule oam = oapagecontext.getApplicationModule(oawebbean) ;
    c. Programatically attach the "DetailFuelTypesVO" to WebExpensesAM.                   
                oav = (OAViewObject)oam.createViewObject("xxoieDetailFuelTypesVO", "oracle.apps.ap.oie.entry.server.DetailFuelTypesVO") ; 
                        //Note xxoieDetailFuelTypesVO is the instance name of VO
    d. Using personalization, add a "Dropdown List" field as shown in screenshots**** below.
        The data for this dropdown list will come via VO Instance xxoieDetailFuelTypesVO
    e. Apply the extended controller to the Mileage Page ~~~~

Steps with screenshot
1. Create an item ****

2. ReOrder to make this item appear besides UOM

3. Attach the controller ~~~~

Can we not extend the AM WebExpensesAM, so as to add VO Instance xxoieDetailFuelTypesVO at design time?
Indeed you can also alternately extend the AM to achieve the desired results [infact this is preferred approach].
However, if the AM were to be the root AM, then extension of controller would be the only choice.
Also, regardless of your approach, Controller must be extended, so as to initiate execute Query on Picklist VO

For this specific example, the Controller Code is
package xx.oracle.apps.ap.oie.webui;
import oracle.apps.ap.oie.webui.MileageListCO;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.OAImageBean;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
import oracle.apps.fnd.framework.webui.beans.table.OATableBean;
import oracle.apps.ap.oie.entry.server.* ;
import oracle.apps.fnd.framework.* ;
import oracle.apps.fnd.framework.server.* ;
public class xxMileageListCO extends MileageListCO
  public xxMileageListCO()

    public void processRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
            oapagecontext.writeDiagnostics(this, "start xxMileageListCO processRequest", 2);
        super.processRequest(oapagecontext, oawebbean);

    OAApplicationModule oam = oapagecontext.getApplicationModule(oawebbean) ;
     System.out.println("XXXX Mileage AM Name is =>" + oam.getFullName() );
    OAViewObject oav=  (OAViewObject)oam.findViewObject("xxoieDetailFuelTypesVO") ;
    if ( oav != null )
      System.out.println("XXXX Found VO DetailFuelTypesVO for Mileage AM. This means we have re-entered the page" );
      System.out.println("XXXX CAN NOT FIND VO DetailFuelTypesVO for Mileage AM" );
      oav = (OAViewObject)oam.createViewObject("xxoieDetailFuelTypesVO", "oracle.apps.ap.oie.entry.server.DetailFuelTypesVO") ; 

    if ( oav != null )
    System.out.println("XXXX FINALLY FOUND VO DetailFuelTypesVO for Mileage AM" );   
    //Remove this hardcoding later, or get this from a profile option
    oav.setWhereClauseParam(0, "10090" );

Overall Sequence of Flow 
A. The new controller firstly calls super.processRequest, so that code for standard functionality gets executed first.
B. We then instantiate a view Object Instance xxoieDetailFuelTypesVO, which used used for Picklist values. We also execute query for that records for picklist are fetched into the VO Cache in mid-tier
C. Using Personalization, a MessageChoice bean is created which is linked to  xxoieDetailFuelTypesVO.
D. This field that was created using personalization also gets mapped to Base VO i.e.  MileageLinesVO

Anil Passi


0 #1 Sheena 2008-11-20 14:11
Hi, I had a question regarding LOVs in OAF:
********** *************** **********
How do I create lovtextinput items that are dependent on each other? None of them are mandatory. For instance: VP, Cost Center and Department. if vp is entered, then department and cost center lov values should be dependent on the lov value. But if the cost center is entered then if the vp lov is chosen, then vp lov is dependent on cost center. And so on..

Sh eena
0 #2 Anil Passi- 2008-11-20 15:01
Hi Sheena

You can create an LOV mapping [can also be done via personalization ]
In this mapping the criteria item will point to the parent item on which your LOV values must be dependent

Than ks
0 #3 Sheena 2008-11-20 19:36
I am doing that it works fine, but for one BIG issue. heres the scenario:
Enter VP name (vp id - a form value is populated)
Clic k on the company code (for instance) lov. The lov shows values based on the vpid and any value entered in the field itself.
Choose a company code and once the popup window closes, the value in the Vp field , chosen above, is getting cleared!
I have created mappings under both the vp and company code textinput fields wherein the criteria is the field itself and another mapping where the criteria is the other field, so in case of company code, its the value being input into the company code lovinput field as well the vpid.
Similar for the VP lov mappings.
The issue arised only when: 1) Chosen VP Value 2) Chosen company code value 3) Go back to vp textinput field and clear it out , to choose a different value, the company code textinput field clears out.
Or if you do the same for company code value..

Any help will the much appreciated!
Sh eena
0 #4 Chandra Thangavelu 2012-01-20 11:23
We have defined Policy Schedule for Mileage. We have a requirement where we need to enter expense line for each day and need to calculate average for all the days which are entered within that expense report. Depending on the average distance for all the lines we need to override the rate which is calculated from Policy Schedule for all the lines. How can we acheive this. Please advise.

0 #5 http://journal- 2014-04-18 02:53
Everyone loves what you guys are usually up too.
This type of clever work and reporting! Keep up the wonderful works guys I've added you guys to my personal blogroll.
0 #6 omeprazole 2014-04-19 00:59
By controlling your eating patterns, you allow for the proper
function of the esophageal sphincter and
reduction of acidic reflux. Just like most other
medications, there are some facet results that might occur because of
to taking Prilosec. Similarly, several factors contribute to the
remarkable ability of normal gastroduodenal mucosa to defend itself against injury from the acid activity in gastric juice and to repair rapidly injury when occurs.

Add comment

Security code

Search Trainings

Fully verifiable testimonials

Apps2Fusion - Event List

<<  Jun 2021  >>
 Mon  Tue  Wed  Thu  Fri  Sat  Sun 
   1  2  3  4  5  6
  7  8  910111213

Enquire For Training

Related Items

Fusion Training Packages

Get Email Updates

Powered by Google FeedBurner