You are on page 1of 15

OAF Personalisation and Extensions A Case Study Authored by Senthilkumar Shanmugam

OAF Personalisation and Extensions - A case study Authored by Senthilkumar Shanmugam December 2009 (2009) OracleContractors.com. All rights reserved. All other third party trademarks and registered trademarks are acknowledged.

White Papers by Contractors Network Ltd This is one of a series of White Papers published by Contractors Network Ltd, each one focussing on a specific aspect of Oracle. Further copies of this and other White Papers can be obtained free of charge by contacting us at whitepapers@Oraclecontractors.com or the address below. If you have found the content of this White Paper interesting and useful, and wish to explore the subject matter further, we can introduce you to independent experts in this field.

OAF Personalisation and Extensions - A case study 2009

Page 1

CONTENTS ABO U T C ON T RA CT O RS N ET W O RK ................................................................... 3 ABOUT THE AUTHOR ................................................................................................ 4 INTRODUCTION........................................................................................................ 5 PURPOSE .................................................................................................................. 5 WHO SHOULD READ THIS ........................................................................................ 5 BUSINESS REQUIREMENT ........................................................................................ 6 ANALYSIS ................................................................................................................. 6 DESIGN ..................................................................................................................... 6 Step 1: VO Substitution ........................................................................................ 7 Step 2: OAF Personalisation ................................................................................. 9 Step 3: CO Extension ......................................................................................... 11 Screen shots: ...................................................................................................... 12 SUMMARY ............................................................................................................... 14

OAF Personalisation and Extensions - A case study 2009

Page 2

ABO U T C ON T RA CT O RS N ET W O RK Contractors Network Ltd is a Global Oracle Contractors Network with primary focus on Oracle's E-Business Suite. We are operated by Contractors Network Ltd with 11 offices worldwide. We offer Contractor Resourcing with access to over 10,000 pre-qualified Oracle Applications Contractors through our local offices. We have an innovative and cost effective model for Implementations & Upgrades - our 'Hybrid Team' solution. We are able to offer access to Global Resolution Groups for adhoc work from as little as 15 minute increments We provide the only global Oracle specific job search engine with a view of 10,000 + Oracle specific roles. We interact with over 15,000 client personnel involved with the Oracle EBusiness Suite. We promote a community spirit through an Apps Blog, with 50 + Regional Authors that produce 20 articles a months. We are a Publishing House for White Papers authored by Oracle Contractors and distribute these free, to clients and Contractors alike. We offer access for training and demonstration of the latest release via an online Vision environment at no cost. We offer Oracle Contractors special membership to a network of Oracle User Groups, under our umbrella, at a discounted rate. We exhibit & present at all Regional Oracle Conferences worldwide as well as local Special Interest Groups.

OAF Personalisation and Extensions - A case study 2009

Page 3

ABOUT THE AUTHOR Senthilkumar Shanmugam is a independent Oracle Apps consultant with overall 6+ Years of experience in Oracle Applications. Currently he is a Contractor in UK and has worked on numerous applications within Oracle eBusiness Suite across Europe. Senthil has worked on various R12 projects and has good knowledge on OA Framework, ADF, BPEL, SOA, Web Services. He is currently working on building custom applications using ADF and integrates with Oracle Application. If you have any questions of feedback for Senthilkumar please email him on Senthilkumar.shanmugam@oraclecontractors.com

OAF Personalisation and Extensions - A case study 2009

Page 4

INTRODUCTION OAF Personalisation means personalize the user interface (UI) of Oracle Self-Service Web Applications without modifying any underlying code whereas OA Framework extensibility is geared to enable customers to add new functionality and override or extend existing business logic beyond what can be accomplished via personalisation. In short it the programmatic approach for personalisation.

PURPOSE In this article I will explain a case study for OAF Personalisation and Extension by analyzing real time requirement and how we have to use OAF Personalisation and OAF Extension to meet the requirement.

WHO SHOULD READ THIS Oracle Application Technical Consultants who are interested in OAF Personalisation, Extensions and Customizations can use this article as an real time business requirement to improve thier OAF skills.

OAF Personalisation and Extensions - A case study 2009

Page 5

BUSINESS REQUIREMENT

A customer defined DFF which is defined on the standard Oracle table needs to be enabled in the Self Service Web Screens. There are five segments in the DFF. All the segments need to shown in the screens. Out of 5 segments, 4 are mandatory. However there is an exception to this rule. On certain circumstances (based on a lookup value) these segments are made non mandatory and defaulted with a value.

ANALYSIS

On analysis, I found that the attribute columns on the standard Oracle table on which the DFF is defined was not included in the VO(View Object) on which the Self Service Page is built. Also, we need to extend the CO (controller) of the page in order to handle the mandatory and defaulting with the DFF segments.

DESIGN

This requirement can be easily achieved by following steps: VO Substitution: Add additional columns to the VO. OAF Personalisation: Add the DFF field in the Web Screens using OAF Personalisation Framework. CO Extension: Handle the mandatory and defaulting values of segments based on the Lookup Value.

OAF Personalisation and Extensions - A case study 2009

Page 6

IMPLEMENTATION

Step 1: VO Substitution Actual VO: oracle.apps.pos.asn.server.PosAsnHdrIntfVO SELECT PosRcvHdrIntfEO.HEADER_INTERFACE_ID, PosRcvHdrIntfEO.GROUP_ID, PosRcvHdrIntfEO.PROCESSING_STATUS_CODE, PosRcvHdrIntfEO.PROCESSING_REQUEST_ID, PosRcvHdrIntfEO.RECEIPT_SOURCE_CODE, PosRcvHdrIntfEO.TRANSACTION_TYPE, PosRcvHdrIntfEO.SHIP_TO_ORGANIZATION_ID, PosRcvHdrIntfEO.VENDOR_ID, PosRcvHdrIntfEO.VENDOR_SITE_ID, PosRcvHdrIntfEO.SHIPPED_DATE, PosRcvHdrIntfEO.ASN_TYPE, PosRcvHdrIntfEO.SHIPMENT_NUM, PosRcvHdrIntfEO.EXPECTED_RECEIPT_DATE, PosRcvHdrIntfEO.PACKING_SLIP, PosRcvHdrIntfEO.WAYBILL_AIRBILL_NUM, PosRcvHdrIntfEO.BILL_OF_LADING, PosRcvHdrIntfEO.FREIGHT_CARRIER_CODE, PosRcvHdrIntfEO.FREIGHT_TERMS, PosRcvHdrIntfEO.NUM_OF_CONTAINERS, PosRcvHdrIntfEO.COMMENTS, PosRcvHdrIntfEO.CARRIER_METHOD, PosRcvHdrIntfEO.CARRIER_EQUIPMENT, PosRcvHdrIntfEO.PACKAGING_CODE, PosRcvHdrIntfEO.SPECIAL_HANDLING_CODE, PosRcvHdrIntfEO.INVOICE_NUM, PosRcvHdrIntfEO.INVOICE_DATE, PosRcvHdrIntfEO.TOTAL_INVOICE_AMOUNT, PosRcvHdrIntfEO.FREIGHT_AMOUNT, PosRcvHdrIntfEO.TAX_NAME, PosRcvHdrIntfEO.TAX_AMOUNT, PosRcvHdrIntfEO.CURRENCY_CODE, PosRcvHdrIntfEO.PAYMENT_TERMS_ID, PosRcvHdrIntfEO.PAYMENT_TERMS_NAME, PosRcvHdrIntfEO.VALIDATION_FLAG, PosRcvHdrIntfEO.TAR_WEIGHT, PosRcvHdrIntfEO.TAR_WEIGHT_UOM_CODE, PosRcvHdrIntfEO.NET_WEIGHT, PosRcvHdrIntfEO.NET_WEIGHT_UOM_CODE, PosRcvHdrIntfEO.REMIT_TO_SITE_ID, NULL FREIGHT_TERMS_DESC FROM RCV_HEADERS_INTERFACE PosRcvHdrIntfEO

OAF Personalisation and Extensions - A case study 2009

Page 7

Substituted VO: xxx.oracle.apps.pos.asn.server. XXPosAsnHdrIntfVO (Added the attribute columns to the query) SELECT PosRcvHdrIntfEO.HEADER_INTERFACE_ID, PosRcvHdrIntfEO.GROUP_ID, PosRcvHdrIntfEO.PROCESSING_STATUS_CODE, PosRcvHdrIntfEO.PROCESSING_REQUEST_ID, PosRcvHdrIntfEO.RECEIPT_SOURCE_CODE, PosRcvHdrIntfEO.TRANSACTION_TYPE, PosRcvHdrIntfEO.SHIP_TO_ORGANIZATION_ID, PosRcvHdrIntfEO.VENDOR_ID, PosRcvHdrIntfEO.VENDOR_SITE_ID, PosRcvHdrIntfEO.SHIPPED_DATE, PosRcvHdrIntfEO.ASN_TYPE, PosRcvHdrIntfEO.SHIPMENT_NUM, PosRcvHdrIntfEO.EXPECTED_RECEIPT_DATE, PosRcvHdrIntfEO.PACKING_SLIP, PosRcvHdrIntfEO.WAYBILL_AIRBILL_NUM, PosRcvHdrIntfEO.BILL_OF_LADING, PosRcvHdrIntfEO.FREIGHT_CARRIER_CODE, PosRcvHdrIntfEO.FREIGHT_TERMS, PosRcvHdrIntfEO.NUM_OF_CONTAINERS, PosRcvHdrIntfEO.COMMENTS, PosRcvHdrIntfEO.CARRIER_METHOD, PosRcvHdrIntfEO.CARRIER_EQUIPMENT, PosRcvHdrIntfEO.PACKAGING_CODE, PosRcvHdrIntfEO.SPECIAL_HANDLING_CODE, PosRcvHdrIntfEO.INVOICE_NUM, PosRcvHdrIntfEO.INVOICE_DATE, PosRcvHdrIntfEO.TOTAL_INVOICE_AMOUNT, PosRcvHdrIntfEO.FREIGHT_AMOUNT, PosRcvHdrIntfEO.TAX_NAME, PosRcvHdrIntfEO.TAX_AMOUNT, PosRcvHdrIntfEO.CURRENCY_CODE, PosRcvHdrIntfEO.PAYMENT_TERMS_ID, PosRcvHdrIntfEO.PAYMENT_TERMS_NAME, PosRcvHdrIntfEO.VALIDATION_FLAG, PosRcvHdrIntfEO.TAR_WEIGHT, PosRcvHdrIntfEO.TAR_WEIGHT_UOM_CODE, PosRcvHdrIntfEO.NET_WEIGHT, PosRcvHdrIntfEO.NET_WEIGHT_UOM_CODE, PosRcvHdrIntfEO.REMIT_TO_SITE_ID, NULL FREIGHT_TERMS_DESC, PosRcvHdrIntfEO.ATTRIBUTE_CATEGORY, PosRcvHdrIntfEO.ATTRIBUTE1, PosRcvHdrIntfEO.ATTRIBUTE2, PosRcvHdrIntfEO.ATTRIBUTE3, PosRcvHdrIntfEO.ATTRIBUTE4, PosRcvHdrIntfEO.ATTRIBUTE5, PosRcvHdrIntfEO.ATTRIBUTE6, PosRcvHdrIntfEO.ATTRIBUTE7, PosRcvHdrIntfEO.ATTRIBUTE8, PosRcvHdrIntfEO.ATTRIBUTE9, PosRcvHdrIntfEO.ATTRIBUTE10, PosRcvHdrIntfEO.ATTRIBUTE11, PosRcvHdrIntfEO.ATTRIBUTE12, PosRcvHdrIntfEO.ATTRIBUTE13, PosRcvHdrIntfEO.ATTRIBUTE14, PosRcvHdrIntfEO.ATTRIBUTE15 FROM RCV_HEADERS_INTERFACE PosRcvHdrIntfEO
OAF Personalisation and Extensions - A case study 2009 Page 8

Now this substitution information can be downloaded into an xml file which may look like: <?xml version = '1.0' encoding = 'UTF-8'?> <customization xmlns="http://xmlns.oracle.com/jrad" xmlns:ui="http://xmlns.oracle.com/uix/ui" xmlns:oa="http://xmlns.oracle.com/oa" xmlns:user="http://xmlns.oracle.com/user" version="9.0.3.8.13_1566" xml:lang="en-US" customizes="/oracle/apps/pos/asn/server/PosAsnHdrIntfVO"> <replace with="/xxx/oracle/apps/pos/asn/server/XXPosAsnHdrIntfVO"/> </customization>

Step 2: OAF Personalisation

Now we need to add a new item to the Web Screens using the personalisation link which is explained in the screen shot below:

OAF Personalisation and Extensions - A case study 2009

Page 9

After doing this we can download this personalisation information into a XML file which will look like <?xml version = '1.0' encoding = 'UTF-8'?> <customization xmlns="http://xmlns.oracle.com/jrad" version="9.0.5.4.89_560" xml:lang="en-US" customizes="/oracle/apps/pos/asn/webui/PosAsnCreatePG" xmlns:oa="http://xmlns.oracle.com/oa"> <modifications> <modify element="ShipNumEntry" maximumLength="15"/> <modify element="BillOfLadingEntry" required="yes"/> <modify element="TruckNoDef" required="yes"/> <move element="ShipInfoInstrTbl" after="SpacerSI1"/> <move element="SpacerSI2" after="ShipInfoInstrTbl"/> <move element="ShipDateEntry" after="ShipNumEntry"/> <move element="ExpRcptDateEntry" after="ShipDateEntry"/> <move element="ShipDateText2" after="ExpRcptDateEntry"/> <move element="ExpRcptDateText1" after="ShipDateText2"/> <insert after="ExpRcptDateText1"> <oa:flex id="DescFF" adminCustomizable="true" displayContextField="true" flexFieldAppShortName="PO" flexName="RCV_SHIPMENT_HEADERS" flexStyle="descriptive" readOnly="false" rendered="true" scope="." userCustomizable="false" viewName="PosAsnHdrIntfVO" xmlns:oa="http://xmlns.oracle.com/oa"/> </insert> <modify element="AsnLineEntryRN" controllerClass="xxx.oracle.apps.pos.asn.webui.XXPosAsnLineEntryCO"/ > <modify element="ApplyAllBtn" rendered="false"/> <modify element="AsnCreatePG" controllerClass="xxx.oracle.apps.pos.asn.webui.XXPosAsnCreateCO"/> </modifications> </customization><?xml version = '1.0' encoding = 'UTF-8'?> <customization xmlns="http://xmlns.oracle.com/jrad" xmlns:ui="http://xmlns.oracle.com/uix/ui" xmlns:oa="http://xmlns.oracle.com/oa" xmlns:user="http://xmlns.oracle.com/user" version="9.0.3.8.13_1566" xml:lang="en-US" customizes="/oracle/apps/pos/asn/server/PosAsnHdrIntfVO"> <replace with="/xxx/oracle/apps/pos/asn/server/XXPosAsnHdrIntfVO"/> </customization>

In order to take this VO Substitution and OAF Personalisation to other environments, we can use the XMLImporter Utility provided by Oracle.

OAF Personalisation and Extensions - A case study 2009

Page 10

Step 3: CO Extension In the extended controller we have to get the handle to the DFF and then make the individual segments mandatory or default the values based on the boolean flag mandatory. public class XXPosAsnCreateCO extends PosAsnCreateCO { public void processRequest(OAPageContext pageContext, OAWebBean webBean) { //Get Handle to DFF OADescriptiveFlexBean dffBean = (OADescriptiveFlexBean)webBean.findIndexedChildRecursive("DescFF"); dffBean.processFlex(pageContext); //Make the segments mandatory if(mandatory) { OAMessageLovInputBean segment2 = (OAMessageLovInputBean)dffBean.findChildRecursive("DescFF1"); if(segment2 != null) { segment2.setRequired("yes"); } .... } //Default the segment with the values from lookup else { OAMessageLovInputBean segment2 = (OAMessageLovInputBean)dffBean.findChildRecursive("DescFF1"); if(segment2 != null) { segment2.setText(pageContext,attr2); } ... super.processRequest(pageContext, webBean); }

This Java file needs to be deployed into the custom directory of the Oracle Apps instance ($XXX_TOP for example)

OAF Personalisation and Extensions - A case study 2009

Page 11

Screen shots:

Fig 1: Standard Oracle Apps Screen (No DFF)

OAF Personalisation and Extensions - A case study 2009

Page 12

Fig 2: Standard Oracle Apps Screen after OAF Personalisation (Segments are mandatory)

OAF Personalisation and Extensions - A case study 2009

Page 13

Fig 3: Standard Oracle Apps Screen after OAF Personalisation (Segments defaulted with values)

SUMMARY Hope this article was helpful in understanding the OAF Personalisation and Extension.

OAF Personalisation and Extensions - A case study 2009

Page 14

You might also like