OAF VO Extension: How to Add a New Column in the Expense Report Summary Home Page
Introduction
View Object (VO) Extension is a powerful technique in Oracle Application Framework (OAF) that allows you to add new fields or attributes to standard Oracle E-Business Suite pages without modifying the original Oracle code. This is essential when you need to display additional data—such as a DFF (Descriptive Flexfield) attribute—on a standard OAF page.
In this guide, we will perform a VO extension on the Expense Report Summary page to display the DFF Attribute5 in the Track Submitted Expense Reports Status window.
Note: This topic is lengthy, so it is split into two parts:
Part 1 (this article): Identifying the VO, downloading it, setting up the workspace, and creating the extension project
Part 2: Creating the extended VO, substituting it, uploading, registering, and personalizing the page
Part 2 Reference: https://docodi.blogspot.com/p/28b-oaf-vo-extension-how-to-add-new.html
Why Do We Need VO Extension?
When you have a requirement to display additional attributes or fields on a standard OAF page, you perform a VO Extension. Here's why:
Standard pages display data through View Objects (VO)
A single page can have multiple View Objects
To add new fields, you must extend the standard VO to include the new attributes
The extended VO is then substituted for the standard VO
Finally, the new field is displayed on the page through Personalization
Important: VO Extension allows you to customize standard Oracle pages without modifying Oracle's seeded code, ensuring your customizations survive patches and upgrades.
VO Extension: The Six Key Steps
| # | Step | Description |
|---|---|---|
| 1 | Identify the VO | Determine which standard View Object needs to be extended |
| 2 | Download the VO | Copy the VO from the Oracle Java_Top location to your local JDev setup |
| 3 | Create the Extended VO | Create a new VO that extends the standard VO |
| 4 | Substitute the VO | Replace the standard VO with your custom VO |
| 5 | Upload the VO | Upload the new custom VO to the Oracle Java_Top location |
| 6 | Register the VO | Register the new VO using the XML Importer script |
| 7 | Personalize the Page | Add the new field through Personalization and reference the custom VO |
Step 1: Identify the View Object to Extend
The first step is to determine which View Object is behind the standard OAF page you want to customize.
Open the Standard OAF Page:
Navigate to the page in the Oracle E-Business Suite application
In this example, open the Expense Report Summary page
Access "About This Page":
Scroll to the bottom of the page
Click on the "About this Page" link
Expand All Sections:
Click on Expand All to see all details
Find the Controller Name:
In the Controller section, note the controller name
Find the Business Components References:
Click the '+' icon next to Business Components References Details
Identify the View Object:
Locate the View Object name (e.g.,
TrackExpenseReportsVO)Note the full path under
Java_Top
Result: You now know the exact location of the standard View Object under
Java_Top. In this example, the VO is located at:oracle/apps/ap/oie/webui/TrackExpenseReportsVO
Step 2: Download the View Object
Now you need to copy the standard VO from the Oracle server to your local JDeveloper environment.
Navigate to the Server Location:
Go to the Oracle server
Navigate to the
Java_TopdirectoryFollow the path identified in Step 1:
oracle/apps/ap/oie/server/
Copy the View Object:
Locate the file
TrackExpenseReportsVOCopy it to your local desktop
Create the Same Folder Structure in JDev:
In your JDeveloper
jdevhomedirectory, navigate to:jdevhome/myprojects/
Create the same folder structure:
oracle/apps/ap/oie/server/
Paste the copied
TrackExpenseReportsVOfile into this location
Important Rule: You must create the same folder structure in your JDev environment as the standard VO has in the application server's
Java_Top. This ensures that the extended VO is placed in the correct package and can be properly substituted.
Step 3: Open JDeveloper
Launch Oracle JDeveloper to begin creating the extension project.
Start JDeveloper:
Double-click on the JDeveloper executable (e.g.,
jdevW)JDeveloper opens with the default workspace
Step 4: Create the OA Workspace and Project
Now we create the workspace and project for the VO extension.
Create a New OA Workspace:
Right-click on Applications in the Application Navigator
Select New OA Workspace
Name the Workspace:
Enter a name (e.g.,
XXTrackExpenseReportsVO)Click OK
Configure the Project:
The Project Wizard opens automatically
Click Next
Enter Project Details:
Project Name: Same as the workspace (e.g.,
XXTrackExpenseReportsVO)Package Path: Choose the same path as the standard View Object, but change the application prefix to
xx(e.g.,xxapinstead ofap)
For example:
xxap.oracle.apps.ap.oie.server
Important: The
xxprefix is the standard convention for customizations in Oracle E-Business Suite. It distinguishes your custom code from Oracle's seeded code and ensures your changes are preserved during upgrades.
Complete the Project:
Click Finish to create the project
Result: Your OAF project is now created and ready for the VO extension.
Understanding the Package Naming Convention
The package naming convention for VO extensions follows this pattern:
<custom_prefix>.<standard_path>
| Component | Standard | Custom |
|---|---|---|
| Prefix | oracle | xx |
| Application | ap | xxap |
| Full Package | oracle.apps.ap.oie.server | xxap.oracle.apps.ap.oie.server |
Note: The
xxprefix is a widely used convention in Oracle E-Business Suite for customizations. Some organizations use a different prefix (e.g.,cfor custom, or a company-specific prefix). Always follow your organization's naming standards.
Directory Structure Overview
After completing Part 1, your JDev environment will have the following structure:
jdevhome/
└── myprojects/
└── oracle/
└── apps/
└── ap/
└── oie/
└── server/
└── TrackExpenseReportsVO.xml (Standard VO downloaded from server)And your JDev project will have:
XXTrackExpenseReportsVO/ ├── xxap/ │ └── oracle/ │ └── apps/ │ └── ap/ │ └── oie/ │ └── server/ │ └── (Extended VO will be created here in Part 2) └── XXTrackExpenseReportsVO.jpr (Project file)
Best Practices
| Practice | Description |
|---|---|
Use the xx Prefix | Always use the standard customization prefix for custom code |
| Match Folder Structure | Create the same folder structure as the standard VO |
| Download the Latest VO | Always download the current version of the standard VO |
| Document the VO Path | Keep a record of the VO location for future reference |
| Test in Development | Always test VO extensions in a development environment first |
| Back Up Original Files | Keep backups of the original VO files before substitution |
Troubleshooting Common Issues
| Issue | Possible Cause | Solution |
|---|---|---|
| Cannot find the VO | Wrong path in About This Page | Re-check the Business Components References |
| VO not found in server | Wrong Java_Top path | Verify the Java_Top location and VO name |
| Folder structure mismatch | Incorrect directory creation | Ensure the folder structure matches exactly |
| Project creation fails | Wrong package name | Verify the package follows the xx convention |
| VO file won't open | Corrupted download | Re-copy the VO file from the server |
| Wrong controller name | Multiple controllers on page | Verify the correct controller from About This Page |
What's Next (Part 2)
Now that you have identified the VO, downloaded it, and set up the project, Part 2 of this guide will cover:
Creating the Extended View Object: Extending the standard VO to add the new attribute
Adding the New Attribute: Including the DFF Attribute5 in the extended VO
Substituting the VO: Replacing the standard VO with the custom VO
Uploading the VO: Copying the extended VO to the Oracle
Java_ToplocationRegistering the VO: Running the XML Importer script to register the new VO
Personalizing the Page: Adding the new field through Personalization
Testing: Verifying that the new column appears on the standard page
Summary
VO Extension in OAF involves the following key steps:
Identify the VO: Use "About This Page" to find the standard View Object
Download the VO: Copy the VO from the server to your JDev environment
Create the Workspace: Set up the OA Workspace and Project with the
xxprefixCreate the Extended VO: Build a new VO that extends the standard VO (covered in Part 2)
Substitute the VO: Replace the standard VO with your custom VO (covered in Part 2)
Upload and Register: Deploy the custom VO to the server (covered in Part 2)
Personalize the Page: Add the new field through Personalization (covered in Part 2)
The key insight of VO Extension is that it allows you to add new fields to standard Oracle pages without modifying Oracle's seeded code. By extending the standard VO and substituting it, you can display additional data—such as DFF attributes—on any standard OAF page.
This approach is fundamental to Oracle E-Business Suite customization and is widely used to meet business requirements that standard Oracle functionality doesn't address out of the box.
References
Part 1: OAF VO Extension — https://docodi.blogspot.com/p/28a-oaf-vo-extension-how-to-add-new.html
Oracle E-Business Suite Documentation: OA Framework Developer's Guide
Oracle E-Business Suite Documentation: Personalization Guide
Oracle JDeveloper Documentation: Available in the
jdevdocfolderRelated Guides: Controller Extension in OAF, Creating a Hello World Page in OAF
No comments:
Post a Comment