28a. OAF VO Extension: How to Add New Column in the Expense Report Summary Home Page – Part 1

 

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

#StepDescription
1Identify the VODetermine which standard View Object needs to be extended
2Download the VOCopy the VO from the Oracle Java_Top location to your local JDev setup
3Create the Extended VOCreate a new VO that extends the standard VO
4Substitute the VOReplace the standard VO with your custom VO
5Upload the VOUpload the new custom VO to the Oracle Java_Top location
6Register the VORegister the new VO using the XML Importer script
7Personalize the PageAdd 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.

  1. 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

  2. Access "About This Page":

    • Scroll to the bottom of the page

    • Click on the "About this Page" link

  3. Expand All Sections:

    • Click on Expand All to see all details

  4. Find the Controller Name:

    • In the Controller section, note the controller name

  5. Find the Business Components References:

    • Click the '+' icon next to Business Components References Details

  6. 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:

text
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.

  1. Navigate to the Server Location:

    • Go to the Oracle server

    • Navigate to the Java_Top directory

    • Follow the path identified in Step 1:

      text
      oracle/apps/ap/oie/server/
  2. Copy the View Object:

    • Locate the file TrackExpenseReportsVO

    • Copy it to your local desktop

  3. Create the Same Folder Structure in JDev:

    • In your JDeveloper jdevhome directory, navigate to:

      text
      jdevhome/myprojects/
    • Create the same folder structure:

      text
      oracle/apps/ap/oie/server/
    • Paste the copied TrackExpenseReportsVO file 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.

  1. 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.

  1. Create a New OA Workspace:

    • Right-click on Applications in the Application Navigator

    • Select New OA Workspace

  2. Name the Workspace:

    • Enter a name (e.g., XXTrackExpenseReportsVO)

    • Click OK

  3. Configure the Project:

    • The Project Wizard opens automatically

    • Click Next

  4. 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., xxap instead of ap)

    For example:

    text
    xxap.oracle.apps.ap.oie.server

Important: The xx prefix 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.

  1. 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:

text
<custom_prefix>.<standard_path>
ComponentStandardCustom
Prefixoraclexx
Applicationapxxap
Full Packageoracle.apps.ap.oie.serverxxap.oracle.apps.ap.oie.server

Note: The xx prefix is a widely used convention in Oracle E-Business Suite for customizations. Some organizations use a different prefix (e.g., c for 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:

text
jdevhome/
└── myprojects/
    └── oracle/
        └── apps/
            └── ap/
                └── oie/
                    └── server/
                        └── TrackExpenseReportsVO.xml  (Standard VO downloaded from server)

And your JDev project will have:

text
XXTrackExpenseReportsVO/
├── xxap/
│   └── oracle/
│       └── apps/
│           └── ap/
│               └── oie/
│                   └── server/
│                       └── (Extended VO will be created here in Part 2)
└── XXTrackExpenseReportsVO.jpr (Project file)

Best Practices

PracticeDescription
Use the xx PrefixAlways use the standard customization prefix for custom code
Match Folder StructureCreate the same folder structure as the standard VO
Download the Latest VOAlways download the current version of the standard VO
Document the VO PathKeep a record of the VO location for future reference
Test in DevelopmentAlways test VO extensions in a development environment first
Back Up Original FilesKeep backups of the original VO files before substitution

Troubleshooting Common Issues

IssuePossible CauseSolution
Cannot find the VOWrong path in About This PageRe-check the Business Components References
VO not found in serverWrong Java_Top pathVerify the Java_Top location and VO name
Folder structure mismatchIncorrect directory creationEnsure the folder structure matches exactly
Project creation failsWrong package nameVerify the package follows the xx convention
VO file won't openCorrupted downloadRe-copy the VO file from the server
Wrong controller nameMultiple controllers on pageVerify 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:

  1. Creating the Extended View Object: Extending the standard VO to add the new attribute

  2. Adding the New Attribute: Including the DFF Attribute5 in the extended VO

  3. Substituting the VO: Replacing the standard VO with the custom VO

  4. Uploading the VO: Copying the extended VO to the Oracle Java_Top location

  5. Registering the VO: Running the XML Importer script to register the new VO

  6. Personalizing the Page: Adding the new field through Personalization

  7. Testing: Verifying that the new column appears on the standard page


Summary

VO Extension in OAF involves the following key steps:

  1. Identify the VO: Use "About This Page" to find the standard View Object

  2. Download the VO: Copy the VO from the server to your JDev environment

  3. Create the Workspace: Set up the OA Workspace and Project with the xx prefix

  4. Create the Extended VO: Build a new VO that extends the standard VO (covered in Part 2)

  5. Substitute the VO: Replace the standard VO with your custom VO (covered in Part 2)

  6. Upload and Register: Deploy the custom VO to the server (covered in Part 2)

  7. 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 jdevdoc folder

  • Related Guides: Controller Extension in OAF, Creating a Hello World Page in OAF

No comments:

Post a Comment