10a. How to Attach Custom LOV in Oracle Standard OAF Page Without Doing Any Customization and Extension in Standard OAF Page – Part 1

 

Part 1: How to Attach a Custom LOV in an Oracle Standard OAF Page (Without Customization or Extension)

Introduction

Oracle E-Business Suite provides standard OAF pages for common business processes, such as Supplier Creation. In many cases, you may need to attach a custom List of Values (LOV) to a field on a standard Oracle page to meet specific business requirements — for example, to let users select a supplier from a custom list during supplier creation.

The challenge is that standard Oracle pages are seeded and should not be modified directly. However, OAF provides a way to attach a custom LOV without performing any customization or extension on the standard page itself. Instead, you create the LOV objects in JDeveloper, register them in Oracle Applications, and then attach them through Personalization.

This guide is split into two parts:

  • Part 1 (this article): Creating the custom LOV region, View Object, and Application Module in JDeveloper, and registering them in Oracle Applications

  • Part 2: Attaching the custom LOV to the standard page through Personalization

Part 2 Reference: (Link to Part 2)


Test Case: Attaching a Custom Supplier LOV to the Supplier Creation Page

Business Requirement: During supplier creation in the standard Oracle OAF page, users should be able to select a supplier from a custom LOV instead of manually entering the supplier number.

We will create a custom LOV region that displays:

  • External Supplier Number (ExternalSupplierNo)

  • Supplier Name (SupplierName)


The Four Key Activities

To attach a custom LOV to a standard OAF page, you need to complete four key activities:

#ActivityPurpose
1Create the View Object (VO)Provides the data for the LOV
2Create the Application Module (AM)Container that manages access to the VO
3Create the LOV Region (RG)Defines the popup window and its layout
4Register/Import the ObjectsMakes the custom objects available in Oracle Applications

Note: The actual attachment to the standard page is done through Personalization (covered in Part 2).


Prerequisites

Before you begin, ensure the following:

  • Oracle JDeveloper is installed and configured with a valid Runtime Connection

  • Database Connection is established

  • You have an EBS user account with the necessary responsibilities

  • Access to the Oracle server to run the XML Importer script

  • The standard Supplier Creation page is accessible in your EBS environment


Step 1: Create the Workspace and Project

  1. Create a New OA Workspace:

    • Right-click on Applications

    • Select New OA Workspace

    • Workspace Name: RohitExternalLOV

    • Click OK

  2. Configure the Project:

    • Project Name: RohitExternalLOV

    • Default Package: oracle.apps.xxap.RohitExternalLOV

Important: Notice the package prefix xxap (instead of ap). 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. Enter Runtime Connection Details:

    • Provide your EBS Username and Password

  2. Complete the Wizard:

    • Click Next, then click Finish

Result: Your workspace and project are now created.


Step 2: Create the LOV Region

The LOV Region defines the popup window that appears when the user clicks the LOV icon.

  1. Open the New Gallery:

    • Right-click on the project RohitExternalLOV

    • Select New

  2. Select Region:

    • Navigate to OA Components → Region

    • Click OK

  3. Configure the Region:

    • Region Name: RohitExternalLOVRG

    • Package: oracle.apps.xxap.RohitExternalLOV.webui

Important: Choose the package directory carefully. The webui directory is where all user interface components (regions, pages) are stored in OAF.

  1. Complete the Region Creation:

    • Click OK to create the region

    • The region structure appears in the Structure pane

Note: The region is created with the ListOfValue style by default when you create it as an LOV region.


Step 3: Create the View Object

The View Object provides the data that will populate the LOV.

  1. Open the New Gallery:

    • Right-click on the project RohitExternalLOV

    • Select New

  2. Select View Object:

    • Navigate to ADF Business Components → View Object

    • Click OK

  3. Configure the View Object:

    • View Object Name: RohitExternalLOVVO

    • Package: oracle.apps.xxap.RohitExternalLOV.server

Note: The server directory is where all server-side business logic components (VOs, EOs, AMs) are stored in OAF.

  1. Define the Query:

    • At Step 5 (Query), enter the SQL query that will select values for your LOV. For example:

      sql
      SELECT vendor_id, segment1 AS external_supplier_no, vendor_name AS supplier_name
      FROM po_vendors
      WHERE NVL(disabled_flag, 'N') = 'N'

Tip: The query should return the columns you want to display in the LOV. In this example, we return the vendor ID, supplier number (Segment1), and supplier name.

  1. Complete the Wizard:

    • Click Next, then click Finish

    • The View Object is now created


Step 4: Create the Application Module

The Application Module is the container that manages access to the View Object.

  1. Open the New Gallery:

    • Right-click on the project RohitExternalLOV

    • Select New

  2. Select Application Module:

    • Navigate to ADF Business Components → Application Module

    • Click OK

  3. Configure the Application Module:

    • Application Module Name: RohitExternalLOVAM

    • Package: oracle.apps.xxap.RohitExternalLOV.server

  4. Add the View Object:

    • At Step 2 of the wizard, select RohitExternalLOVVO from the Available list

    • Shuttle it to the Selected list

    • Click Next, then click Finish

Result: The Application Module is now created with RohitExternalLOVVO attached.


Step 5: Build the LOV Region Structure

Now we add the table and items to the LOV region to define its layout.

  1. Open the Region:

    • In the Application Navigator, open RohitExternalLOVRG

  2. Add a Table:

    • Right-click on RohitExternalLOVRG in the Structure pane

    • Select New → Table

    • A table object is created under the region

  3. Rename the Table:

    • Click on the table object

    • In the Property Inspector, change the ID to RohitExternalLOV

  4. Add the First Item:

    • Right-click on the table RohitExternalLOV

    • Select New → messageStyledText

    • An item (item1) is created

  5. Configure the First Item:

    • Click on item1

    • In the Property Inspector, set:

PropertyValue
IDExternalSupplierNo
PromptExternal Supplier No
  1. Add the Second Item:

    • Right-click on the table RohitExternalLOV

    • Select New → messageStyledText

    • An item (item1) is created

  2. Configure the Second Item:

PropertyValue
IDSupplierName
PromptSupplier Name

Result: The LOV region structure now contains a table with two columns: ExternalSupplierNo and SupplierName.


Step 6: Attach the Application Module to the Region

  1. Select the Region:

    • Click on the top-level region RohitExternalLOVRG

  2. Set the AM Definition:

    • In the Property Inspector, under BC4J, set the AM Definition to:

      text
      oracle.apps.xxap.RohitExternalLOV.server.RohitExternalLOVAM

Important: The LOV region must have its own Application Module to access the View Object data.


Step 7: Bind the Items to the View Object

Now we bind each item in the LOV table to a View Object attribute.

  1. Configure Item1 (ExternalSupplierNo):

    • Click on ExternalSupplierNo

    • In the Property Inspector, set:

      • View Instance: RohitExternalLOVVO

      • View Attribute: ExternalSupplierNo

  2. Configure Item2 (SupplierName):

    • Click on SupplierName

    • In the Property Inspector, set:

      • View Instance: RohitExternalLOVVO

      • View Attribute: SupplierName

Result: Each item in the LOV table is now bound to a specific attribute of the View Object. This determines what data is displayed in each column of the LOV popup.


Step 8: Register/Import the Custom Objects in Oracle Applications

Now that all objects are created in JDeveloper, we need to deploy them to the Oracle server and register them in Oracle Applications.

8.1 Upload the Objects to Java_Top

Copy the following XML files to the Oracle server under $JAVA_TOP:

text
$JAVA_TOP/oracle/apps/xxap/RohitExternalLOV/RohitExternalLOVVO.xml
$JAVA_TOP/oracle/apps/xxap/RohitExternalLOV/RohitExternalLOVAM.xml
$JAVA_TOP/oracle/apps/xxap/RohitExternalLOV/RohitExternalLOVRG.xml

Note: Ensure the directory structure matches the package path exactly.

8.2 Run the XML Importer Script

Run the following commands to import the custom objects into Oracle Applications:

Import the View Object:

bash
java oracle.jrad.tools.xml.importer.XMLImporter \
  $JAVA_TOP/oracle/apps/xxap/RohitExternalLOV/RohitExternalLOVVO.xml \
  -rootdir $JAVA_TOP \
  -username apps \
  -password apps \
  -dbconnection "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=host_name)(PORT=1223))(CONNECT_DATA=(SERVICE_NAME=service_name)))"

Import the Application Module:

bash
java oracle.jrad.tools.xml.importer.XMLImporter \
  $JAVA_TOP/oracle/apps/xxap/RohitExternalLOV/RohitExternalLOVAM.xml \
  -rootdir $JAVA_TOP \
  -username apps \
  -password apps \
  -dbconnection "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=host_name)(PORT=1223))(CONNECT_DATA=(SERVICE_NAME=service_name)))"

Import the LOV Region:

bash
java oracle.jrad.tools.xml.importer.XMLImporter \
  $JAVA_TOP/oracle/apps/xxap/RohitExternalLOV/RohitExternalLOVRG.xml \
  -rootdir $JAVA_TOP \
  -username apps \
  -password apps \
  -dbconnection "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=host_name)(PORT=1223))(CONNECT_DATA=(SERVICE_NAME=service_name)))"

Script Parameters

ParameterDescription
XMLImporterThe Java class that performs the import
$JAVA_TOP/.../RohitExternalLOVVO.xmlThe path to the XML file to import
-rootdir $JAVA_TOPThe root directory for the import
-username appsThe APPS database username
-password appsThe APPS database password
-dbconnection "..."The database connection string

Important: Replace host_name, PORT, and service_name with your actual database connection details. The XML Importer registers the objects in the JDR_ATTRIBUTES and JDR_PATHS tables, making them available to the OAF framework at runtime.


Understanding the LOV Architecture

The following illustrates how the custom LOV components work together:

text
┌─────────────────────────────────────────────────────────────────┐
│                     LOV REGION (RohitExternalLOVRG)             │
│  ┌─────────────────────────────────────────────────────────┐   │
│  │  Table: RohitExternalLOV                                │   │
│  │  ┌─────────────────────┬─────────────────────────────┐ │   │
│  │  │ ExternalSupplierNo  │ SupplierName                │ │   │
│  │  ├─────────────────────┼─────────────────────────────┤ │   │
│  │  │ 1001                │ Supplier A                  │ │   │
│  │  │ 1002                │ Supplier B                  │ │   │
│  │  │ 1003                │ Supplier C                  │ │   │
│  │  └─────────────────────┴─────────────────────────────┘ │   │
│  └─────────────────────────────────────────────────────────┘   │
│                                                                 │
│  AM Definition: RohitExternalLOVAM                              │
│  View Instance: RohitExternalLOVVO                              │
└─────────────────────────────────────────────────────────────────┘
                              │
                              ▼
┌─────────────────────────────────────────────────────────────────┐
│                 APPLICATION MODULE (RohitExternalLOVAM)         │
│  ┌─────────────────────────────────────────────────────────┐   │
│  │  Contains: RohitExternalLOVVO                           │   │
│  └─────────────────────────────────────────────────────────┘   │
└─────────────────────────────────────────────────────────────────┘
                              │
                              ▼
┌─────────────────────────────────────────────────────────────────┐
│                   VIEW OBJECT (RohitExternalLOVVO)              │
│  ┌─────────────────────────────────────────────────────────┐   │
│  │  Query: SELECT vendor_id, segment1, vendor_name         │   │
│  │         FROM po_vendors                                 │   │
│  │         WHERE NVL(disabled_flag, 'N') = 'N'             │   │
│  └─────────────────────────────────────────────────────────┘   │
└─────────────────────────────────────────────────────────────────┘

Component Roles

ComponentRoleKey Property
LOV RegionDefines the popup window and layoutRegion Style = ListOfValue
TableDisplays the LOV results in a gridRegion Style = table
ItemsDisplay individual columnsView Instance, View Attribute
Application ModuleManages access to the View ObjectAM Definition
View ObjectProvides the data for the LOVSQL Query

Best Practices

PracticeDescription
Use the xx PrefixAlways use the standard customization prefix
Organize LOV ObjectsKeep LOV objects in a dedicated directory
Use Meaningful NamesName VOs, AMs, and Regions descriptively
Optimize QueriesEnsure VO queries are efficient and return only necessary columns
Filter DataApply appropriate WHERE clauses to exclude disabled records
Test in DevelopmentAlways test LOV objects in a development environment
Document Object PathsKeep a record of all XML file paths for reference
Use Version ControlStore custom objects in a version control system

Troubleshooting Common Issues

IssuePossible CauseSolution
LOV region not foundWrong package pathVerify the package matches the directory structure
VO not foundImport failedRe-run the XML Importer script
AM not foundImport failedRe-run the XML Importer script
LOV shows no dataWrong SQL queryTest the query directly in the database
Items show no dataView Attribute not boundVerify each item's View Instance and View Attribute
Import failsWrong database connectionVerify the host, port, and service name
Permission deniedInsufficient privilegesEnsure the APPS user has the required privileges

What's Next (Part 2)

Now that you have created and registered the custom LOV objects, Part 2 of this guide will cover:

  1. Navigating to the Standard Page: Opening the Supplier Creation page

  2. Opening Personalization: Accessing the personalization interface

  3. Attaching the LOV: Configuring the standard field to use the custom LOV

  4. Setting the LOV Mapping: Mapping the LOV return values to the page fields

  5. Testing: Verifying that the custom LOV appears and functions correctly


Summary

Creating a custom LOV for a standard OAF page involves the following key steps:

  1. Create the Workspace and Project: Set up the development environment with the xx prefix

  2. Create the LOV Region: Define the popup window with ListOfValue style

  3. Create the View Object: Define the SQL query for the LOV data

  4. Create the Application Module: Add the View Object to the AM

  5. Build the LOV Structure: Add a table and items to the LOV region

  6. Bind the Items: Connect each item to a View Object attribute

  7. Register/Import: Run the XML Importer script to deploy the objects

Key Points to Remember

  • The xx prefix distinguishes custom objects from Oracle seeded objects

  • The LOV Region uses the ListOfValue region style

  • The View Object provides the data for the LOV

  • The Application Module manages access to the View Object

  • The XML Importer registers the objects in Oracle Applications

  • The Personalization (Part 2) attaches the LOV to the standard page

Why This Matters

Attaching a custom LOV to a standard Oracle page without customization or extension is a powerful technique because it:

  • Preserves Oracle Code: No modifications to seeded Oracle objects

  • Survives Upgrades: Customizations remain intact after patches and upgrades

  • Follows Standards: Uses Oracle's official extension mechanisms

  • Is Maintainable: Clear separation between standard and custom code

  • Is Reversible: Can be easily removed or disabled if needed

  • Is Quick to Implement: Can be set up without extensive development

By mastering this technique, you can extend standard Oracle E-Business Suite pages to meet business requirements without compromising the integrity of the Oracle environment.


References

  • Part 1: How to Attach Custom LOV in Oracle Standard OAF Page — (Original Blog Link)

  • Part 2: Attaching the Custom LOV to the Standard Page (Continued) — (Original Blog Link)

  • 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: Creating an LOV in OAF, OAF VO Extension, Controller Extension in OAF, Using SPEL in OAF

No comments:

Post a Comment