Fusion Blog

EBS Blog


Contact Us

Kishore Ryali
  • 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

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive

My previous article on Nested application module showed extending root AM by attaching nested AM programmatically. In this article I'll show another approach to achieve same objective. My objective is to add custom logic to print "Requisition Header Id" in console when "Add to Cart" button is pressed during requisition creation in iProcurement. Some details of 'About this Page' for Non-Catalog Request page.

Page Name: NonCatalogRequestPG
Controller: NonCatalogRequestCO
AM: RequisitionAM


Brief steps for this approach are:

  1. Create custom application module in JDeveloper and code business logic in AMImpl.class
  2. For seeded page, Add a Stack Layout with AM Class as custom application module using OAF Personalization.
  3. Extend Controller of the page to get instance of custom application module and invoke method in it.

The first two steps are same as in the previous article. I've used same code for XxNestedAM.xml and XxNestedAMIMpl.class

  • Create application module XxNestedAM in JDeveloper.
  • Create a method printReqHeaderId in XxNestedAM to get instance of PoRequisitionHeadersVO via root application module. Use getter method to print requisition header id in console.

package xxa2f.oracle.apps.icx.icatalog.shopping.server;
import oracle.apps.fnd.framework.server.OAApplicationModuleImpl;
import oracle.apps.icx.icatalog.shopping.server.*;
import oracle.apps.icx.por.req.server.*;
import oracle.apps.fnd.framework.*;
import oracle.apps.fnd.common.VersionInfo;

public class XxNestedAMImpl extends OAApplicationModuleImpl
* This is the default constructor (do not remove)
public XxNestedAMImpl()

public void printReqHeaderId()
System.out.println("Start > XxNestedAM.printReqHeaderId");
OAApplicationModule rootAM = (OAApplicationModule)getRootApplicationModule();
PoRequisitionHeadersVOImpl poh = (PoRequisitionHeadersVOImpl) rootAM.findViewObject("PoRequisitionHeadersVO");
PoRequisitionHeadersVORowImpl pohr = (PoRequisitionHeadersVORowImpl) poh.getCurrentRow();
System.out.println("POHeaderId=" + pohr.getRequisitionHeaderId());
System.out.println("End > XxNestedAM.printReqHeaderId");

public static final String RCS_ID = "$Header: XxNestedAMImpl.java 115.30 2009/05/13 21:40:39 kryali noship $";
public static final boolean RCS_ID_RECORDED = VersionInfo.recordClassVersion("$Header: XxNestedAMImpl.java 115.30 2009/05/13 21:40:39 kryali noship $", "xxa2f.oracle.apps.icx.icatalog.shopping.server");

  • Personalize seeded page i.e. NonCatalogRequest to add Stack Layout Item XxCustomRN and add AM definition as xxa2f.oracle.apps.icx.icatalog.shopping.server.XxNestedAM

  • Create extension of NonCatalogRequestCO controller by naming it as xxNonCatalogRequestCO. In processFormRequest() method for AddToCart event, use getApplicationModule() on Stack Layout region XxCustomRN to get instance of XxNestedAM and call method in nested application module using invokeMethod() method.

package xxa2f.oracle.apps.icx.icatalog.shopping.webui;

import oracle.apps.fnd.common.*;
import oracle.apps.fnd.framework.*;
import oracle.apps.fnd.framework.webui.*;
import oracle.apps.fnd.framework.webui.beans.*;
import oracle.apps.icx.por.req.webui.*;
import oracle.jbo.ViewObject;
import oracle.apps.icx.icatalog.shopping.webui.NonCatalogRequestCO;
import oracle.apps.icx.icatalog.shopping.server.*;
import oracle.apps.icx.por.req.server.*;
import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean;

public class xxNonCatalogRequestCO extends NonCatalogRequestCO
public xxNonCatalogRequestCO()

public void processFormRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
if(oapagecontext.getParameter("AddToCart") != null)
System.out.println("*** XX Custom Code Start ***");
OAStackLayoutBean sb = (OAStackLayoutBean)oawebbean.findChildRecursive("XxCustomRN");
OAApplicationModule nam = (OAApplicationModule)oapagecontext.getApplicationModule(sb);
OAApplicationModule ram = oapagecontext.getApplicationModule(oawebbean);
// Create Nested Application Module
OAApplicationModule nam = (OAApplicationModule)ram.findApplicationModule("XxNestedAM");
if (nam == null)
nam = (OAApplicationModule)ram.createApplicationModule("XxNestedAM", "xxa2f.oracle.apps.icx.icatalog.shopping.server.XxNestedAM");
System.out.println("*** XX Custom Code End ***");
catch (Exception e)
System.out.println("Error=" + e);

super.processFormRequest(oapagecontext, oawebbean);

public static final String RCS_ID = "$Header: xxNonCatalogRequestCO.java 115.30 2009/05/13 21:40:39 kryali noship $";
public static final boolean RCS_ID_RECORDED = VersionInfo.recordClassVersion("$Header: xxNonCatalogRequestCO.java 115.30 2009/05/13 21:40:39 kryali noship $", "xxa2f.oracle.apps.icx.icatalog.shopping.webui");

  • Personalize NonCatalogRequestPG page to provide extended Controller XxNonCatalogRequestCO as controller.
  • Run NonCatalogRequestPG in JDeveloper. Enter details in Non-Catalog Request page and hit Add to Cart button. This prints requisition header id in console output in JDeveloper.


This demonstrates how nested application module can be used to add custom business logic in seeded OA Framework pages, rather than extending root application module.

Kishore Ryali

Add comment

Security code

Search Trainings

Fully verifiable testimonials

Apps2Fusion - Event List

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

Enquire For Training

Related Items

Fusion Training Packages

Get Email Updates

Powered by Google FeedBurner