Vous êtes sur la page 1sur 109

http://oracleapps88.blogspot.

com/ Raju Ch

DOCUMENT CONTROL
OBJECTIVE
PRE REQUISITE
DOCUMENT USAGE
D2K FORM COMPARISON WITH OA FRAME WORK PAGES
JDEVELOPER SETUP USING WINDOWS:
IEXPENSES OBJECTS:
1. ADDING THE ADDITIONAL FIELD (DESCRIPTION) ON GENERAL INFORMATION PAGE:
1.1 BEFORE CUSTOMIZATION
1.2 AFTER CUSTOMIZATION
M
O
1.3 HOW TO ACHIEVE THIS FUNCTIONALITY USING OAF CUSTOMIZATION:
1.4 PROGRAM LOGIC:

.C
1.5 TRAIN
1.6 HOW TO IDENTIFY THE CONTROLLER’S AND VIEW OBJECT’S BEHIND THAT PAGE:
1.7 STEPS TO EXTEND THE VO
T
O
1.8 STEPS TO SUBSTITUTE THE VO
1.9 STEPS TO CREATE CUSTOM CO:
1.10 PROGRAM LOGIC IN XXAPHEADERCO
P
1.11 SETUP
S
G
2. PROJECT AND TASK NUMBERS ARE MANDATORY
2.1 BEFORE CUSTOMIZATION
2.2 AFTER CUSTOMIZATION
O
L
2.3 HOW TO ACHIEVE THIS FUNCTIONALITY USING OAF CUSTOMIZATION:
2.5 PROGRAM LOGIC IN XXAPHEADERCO

.B
2.6 SETUP

8
3. INDIRECT PROJECTS LOV
3.1 BEFORE CUSTOMIZATION
3.2 AFTER CUSTOMIZATION
8
S
3.2 HOW TO ACHIEVE THIS FUNCTIONALITY USING OAF CUSTOMIZATION:

P
3.4 SETUP
4. DEFAULTING PROJECT AND TASK NUMBER AT REPORT LINE LEVEL
P
4.1 BEFORE CUSTOMIZATION

A
4.2 AFTER CUSTOMIZATION

E
4.3 HOW TO ACHIEVE THIS FUNCTIONALITY USING OAF CUSTOMIZATION:

L
4.4 LOGIC TO IMPLEMENT IN XXAPCASHANDOTHERCO
4.4 SETUP

C
5. CAPTURE ATTENDEE INFORMATION

A
5.1 BEFORE CUSTOMIZATION
5.2 AFTER CUSTOMIZATION
R 5.3 HOW TO ACHIEVE THIS FUNCTIONALITY USING OAF CUSTOMIZATION:

O
5.4 SETUP
6. BUSINESS RULE JUSTIFICATION
6.1 BEFORE CUSTOMIZATION
6.2 AFTER CUSTOMIZATION
6.3 HOW WE ACHIEVE THIS REQUIREMENT USING OAF:
6.4 LOOKUPS FOR THIS REQUIREMENT
6.5 LOGIC TO IMPLEMENT IN XXAPDETAILMAINCO
6.6 SETUP
7. DEFAULTING ADDITIONAL CC DETAILS TO ER LINE DFF
7.1 BEFORE CUSTOMIZATION
http://oracleapps88.blogspot.com/ Raju Ch

7.2 AFTER CUSTOMIZATION


7.3 HOW WE ACHIEVE THIS REQUIREMENT USING OAF:
7.4 LOGIC TO IMPLEMENT IN XXAPDETAILMAINCO
7.5 SETUP
8. AMEX LATE FEE TRANSACTIONS
8.1 BEFORE CUSTOMIZATION
8.2 AFTER CUSTOMIZATION
8.3 HOW WE ACHIEVE THIS REQUIREMENT USING OAF:
8.4 LOGIC FOR THIS CUSTOMIZATION IN XXAPCCTRANSACTIONVO
8.5 SETUP

M
BIBLIOGRAPHY
O
.C
T
What is Oracle Application Development Framework (OAF)?

O
The OA Framework Architecture is based on the J2EE MVC design pattern. The MVC
architecture is a component-based design pattern with clean interfaces between the Model, View,
P
and Controller. The Model is where the application implements its business logic. The View is
S
where the application implements its user interface and the Controller is where the application
handles user interaction and directs business flow.
G
Model-View-Controller (MVC) Architecture O
L
.B
8
8
S
P
P
A
E
L
C
A
R
O
http://oracleapps88.blogspot.com/ Raju Ch

Additionally OA framework also contains extensions to Oracle 9i JDeveloper called Oracle


Applications Extension or the OA Extension. The Jdeveloper is an IDE client which allows you
to do customizations and additions to the OA Framework.
Oracle Applications Framework is also referred as OA Framework. OA Framework is a Java
framework that excels at creating 3-tier web-based applications that link to an 11i Oracle
Applications instance while maintaining all the security features of that 11i instance.

OA Framework makes a connection to the database using JDBC drivers.

M
An important significance of the OA framework model is that it facilitates the customization of
existing out of box internet modules as well as it allows development of new Self Service Web
Application modules. O
As a result the OA Framework provides with benefits of Productivity, Scalability, and .C
Customizability etc.
T
O
though the OA Framework is J2EE based, it also used various industry standards like HTML,

P
XML, Java, JSP, SQL and Web Services.

S
G
O
The Model –Data Processing L
.B
8
8
S
P
P
A
E
L
C
A
R
O
http://oracleapps88.blogspot.com/ Raju Ch

Business Services

The OAF Business Components technology provides declarative building-blocks you can
use to implement scalable business services, data access objects, and business objects that
enforce business rules and handle database persistence.

EO

BC4J Entity Object encapsulates business rules associated with a row in a database table
(or view or synonym). EO Extensions are supported by OAFramework and they are
upgrade safe. The OAF Model layer provides consistent, declarative data-binding against M
a multiple backend technologies accommodating business services implemented as ADF O
.C
Application Modules, custom JavaBeans, EJB's, and Web Services.

VO T
O
P
BC4J View Object encapsulates a database query. After a query is executed, a view

S
object provides iteration over and access to its result set. VO extensions are supported by
OA Framework and they are upgrade Safe. The OAF UIX technology provides
G
declarative page definition and a rich UI component set for HTML and wireless UI's,

O
complementing OAF support for JSP pages and JSP tag libraries like JSTL, Jakarta

L
Struts, OAF Data Tags, and others. The OAF JClient layer dovetails with Swing to
simplify building sophisticated rich client UI's.

.B
AM
8
8
S
A BC4J Application Module is essentially a container that manages and provides access
to "related" BC4J model objects. Oracle supports AM extensions except for Root
P
Application Module (as per 11.5.10 - CU2). AM extensions are supported by OA
P
Framework and they are upgrade safe. Not supporting root AM extensions is equivalent

A
to not supporting AM

E
Extensions in many cases as most of the standard pages have only root AM, but where

L
ever page has got AMs defined at other levels AM extensions will be very much useful to
extend business logic. Developer might think of different workarounds to extend AM.
C (Eg: Adding a dummy region to the page using personalizing and add custom AM to the
A newly added region.)

R CO
O Controller responds to user actions and directs application flow. Oracle says, "There is no
guarantee that controller extensions will survive an upgrade. You should assume that they
will not.” Developer can afford to extend a CO as long as they call corresponding super
class method. Only possibility that this change will not be upgrade safe is if Oracle
changes name of CO or package or both possibilities of which is very remote. Integrated
support for Jakarta Struts allows data-binding and business services to work seamlessly
http://oracleapps88.blogspot.com/ Raju Ch

with this popular controller-layer framework, while the ADF Controller layer provides
the option of a more sophisticated, fully-declarative page flow engine.

M
OA Framework architecture and key features

Personalization features, including:


O
.C
The ability to hide and show page items and regions, reordering page items, adding new
items, adding corporate branding.
T
O
Importing and exporting personalization’s with the Personalization Document Manager
New user interface for creating personalization’s P
S
G
Matching the Release 12 colors and fonts to match your corporate website

O
Using simple expression (SPEL) bindings for more control over fields, items, and regions

Extensibility features, including: L


.B
8to be preserved across upgrades
The ability to add new business logic to existing screens

8
Durability of extensions, allowing them

S
Use of Oracle JDeveloper 10g with OA Extension to support J2EE development and
P
integration with Release 12

P
Support for service interfaces, standalone components that can be deployed as web

A
services, EJB session beans, or as co-located Java APIs

E
L OA Framework Architecture
C
Client Application Server Data Server
A
R
O
http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
MDS

S
We know it means Meta Data Service. We also know that it has something to do with web page
displayed in OA Framework. Let’s try to understand the basics of MDS.
G
O
L
Meta: - In technical world, Meta work symbolizes dictionary. Think of a web page broken into
small units which are fields, buttons, and list boxes. These small individual units [fields, buttons

.B
etc] are stored in a dictionary, in the database. These units when combined together, they become

8
a webpage that gets rendered on the browser.

Data: - Those Meta pieces are not stored 8as binary files, but as data in tables. Those tables begin
S
with jdr, for example JDR_ATTRIBUTES, JDR_ATTRIBUTES_TRANS,
Pin these JDR tables. OA framework reads that data when you
JDR_COMPONENTS and JDR_PATHS. The definition and relationship of each

request a page. The page P


field/region/component is stored

A
structure is then built based on MetaData.

Service: - MetaE Data is available as a service (plain service not webservice). The data is there in
JDR tables,Lbut all such data has to be co-related, all fields, regions, buttons etc have to be
C& return page definitions. MDS collates those definitions in components/fields in a
clubbed into a meaningful manner to make a web page. You can say that MDS provides service

A
to store
meaningful manner to build a page.
R These two below methods are available in the Default Controller class that gets created.
O
ProcessFormRequest (oapageContext, oawebBean)

This method is commonly used to react/respond to the event that has taken place, for
example click of a button.

Some examples are


if(oapagecontext.getParameter("Cancel") != null) {Do your processing for
http://oracleapps88.blogspot.com/ Raju Ch

Cancellation/Rollback}
if(oapagecontext.getParameter("Submit") != null) {Do your validations and commit
here}
if(oapagecontext.getParameter("Update") != null) {Do your validations and commit
here}

In the above three examples, you could be calling oapagecontext.forwardImmediately to


re-direct the page navigation to some other page if needed.

M
processRequest (pageContext, webBean)

In this method, usually page rendering related code is written. Effectively, each GUI O
.C
component is a bean that gets initialized duringprocessRequest.
Those who are familiar with D2K forms, something like pre-query may be written in this
method.
T
O
P
S
G
O
D2K Form Comparison with OA Frame Work Pages

L
Following key Steps were needed for Hello World [<Jdeveloper_Install_Dir>\

.B
JDeveloper\jdevdoc\index.htm]

Step 1. 8
8
S
Created a new Workspace and a new Project as dictated by Oracle's tutorial

P
[<Jdeveloper_Install_Dir>\ JDeveloper\jdevdoc\index.htm].

P
When defining project, you will specify a default package, which in this case was
A
oracle.apps.ak.hello this means the following: -
E
a. ak is the short name of the Application in Oracle [it means fnd_applications.short_name].
L
b. hello is the name of your project.

C
Step 2
A Next, you will create an OAPage within hello project.
R Think of OAPage as the fmx file itself in D2K. I am saying so because this page gets attached to

O
the form function.
a. This page will be created within hello project, hence the package name
oracle.apps.ak.hello.webui
b. Note the webui, it’s a convention to have page in webui, means this page represents the Web
User Interface
c. You will assign the default AM [OAApplicationModule]. Think of AM "Connection
Manager" and "Transaction State Manager" for your page.
I can't co-relate this to anything in D2k, as there is no concept of Connection Pooling and that
D2k is not stateless. Reason being that as soon as you kick off a D2K Form, it connects to a
http://oracleapps88.blogspot.com/ Raju Ch

single session of Oracle and sticks to that single Oracle database session. This is not the case in
OAF, hence AM is needed.

Step 3.
You create Region within the Page.
a. Region is what will store your fields. Text input fields will be of type messageTextInput.
Think of Canvas in D2K [to an extent].
b. You can have nested regions. Stacked Canvas in D2K comes close to this component of OA
Framework.

Step 4. M
Add a button to one of the nested regions.
O
.C
a. The itemStyle should be submitButton, in case you want the page to be submitted when this
button is clicked.
b. There is no WHEN-BUTTON-PRESSED trigger in OAF. In Framework, you will add a
T
O
controller java code to handle events like Form Submit button clicks. JDeveloper generates the

P
default code for you. Primarily two functions will be created processRequest[for UI Rendering
Handling] and processFormRequest.
S
Think of processRequest as WHEN-NEW-FORM-INSTANCE, though processRequest is very
restrictive.
G
O
L
Step 5.
In the controller to access the value in field "HelloName" the command is

.B
String userContent = pageContext.getParameter ("HelloName");

8
In D2k, we used :block.field. In OAFramework, at submission of page, all the field values get
passed into to OAPageContext object.
8
a. Use getParameter to access the field value
S
b. To set the value of the field, use
P
OAMessageTextInputBean fieldHelloName =

P
(OAMessageTextInputBean) webBean.findChildRecursive ("HelloName");

A
fieldHelloName.setText(pageContext,"Setting the default value" );
Note when setting field value in controller:
E
Note 1. Do not set the value in processFormRequest
L
Note 2. If the field comes from ViewObject [in latter tutorials], then do not use setText in

C
controller.

A
Note 3. For control fields [that are not based on ViewObjects], you can use setText to assign
values in processRequest method.
R
O Let’s take some notes to expand beyond the Hello World Project:
1. In D2K-forms we sort of created a Window, attached to Canvas, and then fields within that
Canvas.
However in OA Framework, think of Page being fmx/Window, think of Region being a Canvas,
and fields being within Regions.
This is not a formal/accurate understanding of analogy between D2k and Framework, but is close
to being logical.
http://oracleapps88.blogspot.com/ Raju Ch

2. In D2k, your Forms fmb file was compiled to fmx. It was fmx file that was deployed on mid-
tier.
In case of OAF, your OA Page is nothing but a XML file. We call this MDS [Meta data].
Whatever name you give to "Page" in OAF, an XML file of the same name gets created. This
xml file must then be loaded into database by using XMLImporter command.

3. Apart from MDS XML file, almost everything else is merely deployed to your mid-tier.
Usually this is underneath $JAVA_TOP/oracle/apps/../..

M
All your java files will go underneath java top/oracle/apps/../.. etc.

4. When building your tutorial, ignore the steps for setting "Attribute Sets". These are not O
.C
Mandatory. Oracle might just have developed their tutorials without including these. Think of
these like Visual Attributes of D2K forms [to an extent]
T
O
5. Controller is where you will write any java code in OA Framework. You can create a

P
Controller per Page or have a different Controller for each of the Regions with the same Page.

S
6. In the method processFormRequest of the Controller, you can access the values of the page by
G
using notation pageContext.getParameter ("<fieldname here>"). This method

O
processFormRequest is executed when the OAF Screen/Page is submitted by click of a button.

L
7. Inside the controller, all the Database Related interactions for example interaction with View

.B
Objects happens via Application Module. But why so?

8 state of the Application.


8
Because Application Module manages the transaction

S
OAApplicationModuleImpl oaapplicationmoduleimpl = (OAApplicationModuleImpl)
P
oapagecontext.getApplicationModule (oawebbean);

P
OADBTransaction oadbtransaction =

A
(OADBTransaction)oaapplicationmoduleimpl.getDBTransaction();

8. In D2K, we E have control block or a block based on database view.


Similarly, L
in OA Framework, if the field does not have viewObject attached, then its like a
C A viewObject can either be based on a view/table.synonym or on a SQL statement.
control field. Hence in HelloWorld example, field HelloName is a control field [in D2K

A
terminology].

R 9.Controller?
I wish to access the fields in multi record block that is based on view Object. Can I do this in
O Sure you can. To traverse through those records, do the below
a. Get the reference to the View Object using
(OAViewObject)oapagecontext.getApplicationModule(oawebbean).findViewObject("VO Name
Here")
b. Loop through the records in View Objects using count returned from
oaviewobject.getFetchedRowCount()
c. For each record, fetch the value of the fields within the loop as
http://oracleapps88.blogspot.com/ Raju Ch

oracle.jbo.Row row = oaviewobject.getRowAtRangeIndex (loop index here);


(String) row.getAttribute ("Column name of VO here ");

OA Framework Entity Objects -Thinking from D2k mindset

So what exactly is OA Framework Entity Object similar to in our D2K model? M


O
.C
There is nothing in d2k that fully corresponds to Entity Objects. But there are certain areas where
analogy can be drawn (well to an extent).
T
WHEN-VALIDATE-ITEM in D2K setItemAttribute() in Entity Object
O
P
Ideally does not set a item value, simply it Sets the value of field that corresponds to

S
validates the column. But we can also add field level
validations in this method.
Can fire immediately after navigating out
G
Unless we implement PPR (Partial Page
of the field(assuming it was changed)
O
Rendering) around that field, this will fire

L
at page level by default.

.B
Restricted trigger, but can indirectly No relationship to User Interface, as
influence navigation by setting enable off, controller manages the User Interface.
or by setting navigation property of other
8
8
items.

S
OA Framework Extension Tip: - If you wish to implement additional validation for an existing
P
OA Framework screen, then you will extend the method setItemAttribute of Entity Object.
P
A
WHEN-CREATE-RECORD in create() in Entity Object
D2K
E
L
As soon as a new record is created, Defaults values for the fields
values can be defaulted to fields via super.create(attributelist);
C
this trigger. SetPOHeaderId (getOADBTransaction ().
A getSequenceValue("XXPO_HEADER_ID_S"));

R OA Framework Extension Tip: - If you wish to default values to a field in existing OA


O Framework screen, then you will override extend the method create () of Entity Object.

WHEN-VALIDATE-RECORD in validateEntity() in Entity Object


D2K
Used to cross validating values in Ditto in OA Framework. For example if you
multiple fields for a record. This trigger wish to ensure that every CLERK must have a
fires as soon as you navigate out of a supervisorId attached, then write similar to
record [if any of its fields have been below
http://oracleapps88.blogspot.com/ Raju Ch

changed]. protected void validateEntity()


{
super.validateEntity();
if(xxGetSupervisrId() == null
&&
!"CLERK".equals(xxGetHRPosition()))
throw new OAAttrValException...
}

OA Framework Extension Tip :- If you wish to cross validate fields in a standard OA


Framework screen, then you will extend validateEntity(). M
O
.C
PRE-COMMIT in D2K postChanges() in Entity Object

T
Fires before Form issues a commit This isn't exactly similar to the listed D2K
counterpart, but comes close to it. Here you
O
can assign values to Entity Attribute at the

P
very last moment, prior to changes are

S
posted.
public void postChanges(TransactionEvent
transactionevent) G
{
O
L
Number docSeqNum =

.B
calculateDocSeqNum();
populateAttribute(1, docSeqNum);

8 super.postChanges(transactionevent);

8 }

S
P
Let’s touch base on some other similarities & dis-similarities between D2K and Entity
P
Objects in Framework Buffering of records

A
E
In D2K Oracle Forms, a multi record block buffers the record data for each record. Oracle form

L
provides no handle to that data. The only way you can access value of a field in other record is
by navigating to that record [alternately maintain a record set]. However, in case of Entity
C
Objects, you can iterate through the rows in the Entity cache.
A You can get a handle to iterator using which you can programmatically scroll through the records

R in that buffer. Framework maintains a cache for records being inserted/modified into EO via VO.

O Post Process

If the entity object that you are extending already extends OAPlsqlEntityImpl, then you can do
custom operations before or after Oracle screen makes API calls. Your customization will fire
before or after depending upon when you call super.insertRow ().

I hope above article gives you an idea for moving from D2K Forms towards Entity Objects in
OA Framework.
http://oracleapps88.blogspot.com/ Raju Ch

JDeveloper Setup Using Windows:

1. PREREQUISITES:

Hardware and software requirements:


M
 Operating Systems: Windows NT or Windows 2000 or Windows XP.
O
.C
 Preferred Web Browser: Internet Explorer 5.0 or later
 CPU Type and Speed: Pentium IV 1 GHz or greater


Memory: 512 MB RAM
T
O
Display: 65536 colors, set to at least 1024 X 768 resolution
 Disk Space: 570 MB
P
2. Download the OA Patch (4045639) from the metalink.
S
G
3. Unzip the accompanying zip file to a directory of your choice on your Client machine,
O
which creates the following directory structure Under your <jdev_install_dir>:
jdevbin\ L
.B
jdevdoc\
jdevhome\
8
8
4. Creating a Desktop Shortcut to JDeveloper
S create a desktop shortcut to
P
To facilitate launching JDeveloper,

P
jdevbin\jdev\bin\jdevw.exe.

5. ConfiguringA the JDEV_USER_HOME Environment Variable


E
L
Configure the JDEV_USER_HOME environment variable using Windows XP or

CWindows 2000:
A Go to your desktop and select My Computer, right-click and select Properties.
R On the System Properties dialog, select the advanced tab.
O On the Advanced page, select the Environment Variables... button.
On the Environment Variables dialog, select the New... button from the User
variables for <username> box.
On the New User Variable dialog, enter JDEV_USER_HOME in the Variable
Name field. Set the Variable Value field to <drive>:\jdevhome\jdev where <drive>
is the drive where you installed the JDeveloper9i OA Extension zip file. For
example: c:\jdevhome\jdev.
http://oracleapps88.blogspot.com/ Raju Ch

Select OK in each of the dialogs you opened to save the new user environment
variable.

Warning: The variable value should not contain a leading space before the drive
name. If it does, your environment will not work properly.

6. Obtaining a Database Connection File

Obtain the Database Connection File (.dbc) from the FND_TOP directory and place this
file in < jdev_install_dir > \jdevhome\jdev\myhtml\OA_HTML\secure
M
O
Creating the OA Project: .C
T
Click on Workspace  Select New OA Workspace
O
P
S
G
O
L
.B
8
8
S
P
P
A
E
L
C
A
R
O
http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
S
G
O
L
.B
8
8
S
P
P
A
E
L
C
A
R Workspace Name
O Check the Add New OA Project

After you click OK, you will see the Oracle Applications Project Wizard.
http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
S
G
O
L
.B
8
8
S
P
P
A
E
L
C
A
R
O
http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
S
G
O
L
.B
8
8
S
P
P
A
E
L
C
A
R
O
http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
S
G
O
L
Click on Finish

.B
8
8
Set System Profile Values S
P
To Analyzing the Page Objects we need to enable the profile options.
P
A
Like About this Page link to get lots of information

E
Diagnostics mode must be enabled

L Get page name and location

C
Version numbers
BC4J object names
A
R Sign on to Oracle Applications as the System Administrator responsibility.

O System Profile Option Description Required dDefault Value


FND: Diagnostics This profile enables about this page link YES None
at the end of the page.

Personalize Self- On enabling this profile option, every YES None


Service Defn OAFramework page will contain a
global Personalize button. This profile
enables personalization link and enables
http://oracleapps88.blogspot.com/ Raju Ch

user to personalize page.


Disable Self-service This is a system profile option NO None
Personal specifically created for use by Oracle
Support.

After changing the system profile options we need to bounce the apache server for changes to get
effected.

M
O
.C
iExpenses Objects:

T
O
P
S
1. Adding the additional field (Description) on General Information Page:

G
As per the iExpenses standard functionality during expense report entry when employee
O
selects the expense report template in the expense template field the LOV shows only the
L
expense report template name. It does not show the description for the same. Also there is

.B
no other field where the expense report template description gets displayed based on the
expense report template selected.
8
Design Considerations
8
S to Extend BC4J objects to extend business logic so
1. OA Framework guidelines suggest
P
that changes are upgrade safe. Solution design considers extending only BC4J objects
P
where ever possible.

Acan’t be added using personalization. This necessitates copying the


2. iExpenses pages are created with “Allow Indexed children” property set to false and

standardE
hence new items

L page and creating a custom page so that changes are not overridden by upgrades.

Cnecessitates extending Controller and incorporating item creation inside extended


3. Fields on iExpenses pages are added programmatically using Controller. This

A controller to achieve requirement.


R 4. Extended controller makes a call to super class method thus business logic changes made
O by upgrades will not be lost. This makes changes upgrade safe.
5. Standard pages are copied to and custom page is created wherever necessary and
extended controller is added to the custom pages.
http://oracleapps88.blogspot.com/ Raju Ch

1.1 Before Customization

M
O
.C
T
O
P
We need to add the additional field (Description) here S
G
1.2 After Customization
O
L
.B
8
8
S
P
P
A
E
L
C
A
R
O
New field (Description) is added

1.3 How to achieve this Functionality using OAF Customization:

Overview
http://oracleapps88.blogspot.com/ Raju Ch

For the above requirement we need to customize the GeneralInformationPG & Controller
attached to the page.

How to get the page from UNIX server:

All the pages are stored in MDS Directory under appltop directory.
Pages should be downloading or upload in ASCII Mode.
Copy the GeneralInformationPG.xml into your local machine while copying the mode
should be ASCII mode. For your ease we suggest to download complete folders.

M
O
.C
T
O
P
S
G
O
L
.B
8
8
S
P
P
A
1.4 Program Logic:
E
L process follows the following sequence:
The whole

C Create a Custom BC4J Package (xxsai.oracle.apps.ap.oie.server).


A
R  Create new Custom View Object XXAPExpenseTemplatesVO in custom BC4J

O
Package (xxsai.oracle.apps.ap.oie.server) by Extending the existing
ExpenseTemplatesVO.

 Make the Substitution with the newly created XXAPExpenseTemplatesVO.

 Create a new custom Page XXAPGeneralInformationPG.xml in package


xxsai.oracle.apps.ap.oie.webui and copy the code from existing page
GeneralInformationPG.xml.
http://oracleapps88.blogspot.com/ Raju Ch

 Create a new message Styled Text Item on the region OIEGeneralInformation of the
page XXAPGeneralInformationPG for adding the Expense Report Template
Description.

 Set new Controller Object XXAPHeaderCO for OIEGeneralInformation region of


XXAPGeneralInformationPG by extending the existing Controller Object HeaderCO.
Package Name for this CO is xxsai.oracle.apps.ap.oie.webui.

 Add a new item “Expense Report Template Description” programmatically in Stack

M
layout Bean by using the controller XXAPHeaderCO.

 Create a new Region XXAPEntryTrainRN.xml style as train on the package O


xxsai.oracle.apps.ap.oie.webui.
. C
 Copy the contents of existing EntryTrainRN.xml into XXAPEntryTrainRN.xml.
T
O
P that
 The BC4J framework updates the project's .jpx file (each project .jpr has a

S
corresponding .jpx file of the same name). The .jpx is an XML document

G
includes a "Substitutes" section.

MDS repository on the database of your target 11iO


 The substitutions specified in the .jpx definition file will need to be deployed to the

L instance. Zip the directory

B
structure (xxsai\oracle\apps\ap\oie\server) generated for the new extended objects and
upload into the server at $OA_JAVA and
. unzip it.

8substitutions specified in the .jpx definition file to


 Run the jpx import utility to import
8
the MDS repository using<JDEV_INSALL_DIR>\jdevbin\jdev\bin>jpximport
S
C:\iExpenses.jpx -username apps -password apps -dbconnection "(DESCRIPTION=
(ADDRESS=
P
P
(PROTOCOL=tcp)(HOST=<HOST_NAME>)(PORT=<PORT_NUMBER>))(CON
NECT_DATA=(SID=<SID_NAME>)))"
A
E
For above example I have placed the .jpx file into C:\ directory in my local

L
Machine.

C Profile options “Personalize Self-service Defn” (FND_CUSTOM_OA_DEFINTION)

A and “FND: Personalization Region Link Enabled”


(FND_PERSONALIZATION_REGION_LINK_ENABLED) should be set to ‘Yes’.
R
O
 Bounce the apache server.
 Disable the profile options related to Personalization.

1.5 Train

The train region is used to indicate the current page of a multi-page process.
http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
S
G
O
L
. B
8 to custom pages for proper navigation between
All the pages in the train should be copied
8
pages and the Destination URL links of the pages in the train should be replaced with the
S Description field. The following pages should be
custom path if we are customizing any single page in the train.we are customizing

P
GeneralinformationPG for adding

P
customized:
GeneralInformationPG
A
CreditCardTrxnsPG
E
CreditCardLinesPG
L
CashAndOtherLinesPG
CExpenseAllocationsPG
A FinalReviewPG

R
O How to extend the Page:

Right click on project (iExpenses.jpr)


Select the Web Tier  OA Components  Page
Click on Ok button.
http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
S
G
O
L
.B
8
8
S
P
P
A
E
L
C
Enter the Page Name Give the package name where the page will

A Stored

R
O Copy the contents of GeneralInformationPG (oracle.apps.ap.oie.header.webui) and Paste
into our custom page XXAPGeneralInformationPG
(xxsai.oracle.apps.ap.oie.webui).Similarly copy rest of the pages in the train.

Note: All pages in the train should to be copied to custom pages if single page is copied
to custom page.
http://oracleapps88.blogspot.com/ Raju Ch

As per the requirement we have to add the additional field on OIEGeneralInformation


region under GeneralInformationPG page.

M
O
.C
T
O
P
S
G
O
L
.B
8 the standard Controllers (CO) and extending
Add indexed child property is

8
false
This requirement can be achieved by customizing
the Corresponding View Object (VO). S How to identify the CO’s and VO’s of the
P
XXAPGeneralInformationPG is discussed below:

P
1.6 How to identify the Controller’s and View Object’s behind that page:
Every page containsA one Option like “About this Page”, click on this option to view controllers,
E
entity objects, view objects & Application Module associated to the current page
L
CSteps for Enable the “About this Page” link
A Enable the FND: Diagnostics profile option from the System Administrator
R Responsibility.

O Bounce the Apache server.


Check the “About this page” link is enabled or not.
Click on about this page link to view page information
http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
S
G
Click on About this page link
O
L
.B
8
8
S
P
P
A
E
L
C
A
R
O

After referring the about this page of GeneralInformationPG it is identified that customization
should be done on the following CO and VO.
a. HeaderCO
b. ExpenseTemplateVO
http://oracleapps88.blogspot.com/ Raju Ch

1.7 Steps to extend the VO

Open the VO from Jdeveloper.

M
O
.C
T
O
P
S
G
O
L
.B
8
Copy the query

SELECT 8
S
ApExpenseReportsEO.EXPENSE_REPORT_ID,
P
ApExpenseReportsEO.REPORT_TYPE,
FROM
P
A
AP_EXPENSE_REPORTS ApExpenseReportsEO
WHERE
E
WEB_ENABLED_FLAG = 'Y'
L
AND trunc (sysdate) <= trunc (nvl (inactive_date, sysdate))
C
A
R
O
http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
S
G
O
L
.B
8
8
S
P
P
A
E
L
C
A
R
O
http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
S
G
O
L
.B
8
8
S
P
P
A
E
L
C
A
R
O
http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
S
G
O
L
.B
8
8
S
P
P
A
E
L
C
A
R
O
http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
S
G
O
L
.B
8
8
S
P
P
A
E
L
C
A
R
O
http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
Paste the Query at Query Statement S
G
SELECT
O
ApExpenseReportsEO.EXPENSE_REPORT_ID,
L
.B
ApExpenseReportsEO.REPORT_TYPE,
ApExpenseReportsEO.DESCRITPTION
FROM
8
8
AP_EXPENSE_REPORTS ApExpenseReportsEO

S
WHERE
WEB_ENABLED_FLAG = 'Y'
P
AND trunc (sysdate) <= trunc (nvl (inactive_date, sysdate))
P
A
E
L
C
A
R
O
http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
S
G
O
Added the additional description column in the query
L
.B
Note: For extensions of VO’s we have to add the columns at the end of the query.

8region OIEGeneralInformation of the page


8
Create a new message Styled Text Item on the

S
XXAPGeneralInformationPG for adding the Expense Report Template Description.

P
1.8 Steps to substitute the VO
P
A
E
L
C
A
R
O
http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
S
G
O
L
.B
8
8
S
P
P
A
E
L
C
A
R
O Select the Standard VO from the Available list and Extended VO from the Substitute list.
http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
S
Click on Add button.
G
O
L
.B
8
8
S
P
P
A
E
L
C
A
R
O

Steps to Create New Item on OIEGeneralInformation Region:


http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
S
G
O
L
.B
8
8
S
P
P
A
E
L
C
A
R
O
1.9 Steps to Create Custom CO:

1. Select OIEGeneralInformation region under XXAPGenerationInformationPG.xml.


http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
S
G
O
L
.B
8
8
S
P
P
A
E
L
C
A
R
O 2. Set New Controller for OIEGeneralInformation

Right Click on OIEGeneralInformation


http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
S
Enter Package Name and Class name.
Note: Controller class must be in the webui folder. G
For example xxsai.oracle.apps.ap.oie.webui. O
L
.B
8
8
S
P
P
A
E
L
C
A
R
O
Now new Controller is created for OIEGenerationInformation.
http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
S
1.10 Program Logic in XXAPHeaderCO
G
If (uiNode instance of OAStackLayoutBean) O
{ L
.B
OAStackLayoutBean stackLayout = (OAStackLayoutBean) uiNode;
8
OATableLayoutBean tabLayOut = (OATableLayoutBean) stackLayout.getIndexedChild
(0);
8
S
OARowLayoutBean rowLayOut = (OARowLayoutBean) tabLayOut.getIndexedChild
(0);
P = (OACellFormatBean) rowLayOut.getIndexedChild
PtableBean1 = (OATableLayoutBean)
OACellFormatBean cellFormBean
(0);
A
OATableLayoutBean
E
cellFormBean.getIndexedChild (0);
L
OAMessageStyledTextBean descBean = (OAMessageStyledTextBean) createWebBean

CString eventType = pageContext.getParameter ("event");


(pageContext, webBean, "ExpTempDescription");

A ViewObject viewobject1 = pageContext.getApplicationModule


R (webBean).findViewObject ("XXAPExpenseTemplatesVO");

O If (viewobject1! = null)
{
String query = viewobject1.getQuery ();

}
ExpenseReportHeadersVOImpl expenseReportHeadersVO =
(ExpenseReportHeadersVOImpl) pageContext.getApplicationModule
(webBean).findViewObject ("ExpenseReportHeadersVO");
If (expenseReportHeadersVO! = null)
http://oracleapps88.blogspot.com/ Raju Ch

{
ExpenseReportHeadersVORowImpl expenseReportHeadersVORow =
(ExpenseReportHeadersVORowImpl) expenseReportHeadersVO.first ();
Number expensReportId = expenseReportHeadersVORow.getExpenseReportId ();

If (viewobject1! = null && expensReportId! = null)


{

viewobject1.executeQuery ();

M
Do
{
If ((row = viewobject1.next ()) == null) O
.C
{
Break;
}
T
Number expenseTemplateReportId = (Number) row.getAttribute
O
P
("ExpenseReportId");

S
If (expenseTemplateReportId.equals (expensReportId))
{
G
O
descBean.setText (expenseTemplateReportDes);

L
}
} while (true);

.B
8
1.11 Setup

8
Installation Steps
S
P
The following modules comprise the implementation set for the Adding the Expense
P
Report Template Description Process.

A
E
Deployment Files FTP Target Location
LXXAPOIEMAINPAGE.xml Type

C ASCII /xxsai/oracle/apps/ap/oie/webui

A
XXAPGeneralInformationPG.xml ASCII /xxsai/oracle/apps/ap/oie/webui
XXAPEntryPageIndexRN.xml ASCII /xxsai/oracle/apps/ap/oie/webui
R XXAPEntryTrainRN.xml ASCII /xxsai/oracle/apps/ap/oie/webui
O XXAPCreditCardTrxnsPG.xml
XXAPCreditCardLinesPG.xml
ASCII
ASCII
/xxsai/oracle/apps/ap/oie/webui
/xxsai/oracle/apps/ap/oie/webui
XXAPCashAndOtherLinesPG.xml ASCII /xxsai/oracle/apps/ap/oie/webui
XXAPItemizationDetailsPG.xml ASCII /xxsai/oracle/apps/ap/oie/webui
XXAPExpenseAllocationsPG.xml ASCII /xxsai/oracle/apps/ap/oie/webui
XXAPExpenseAllocationDetailPG.xml ASCII /xxsai/oracle/apps/ap/oie/webui
XXAPExpenseDetailsPG.xml ASCII /xxsai/oracle/apps/ap/oie/webui
XXAPConfirmationPG.xml ASCII /xxsai/oracle/apps/ap/oie/webui
http://oracleapps88.blogspot.com/ Raju Ch

Deployment Files FTP Target Location


Type
XXAPReadOnlyDetailsPG.xml ASCII /xxsai/oracle/apps/ap/oie/webui
XXAPFinalReviewPG.xml ASCII /xxsai/oracle/apps/ap/oie/webui
XXAPHeaderCO.class BIN /xxsai/oracle/apps/ap/oie/webui
XXAPExpenseTemplatesVO.xml ASCII /xxsai/oracle/apps/ap/oie/server
XXAPExpenseTemplatesVOImpl.class BIN /xxsai/oracle/apps/ap/oie/server
1. Install JDeveloper in your local machine and copy the final folder delivered into

M
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects and
<JDEV_INSTALL_DIR>\jdevhome\jdev\myclasses and follow below steps. (Final
folder will be delivered along with the last OA Framework object)
O
2. Copy the final deliverable folder into $OA_JAVA folder in UNIX machine with
.C
appropriate directory structure “. Class” files should be moved in BIN mode and “.XML”
files should be moved in ASCII mode. T
O
P
3. Move the above files in mentioned Target Location.

S
4. Import the custom pages into the data base
<JDEV_INSTALL_DIR>\jdevbin\jdev\bin:\>import
G
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects\xxsai\oracle\apps\ap\oie\we
bui\ XXAPOIEMAINPAGE.xml -rootdir O
L
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects -username apps -password

.B
apps -dbconnection
"(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<HOST_NAME>)(P
8
ORT=<PORT_NUMBER>))(CONNECT_DATA=(SID=<SID_NAME>)))" -
8
mmddir <JDEV_INSTALL_DIR>\jdevhome\jdev\myclasses\JRADXML
S
<JDEV_INSTALL_DIR>\jdevbin\jdev\bin:\>import
P
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects\xxsai\oracle\apps\ap\oie\we
P
bui\ XXAPGeneralInformationPG.xml -rootdir

A
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects -username apps -password

E
apps -dbconnection

L
"(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<HOST_NAME>)(P
ORT=<PORT_NUMBER>))(CONNECT_DATA=(SID=<SID_NAME>)))" -
C mmddir <JDEV_INSTALL_DIR>\jdevhome\jdev\myclasses\JRADXML
A <JDEV_INSTALL_DIR>\jdevbin\jdev\bin:\>import
R <JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects\xxsai\oracle\apps\ap\oie\we

O bui\ XXAPEntryPageIndexRN.xml -rootdir


<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects -username apps -password
apps -dbconnection
"(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<HOST_NAME>)(P
ORT=<PORT_NUMBER>))(CONNECT_DATA=(SID=<SID_NAME>)))" -
mmddir <JDEV_INSTALL_DIR>\jdevhome\jdev\myclasses\JRADXML
<JDEV_INSTALL_DIR>\jdevbin\jdev\bin:\>import
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects\xxsai\oracle\apps\ap\oie\we
http://oracleapps88.blogspot.com/ Raju Ch

bui\ XXAPEntryTrainRN.xml -rootdir


<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects -username apps -password
apps -dbconnection
"(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<HOST_NAME>)(P
ORT=<PORT_NUMBER>))(CONNECT_DATA=(SID=<SID_NAME>)))" -
mmddir <JDEV_INSTALL_DIR>\jdevhome\jdev\myclasses\JRADXML
<JDEV_INSTALL_DIR>\jdevbin\jdev\bin:\>import
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects\xxsai\oracle\apps\ap\oie\we
bui\ XXAPCreditCardTrxnsPG.xml -rootdir
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects -username apps -password
M
apps -dbconnection
O
.C
"(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<HOST_NAME>)(P
ORT=<PORT_NUMBER>))(CONNECT_DATA=(SID=<SID_NAME>)))" -
mmddir <JDEV_INSTALL_DIR>\jdevhome\jdev\myclasses\JRADXML
T
<JDEV_INSTALL_DIR>\jdevbin\jdev\bin:\>import
O
P
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects\xxsai\oracle\apps\ap\oie\we

S
bui\ XXAPCreditCardLinesPG.xml -rootdir
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects -username apps -password
apps -dbconnection
G
O
"(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<HOST_NAME>)(P

L
ORT=<PORT_NUMBER>))(CONNECT_DATA=(SID=<SID_NAME>)))" -
mmddir <JDEV_INSTALL_DIR>\jdevhome\jdev\myclasses\JRADXML

.B
<JDEV_INSTALL_DIR>\jdevbin\jdev\bin:\>import
8
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects\xxsai\oracle\apps\ap\oie\we
8
bui\ XXAPCashAndOtherLinesPG.xml -rootdir

S
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects -username apps -password

P
apps -dbconnection
"(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<HOST_NAME>)(P
P
ORT=<PORT_NUMBER>))(CONNECT_DATA=(SID=<SID_NAME>)))" -
A
mmddir <JDEV_INSTALL_DIR>\jdevhome\jdev\myclasses\JRADXML

E
<JDEV_INSTALL_DIR>\jdevbin\jdev\bin:\>import
L bui\ XXAPItemizationDetailsPG.xml -rootdir
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects\xxsai\oracle\apps\ap\oie\we
C
A
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects -username apps -password
apps -dbconnection
R "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<HOST_NAME>)(P
O ORT=<PORT_NUMBER>))(CONNECT_DATA=(SID=<SID_NAME>)))" -
mmddir <JDEV_INSTALL_DIR>\jdevhome\jdev\myclasses\JRADXML
<JDEV_INSTALL_DIR>\jdevbin\jdev\bin:\>import
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects\xxsai\oracle\apps\ap\oie\we
bui\ XXAPExpenseAllocationsPG.xml -rootdir
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects -username apps -password
apps -dbconnection
"(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<HOST_NAME>)(P
http://oracleapps88.blogspot.com/ Raju Ch

ORT=<PORT_NUMBER>))(CONNECT_DATA=(SID=<SID_NAME>)))" -
mmddir <JDEV_INSTALL_DIR>\jdevhome\jdev\myclasses\JRADXML
<JDEV_INSTALL_DIR>\jdevbin\jdev\bin:\>import
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects\xxsai\oracle\apps\ap\oie\we
bui\ XXAPExpenseAllocationDetailPG.xml -rootdir
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects -username apps -password
apps -dbconnection
"(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<HOST_NAME>)(P
ORT=<PORT_NUMBER>))(CONNECT_DATA=(SID=<SID_NAME>)))" -
mmddir <JDEV_INSTALL_DIR>\jdevhome\jdev\myclasses\JRADXML
M
<JDEV_INSTALL_DIR>\jdevbin\jdev\bin:\>import O
.C
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects\xxsai\oracle\apps\ap\oie\we
bui\ XXAPExpenseDetailsPG.xml -rootdir
T
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects -username apps -password
apps -dbconnection
O
P
"(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<HOST_NAME>)(P

S
ORT=<PORT_NUMBER>))(CONNECT_DATA=(SID=<SID_NAME>)))" -
mmddir <JDEV_INSTALL_DIR>\jdevhome\jdev\myclasses\JRADXML
<JDEV_INSTALL_DIR>\jdevbin\jdev\bin:\>importG
O
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects\xxsai\oracle\apps\ap\oie\we
bui\ XXAPConfirmationPG.xml-rootdir
L
.B
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects -username apps -password
apps -dbconnection
8
"(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<HOST_NAME>)(P
8
ORT=<PORT_NUMBER>))(CONNECT_DATA=(SID=<SID_NAME>)))" -

S
mmddir <JDEV_INSTALL_DIR>\jdevhome\jdev\myclasses\JRADXML

P
<JDEV_INSTALL_DIR>\jdevbin\jdev\bin:\>import

P
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects\xxsai\oracle\apps\ap\oie\we

A
bui\ XXAPReadOnlyDetailsPG.xml-rootdir
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects -username apps -password
Eapps -dbconnection
L "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<HOST_NAME>)(P
C ORT=<PORT_NUMBER>))(CONNECT_DATA=(SID=<SID_NAME>)))" -

A
mmddir <JDEV_INSTALL_DIR>\jdevhome\jdev\myclasses\JRADXML

R <JDEV_INSTALL_DIR>\jdevbin\jdev\bin:\>import

O
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects\xxsai\oracle\apps\ap\oie\we
bui\ XXAPFinalReviewPG.xml-rootdir
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects -username apps -password
apps -dbconnection
"(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<HOST_NAME>)(P
ORT=<PORT_NUMBER>))(CONNECT_DATA=(SID=<SID_NAME>)))" -
mmddir <JDEV_INSTALL_DIR>\jdevhome\jdev\myclasses\JRADXML
http://oracleapps88.blogspot.com/ Raju Ch

Run the delivered jpx file using the below command by placing it in your local
machine(For example in the below command JPX file is placed in C:\ drive)
5. Run the jpx import utility to import substitutions specified in the .jpx definition file to the
MDS repository using<JDEV_INSALL_DIR>\jdevbin\jdev\bin>jpximport
C:\iExpenses.jpx -username apps -password apps -dbconnection "(DESCRIPTION=
(ADDRESS=
(PROTOCOL=tcp)(HOST=<HOST_NAME>)(PORT=<PORT_NUMBER>))(CONNEC
T_DATA=(SID=<SID_NAME>)))"

M
6. Change the HTML call of the function OIEENTRYFLOW
(OA.jsp?page=/oracle/apps/ap/oie/entry/header/webui/GeneralInformationPG&OASF=O
IE_EXPENSE_REPORT_SEARCH) with the custom path
O
.C
OA.jsp?page=/xxsai/oracle/apps/ap/oie/webui/XXAPGeneralInformationPG&OASF=OI
E_EXPENSE_REPORT_SEARCH)
7. Go to System Administrator  Application  Function  Query with the function T
OIEENTRYFLOW  Click on Web HTML  Change the HTML Call with
O
P
OA.jsp?page=/xxsai/oracle/apps/ap/oie/webui/XXAPGeneralInformationPG&OASF=OI
E_EXPENSE_REPORT_SEARCH
S
8. Bounce the apache server.
G
O
L
.B
8
2. Project and Task Numbers are Mandatory8
For project-related expense Sreport the project number and task numbers have to be
mandatory at Header and P line level by the selected business purpose.
P
Aexpense reports business has to mandatory enter the Project Number and
Basic Business Needs

E at Header and line level for specific pre-defined purposes. Thus the
While creating

L
Task Number
Expense Report header and lines webpage should be customized in such a way that when
Clevel and Project/Task
the user selects the specific purpose, the Project Number and Task number DFF at header
A Number fields at line level should be made mandatory.

R Process flow
O Employee enters an expense report and
enters the project number and task
number at the header level.

Once the pre-defined specific business


purpose is selected by the User, the Project
Number and Task Number should be made
mandatory at the header and line level.
http://oracleapps88.blogspot.com/ Raju Ch

Process Description
1. The employee enters the project related expense report for a template.
2. The Context sensitive DFF to enter the Business Purpose should be displayed at
the Expense Report Header level M
3. The Business Purpose DFF is a Mandatory field when the User selects the O
.C
Expense Report template but the project number and task number DFFs are not
mandatory fields at the header at the first instance.
T
O
4. The User has to select the Business purpose from the LoV. Depending on the
Business purpose value selected the Project Number and Task Number should be
mandatory at the Header and line level. P
S
G
2.1 Before Customization

O
L
.B
8
8
S
P
P
A
E
L
C
A
R
O
http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
S
G
2.2 After Customization O
L
.B
8
8
S
P
P
A
E
L
C
A
R
O
http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
S
G
Overview O
L
This Requirement the mandatory Project and Task Number for Specific Business

.B
Purposes on the General Information Page. A brief summary of the strategy appears
below:
8
8
S
2.3 How to achieve this Functionality using OAF Customization:
P customizations needs to be done for below objects
P CreditCardLinesCO, CashAndOtherCO, and
To achieve the requirement

A
1. HeaderCO,
CashAndOtherListCO
E
2. PurposeLookupVO
L 3. CreditCardLinesPG and CashAndOtherLinesPG
CNote: Identification of the CO’s, VO’s and Page and Creation of CO, VO and PG was
A already discussed in the previous requirement. (Refer 1.7, 1.9)
R Program Logic
O The whole process follows the following sequence:
 Create a Custom BC4J Package (xxsai.oracle.apps.ap.oie.server).

 Create the ER Template Lookup values for identifying the mandatory or optional values
of Business Purpose.
http://oracleapps88.blogspot.com/ Raju Ch

 Create new Custom View Object XXAPPurposeLookupVO in custom BC4J package


(xxsai.oracle.apps.ap.oie.server) with View Object Class ViewImpl.

 Create a new custom Page XXAPCreditCardLinesPG.xml in package


xxsai.oracle.apps.ap.oie.webui and copy the code from existing page
CreditCardLinesPG.xml.

 Set new Controller Object XXAPCreditCardLinesCO for OIECreditCardExpenses of


XXAPCreditCardLinesPG.xml by extending the existing Controller Object

M
CreditCardLinesCO. Package Name for this CO is xxsai.oracle.apps.ap.oie.webui.

 Create a new custom Page XXAPCashAndOtherLinesPG.xml in package O


.C
xxsai.oracle.apps.ap.oie.webui and copy the code from existing page
CashAndOtherLinesPG.xml.
T
 Set new Controller Object XXAPCashAndOtherCO for OIECashAndOther region of
O
P
XXAPCashAndOtherLinesPG by extending the existing Controller Object

S
CashAndOtherCO. Package Name for this CO is xxsai.oracle.apps.ap.oie.webui.

G
 The BC4J framework updates the project's .jpx file (each project .jpr has a corresponding

O
.jpx file of the same name). The .jpx is an XML document that includes a "Substitutes"

L
section.

.B
 The substitutions specified in the .jpx definition file will need to be deployed to the MDS

8
repository on the database of your target 11i instance. Zip the directory structure

8it.
(xxsai\oracle\apps\ap\oie\server) generated for the new extended objects and upload into
the server at $OA_JAVA and unzip
S
P
 Run the jpx import utility to import substitutions specified in the .jpx definition file to the

C:\iExpenses.jpx P
MDS repository using<JDEV_INSALL_DIR>\jdevbin\jdev\bin>jpximport

A
-username apps -password apps -dbconnection "(DESCRIPTION=
(ADDRESS=
E
(PROTOCOL=tcp)(HOST=<HOST_NAME>)(PORT=<PORT_NUMBER))(CONNECT
L
_DATA=(SID=<SID_NAME>)))"

C
A Profile options “Personalize Self-service Defn” (FND_CUSTOM_OA_DEFINTION) and
“FND: Personalization Region Link Enabled”
R (FND_PERSONALIZATION_REGION_LINK_ENABLED) should be set to ‘Yes’.
O  Bounce the apache server.

 Disable the profile options related to Personalization.

OA Framework Objects

Create Custom VO (XXAPPurposeLookupVO)


http://oracleapps88.blogspot.com/ Raju Ch

Process Value Notes


Field
Name XXAPPurposeLookupVO
Package xxsai.oracle.apps.ap.oie.server

Query for the XXAPPurposeLookupVO is

M
O
SELECT FLT.LOOKUP_TYPE,
FLV.MEANING,
FLT.MEANING LOOKUP,
.C
T
FLV.DESCRIPTION,
APR.EXPENSE_REPORT_ID
FROM
O
FND_LOOKUP_VALUES FLV,
P
FND_LOOKUP_TYPES_TL FLT,
AP_EXPENSE_REPORTS_ALL APR S
WHERE G
FLV.LOOKUP_TYPE=FLT.LOOKUP_TYPE
O
AND LT.MEANING=APR.REPORT_TYPE
L
.B
AND LT.LANGUAGE='US'
AND FLV.LANGUAGE='US'

8
Lookup Definitions: 8
S
To avoid hardcode values in the code lookups are defined for purposes with Description optional
P
& Mandatory. These lookups are used to validate whether project number and task number is
P
mandatory for a specific business purpose.

A
Elookup definitions for the Project and Task Number Mandatory requirement
Following are the
L
C Lookups
A
Type RELOCATION_ER_TEMPLATE
R Application
Meaning Relocation ER Template

O Description
East Oracle Internet Expenses
Relocation ER Template
Values
Code Meaning Description
RELOCATION-HOME Relocation-Home Purchase Optional
PURCHASE
RELOCATION-HOME SALE Relocation-Home Sale Optional
RELOCATION-HOUSEHOLD Relocation-Household Moving Expenses Optional
http://oracleapps88.blogspot.com/ Raju Ch

RELOCATION- Relocation-Househunting Optional


HOUSEHUNTING
RELOCATION-IN-TRANSIT Relocation-In-Transit (Final Trip) Optional
RELOCATION-INTERIM Relocation-Interim Living Optional
LIVING
RELOCATION- Relocation-Rental/Lease Expenses Optional
RENTAL/LEASE
RELOCATION-SETTLING- Relocation-Settling-in/Misc Expenses Optional
IN/MISC
M
O
.C
T
O
P
S
G
O
L
.B
8
8
S
P Lookups

P
Type SEOIE_REGULAR-_ER_TEMPLATE

A
Meaning Regular ER Template
Application East Oracle Internet Expenses
Description E Regular ER Template
L Values
CCode Meaning Description

A CUSTOMER VISITS Customer Visits Optional

R
DEALER VISITS Dealer Visits Optional
EMPLOYEE RECOGNITION Employee Recognition Optional
O EVENTS
FIELD CALLS
Events
Field Calls
Mandatory
Optional
INTERVIEW EXPENSES Interview Expenses Optional
MEDIA RELATIONS Media Relations Optional
MEETING Meeting Optional
NATIONALSALES National Sales Conference Mandatory
CONFERENCE
OFFICE EXPENSES Office Expenses Optional
http://oracleapps88.blogspot.com/ Raju Ch

OPEN HOUSE Open House Mandatory


OTHER Other Optional
OTHER CONVENTIONS Other Conventions Mandatory
OUTLETPHYSICAL Outlet Physical Inventory Optional
INVENTORY
OUTLET VISITATION Outlet Visitation Optional
PUBLIC RELATIONS Public Relations Optional
RECRUITING Recruiting Optional
SALES CALLS Sales Calls Optional
TECHNICAL SUPPORT Technical Support Optional M
TELEPHONE - HOME OFFICE Telephone - Home Office Optional
O
.C
TELEPHONE - MOBILE Telephone - Mobile Optional
TRADE SHOW Trade Show Mandatory
TRAINING Training
T
Optional
VARIOUS Various
O
Optional

P
S
G
O
L
.B
8
8
S
P
P
A
E
L
C
A
R
O
http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
S
G
O
L
.B
8
8
S
P
P
A
E
L
C
A
R
O 2.5 Program logic in XXAPHeaderCO

The same logic has to be incorporated in the following CO’s for this requirement:
XXAPCashAndOtherCO
XXAPCreditCardLinesCO
XXAPCashAndOtherListCO
http://oracleapps88.blogspot.com/ Raju Ch

Logic for This Customization is:

//Create Object for ExpenseReportHeadersVORowImpl using WebExpensesAMImpl


String purpose = headerRow.getAttribute1 ();
String projectNumber = headerRow.getAttribute2 ();
String taskNumber = headerRow.getAttribute3 ();
Number expensReportId = headerRow.getExpenseReportId ();
If (xxapPurposeLookupVo == null) {
//Get the XXAPPurposeLookupVO object

M
If (xxapPurposeLookupVo == null) {
XxapPurposeLookupVo = (XXAPPurposeLookupVOImpl) am1.createViewObject
("XXAPPurposeLookupVO", "xxsai.oracle.apps.ap.oie.server.XXAPPurposeLookupVO") ;}} O
.C
If (purpose! = null && xxapPurposeLookupVo! = null) {
xxapPurposeLookupVo.setWhereClause ("MEANING='" + purpose + "'" +” AND
EXPENSE_REPORT_ID=" + expensReportId);
T
String query = xxapPurposeLookupVo.getQuery ();
O
P
xxapPurposeLookupVo.executeQuery ();

S
Row xxapPurposeLookupVORow = null;
If ((xxapPurposeLookupVORow = xxapPurposeLookupVo.next()) != null){
G
String description = (String) xxapPurposeLookupVORow.getAttribute("Description");

O
if("Mandatory".equalsIgnoreCase(description)){

L
If (projectNumber == null || projectNumber! = null && projectNumber.equals ("") {
throw new OAException (message, (byte) 0);
}
.B
8
If (taskNumber == null || taskNumber! = null && taskNumber.equals (""))

8
{
String message = "Task Number is required for the purpose” + purpose;
S
Throw new OAException (message, (byte) 0);
P
P
A
}} }

E
L
C
2.6 Setup

AInstallation Steps

R mandatory for Specific Business Purposes Process.


The following modules comprise the implementation set for the Project and Task Number are

O
Deployment Files FTP Target Location
Type
XXAPCreditCardLinesPG.xml ASCII /xxsai/oracle/apps/ap/oie/webui
XXAPCreditCardLinesCO.class BIN / xxsai /oracle/apps/ap/oie/server
XXAPCashAndOtherLinesPG.xml ASCII / xxsai /oracle/apps/ap/oie/webui
XXAPCashAndOtherCO.class BIN / xxsai /oracle/apps/ap/oie/server
http://oracleapps88.blogspot.com/ Raju Ch

Deployment Files FTP Target Location


Type
XXAPExpenseReportHeaderEO.class BIN / xxsai /oracle/apps/ap/oie/server
XXAPPurposeLookupVO.xml ASCII / xxsai /oracle/apps/ap/oie/webui
XXAPPurposeLookupVOImpl.class BIN / xxsai /oracle/apps/ap/oie/server
XXAPPurposeLookupVORowImpl.class BIN / xxsai /oracle/apps/ap/oie/server
1. Install JDeveloper in your local machine and copy the final folder delivered into
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects and

M
<JDEV_INSTALL_DIR>\jdevhome\jdev\myclasses and follow below steps.
(Final folder will be delivered along with the last OA Framework object)
2. Copy the final deliverable folder into $OA_JAVA folder in UNIX machine with O
appropriate directory structure “. Class” files should be moved in BIN mode and
.C
T
other should be moved in ASCII mode.

O
3. Move the above files in mentioned Target Location.
4. Import the .xml file into the data base
P
<JDEV_INSTALL_DIR>\jdevbin\jdev\bin:\>import
S
G
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects\xxsai\oracle\apps\ap
\oie\webui\ XXAPCreditCardLinesPG.xml -rootdir
O
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects -username apps -
L
password apps -dbconnection "(DESCRIPTION= (ADDRESS=

.B
(PROTOCOL=tcp)(HOST=<HOST_NAME>)(PORT=<PORT_NUMBE
R))(CONNECT_DATA=(SID=<SID_NAME>)))"
8
8
<JDEV_INSTALL_DIR>\jdevbin\jdev\bin:\>import

S
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects\xxsai\oracle\apps\ap
\oie\webui\ XXAPCashAndOtherLinesPG.xml -rootdir
P
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects -username apps -
P
password apps -dbconnection "(DESCRIPTION= (ADDRESS=

AR))(CONNECT_DATA=(SID=<SID_NAME>)))"
(PROTOCOL=tcp)(HOST=<HOST_NAME>)(PORT=<PORT_NUMBE

E <JDEV_INSTALL_DIR>\jdevbin\jdev\bin:\>import
L
C
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects\xxsai\oracle\apps\ap
\oie\webui\ XXAPPurposeLookupVO.xml -rootdir
A <JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects -username apps -
R password apps -dbconnection "(DESCRIPTION= (ADDRESS=

O
(PROTOCOL=tcp)(HOST=<HOST_NAME>)(PORT=<PORT_NUMBE
R))(CONNECT_DATA=(SID=<SID_NAME>)))"
5. Run the delivered jpx file using the below command by placing it in your local
machine(For example in the below command JPX file is placed in C:\ drive)
6. Run the jpx import utility to import substitutions specified in the .jpx definition
file to the MDS repository
using<JDEV_INSALL_DIR>\jdevbin\jdev\bin>jpximport C:\iExpenses.jpx -
username apps -password apps -dbconnection "(DESCRIPTION= (ADDRESS=
http://oracleapps88.blogspot.com/ Raju Ch

(PROTOCOL=tcp)(HOST=<HOST_NAME>)(PORT=<PORT_NUMBER>))(C
ONNECT_DATA=(SID=<SID NAME>)))"
7. Change the HTML call of the function OIEENTRYFLOW
(OA.jsp?page=/oracle/apps/ap/oie/entry/header/webui/GeneralInformationPG&O
ASF=OIE_EXPENSE_REPORT_SEARCH) with the custom path
OA.jsp?page=/xxsai/oracle/apps/ap/oie/webui/XXAPGeneralInformationPG&OA
SF=OIE_EXPENSE_REPORT_SEARCH)
8. Go to System Administrator  Application  Function  Query with the
function OIEENTRYFLOW  Click on Web HTML  Change the HTML Call
with M
OA.jsp?page=/xxsai/oracle/apps/ap/oie/webui/XXAPGeneralInformationPG&OA
O
.C
SF=OIE_EXPENSE_REPORT_SEARCH

T
9. Bounce the apache server.

O
P
S
G
3. Indirect Projects LOV
O
L
For project-related expense report the project number and task numbers have to be

.B
entered manually by the users at the expense report line level. There is a List of Values
available to select the Project Number at the Expense report Line level.
8
Basic Business Needs
8
S
For all project related expenses the List of Values at the Expense Report line level will

P
contain both CAPITAL and INDIRECT projects. But the requirement is customize the

P
List of Values to list only INDIRECT Projects at the Expense Report line level.

A
Process flow
E Employee enters an expense report
L using a template.
C
A
R
O
http://oracleapps88.blogspot.com/ Raju Ch

If the user wants to attach a project to the


expense report then the List of Values
available at the expense report line level
should be only INDIRECT projects.

M
O
.C
T
O
P
S
G
O
L
.B
8
8
S
3.1 Before Customization P
P
A
E
L
C
A
R
O
http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
Capital Project (20985) S
G
O
3.2 After Customization

L
.B
8
8
S
P
P
A
E
L
C
A
R
O
Only Indirect Projects are displayed.

Overview
http://oracleapps88.blogspot.com/ Raju Ch

For project-related expense report the project number and task numbers have to be entered
manually by the users at the expense report line level. There is a List of Values available to
select the Project Number at the Expense report Line level.

3.2 How to achieve this Functionality using OAF Customization:

To achieve this requirement we have to identify the VO attached to the project LOV and
customize it.

How to identify the VO attached to a LOV:


M
O
.C
T
O
P
S
G
O
L
.B
8
8
S
P
P
A
E
L
C
A
R Click on Project Number LoV
O
http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
S
G
O
L
.B
8
8
S
P
P
A
E
L
C
A
R
O
Program Logic:
The whole process follows the following sequence.
 Create a Custom BC4J Package (xxsai.oracle.apps.ap.oie.server).
http://oracleapps88.blogspot.com/ Raju Ch

 Create new Custom View Object XXAPProjectsLovVO in custom BC4J package


(xxsai.oracle.apps.ap.oie.server) by Extending the existing ProjectsLovVO.
 Make the Substitution with the newly created XXAPProjectsLovVO.
 The BC4J framework updates the project's .jpx file (each project .jpr has a corresponding
.jpx file of the same name). The .jpx is an XML document that includes a "Substitutes"
section.
 The substitutions specified in the .jpx definition file will need to be deployed to the MDS
repository on the database of your target 11i instance. Zip the directory structure
(xxsai\oracle\apps\ap\oie\server) generated for the new extended objects and upload into
M
O
the server at $OA_JAVA and unzip it.
 Run the delivered jpx file using the below command by placing it in your local machine
(For example in the below command JPX file is placed in C:\ drive)
. C
T
 Run the jpx import utility to import substitutions specified in the .jpx definition file to the
MDS repository using<JDEV_INSALL_DIR>\jdevbin\jdev\bin>jpximport
O
P
C:\iExpenses.jpx -username apps -password apps -dbconnection "(DESCRIPTION=

S
(ADDRESS=
(PROTOCOL=tcp)(HOST=<HOST_NAME>)(PORT=<PORT_NUMBER>))(CONNEC
T_DATA=(SID=<SID_NAME>)))" G
O
 Profile options “Personalize Self-service Defn” (FND_CUSTOM_OA_DEFINTION)
and“FND: PersonalizationRegionLinkEnabled”
L
.B
(FND_PERSONALIZATION_REGION_LINK_ENABLED) should be set to ‘Yes’.

 Disable the profile options related to 8


 Bounce the apache server.

8 Personalization.
S
3.3 Steps to extend the VO
P
PJdeveloper.
A
Open the Standard VO from

E
L
C
A
R
O
http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
S
G
O
L
Copy the query
.B
8
SELECT
8
P.PROJECT_NUMBER
S PROJECT_NUMBER,

P
P.PROJECT_NAME PROJECT_NAME,
P.PROJECT_ID PROJECT_ID,
P.START_DATEP START_DATE,
A
P.COMPLETION_DATE COMPLETION_DATE,
O.NAME
E PROJECT_ORGANIZATION_NAME

L
FROM PA_PROJECTS_EXPEND_V P,

C
HR_ORGANIZATION_UNITS O
WHERE
A P.CARRYING_OUT_ORGANIZATION_ID = O.ORGANIZATION_ID

R
O
http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
S
G
O
L
.B
8
8
S
P
P
A
E
L
C
A
R
O
http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
S
G
O
L
.B
8
8
S
P
P
A
E
L
C
A
R
O
http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
S
G
O
L
.B
8
8
S
P
P
A
E
L
C
A
R
O
Paste the Query at Query Statement

SELECT
P.PROJECT_NUMBER PROJECT_NUMBER,
P.PROJECT_NAME PROJECT_NAME,
http://oracleapps88.blogspot.com/ Raju Ch

P.PROJECT_ID PROJECT_ID,
P.START_DATE START_DATE,
P.COMPLETION_DATE COMPLETION_DATE,
O.NAME PROJECT_ORGANIZATION_NAME
FROM PA_PROJECTS_EXPEND_V P,
HR_ORGANIZATION_UNITS O
WHERE
P.CARRYING_OUT_ORGANIZATION_ID = O.ORGANIZATION_ID
AND P.PROJECT_TYPE_CLASS_CODE='INDIRECT'

M
O
.C
T
O
P
S
G
O
L
.B
8
8
S
P
P
A
E
L
As per the requirement the LOV should display only INDIRECT Projects
C
A
R
O
http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
S
For the substitution of VO (Refer 1.8) G
O
OA Framework Objects
L
1. Extended VO (XXAPProjectsLovVO)
. B
Process Field 8
Value Notes
8
Package S xxsai.oracle.apps.ap.oie.server
Name XXAPProjectsLovVO

ExtendsP View ProjectsLovVO


P
Object
A
E
L2.Project’
Substitution: Right-click on the project, select ‘Edit Business Components
and select ‘Substitutions’ section. Select base object and extended object
C and then choose ‘ADD’ to create new Substitution rule.
A
R Process Field Value Notes

O Available
Substitution
ProjectsLovVO
XXAPProjectsLovVO
http://oracleapps88.blogspot.com/ Raju Ch

3.4 Setup

Installation steps
The following modules comprise the implementation set for the Adding the Expense
Report Template Description Process.

Deployment Files FTP Target Location


Type

M
XXAPProjectsLovVO.xml ASCII /xxsai/oracle/apps/ap/oie/server
XXAPProjectsLovVOImpl.class BIN /xxsai/oracle/apps/ap/oie/webui
O
1. Install JDeveloper in your local machine and copy the final folder delivered into .C
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects and
T
<JDEV_INSTALL_DIR>\jdevhome\jdev\myclasses and follow below steps. (Final
O
P
folder will be delivered along with the last OA Framework object)

S
2. Copy the final deliverable folder into $OA_JAVA folder in UNIX machine with
appropriate directory structure “. Class” files should be moved in BIN mode and other
should be moved in ASCII mode. G
3. Move the above files in mentioned Target Location. O
L
.B
4. Run the jpx import utility to import substitutions specified in the .jpx definition file to the
MDS repository using<JDEV_INSALL_DIR>\jdevbin\jdev\bin>jpximport

8 apps -dbconnection "(DESCRIPTION=


C:\iExpenses.jpx -username apps -password
(ADDRESS=
8
S
(PROTOCOL=tcp)(HOST=<HOST_NAME>)(PORT=<PORT_NUMBER>))(CONNEC
T_DATA=(SID=<SID_NAME>)))"
5. Change the HTML callP
P
of the function OIEENTRYFLOW
(OA.jsp?page=/oracle/apps/ap/oie/entry/header/webui/GeneralInformationPG&OASF=O
A
IE_EXPENSE_REPORT_SEARCH) with the custom path
E
OA.jsp?page=/xxsai/oracle/apps/ap/oie/webui/XXAPGeneralInformationPG&OASF=OI
L
E_EXPENSE_REPORT_SEARCH)

CGo to System Administrator  Application  Function  Query with the function

A OA.jsp?page=/xxsai/oracle/apps/ap/oie/webui/XXAPGeneralInformationPG&OASF=
OIEENTRYFLOW  Click on Web HTML  Change the HTML Call with

R OIE_EXPENSE_REPORT_SEARCH
O 6. Bounce the apache server.
http://oracleapps88.blogspot.com/ Raju Ch

4. Defaulting Project and Task Number at Report Line Level

For project-related expense report the project number and task numbers have to be
entered manually by the users at the expense report line level.

Basic Business Needs


M
O
For some expense reports where the Project Number and Task Number are entered by the
users at the Expense Report header level, the project number and task number should be

.C
defaulted to the respective fields at the expense report line level. The user should be able

T
to enter the Project Number and Task Number at the Expense Report Header level. This
can be achieved by enabling Header level DFFs to enter the Project Number and Task
O
Number. Thus the Expense Report Header level page should be customized in such a way
P
that when the user clicks the next button to enter the expense report lines the project

S
number and task number fields in the expense report lines page should be populated with

G
values entered by the user in the previous page. This is applicable to both the Credit Card
Expense page and Cash Expenses Page. The user should be able to override the values
defaulted from the previous page.
O
L
.B
Process flow

8 an expense report
8the project number and
Employee enters

taskS
and enters
number at the header level .
P
P
A
E
L When the user enters the next page to enter
C the expense report lines the project number

A and task number in the expense report lines

R
page should be populated with the values
entered in the previous page.
O
http://oracleapps88.blogspot.com/ Raju Ch

4.1 Before Customization

M
O
.C
T
O
P
S
G
O
L
.B
8
8
S
P
P
A
E
L
C
A
R
O
http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
S
G
4.2 After Customization
O
L
.B
8
8
S
P
P
A
E
L
C
A
R
O
http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
S
Project and Task Numbers are defaulted from the Header Information

G
Task Number should be Mandatory for the Business Purpose Events at Header level.
O
L
.B
8
8
S
P
P
A
E
L
C
A
R
O

4.3 How to achieve this Functionality using OAF Customization:


http://oracleapps88.blogspot.com/ Raju Ch

Project and Task Number should be defaulted at the Expense Report line level while entering
Project related Expense report. A brief summary of the strategy appears below:

Program Logic
The whole process follows the following sequence:
 Create a Custom BC4J Package (xxsai.oracle.apps.ap.oie.server).

 Set new Controller Object XXAPCreditCardLinesCO for OIECreditCardExpenses of

M
XXAPCreditCardLinesPG.xml by extending the existing Controller Object
CreditCardLinesCO. Package Name for this CO is xxsai.oracle.apps.ap.oie.webui.
O
.C
 Create a new custom Page XXAPCashAndOtherLinesPG.xml in package
xxsai.oracle.apps.ap.oie.webui and copy the code from existing page
CashAndOtherLinesPG.xml.
T
 Set new Controller Object XXAPCashAndOtherCO for OIECashAndOther region of O
XXAPCashAndOtherLinesPG by extending the existing Controller Object P
S
CashAndOtherCO. Package Name for this CO is xxsai.oracle.apps.ap.oie.webui.
G
 The BC4J framework updates the project's .jpx file (each project .jpr has a corresponding
O
L
.jpx file of the same name). The .jpx is an XML document that includes a "Substitutes"
section.

.B
 The substitutions specified in the .jpx definition file will need to be deployed to the MDS
8
repository on the database of your target 11i instance. Zip the directory structure
8
(xxsai\oracle\apps\ap\oie\server) generated for the new extended objects and upload into
S
the server at $OA_JAVA and unzip it.
Pto import substitutions specified in the .jpx definition file to the
P
 Run the jpx import utility

A -username apps -password apps -dbconnection "(DESCRIPTION=


MDS repository using<JDEV_INSALL_DIR>\jdevbin\jdev\bin>jpximport
C:\iExpenses.jpx
E
(ADDRESS=
L
(PROTOCOL=tcp)(HOST=<HOST_NAME>)(PORT=<PORT_NUMBER>))(CONNEC

CT_DATA=(SID=<SID_NAME>)))"
A Profile options “Personalize Self-service Defn” (FND_CUSTOM_OA_DEFINTION) and
R “FND: Personalization Region Link Enabled”

O (FND_PERSONALIZATION_REGION_LINK_ENABLED) should be set to ‘Yes’.

 Bounce the apache server.

 Disable the profile options related to Personalization.

Partial Page Rendering (PPR):


http://oracleapps88.blogspot.com/ Raju Ch

Partial page rendering allows portions of a page to be refreshed without redrawing the entire
page contents.

Creation of PPR:
1. Select Page in System – Navigator.

M
O
.C
T
O
P
S
G
O
L
.B
1. Select Date (Here we are8
8
creating PPR on date only) field in Structure panel and
S
give the Event in Property panel.
P
P
A
E
L
C
A
R
O
http://oracleapps88.blogspot.com/ Raju Ch

Date in Structure panel Event for Date

4.4 Logic to implement in XXAPCashAndOtherCO

The same logic should be incorporated in XXAPCashAndOtherListCO

Public void processRequest (OAPageContext pageContext, OAWebBean webBean)


{
M
String eventType = pageContext.getParameter (OAWebBeanConstants.EVENT_PARAM); O
.C
DefaultForReceipt (pageContext, 0); //method which contains the logic of the defaulting the
Receipt data
T
DefaultForPerDiem (pageContext, 0); //this method contains the PerDiem defaulting logic
O
DefaultForMileage (pageContext, 0); // this method contains the Mileage defaulting logic
super.processRequest (pageContext, webBean);
P
S
}

G
Public void processFormRequest (OAPageContext pageContext, OAWebBean webBean)
{
O
L
String eventType = pageContext.getParameter (OAWebBeanConstants.EVENT_PARAM);
If (eventType! =null && eventType.equals ("goto"))
{
.B
8
int i = Integer.parseInt (pageContext.getParameter("value"));

8
int j = NavigationUtility.getCurrentPageIndex (pageContext);
if(j<i)
{ S
P
ValidateProjectTask (pageContext);
}
P
A
}

E
if("OIE_DATE_CHANGE_RECEIPT".equals(eventType))//here the condition is based on the
Event type, because the logic should be perform when the PPR was invoked.
{ L
CdefaultForReceipt(pageContext,1);

A }

R
if("OIE_DATE_CHANGE_PERDIEM".equals(eventType))
{
O }
defaultForPerDiem(pageContext,1);

if("OIE_DATE_CHANGE_MILE".equals(eventType))
{
defaultForMileage(pageContext,1);
}
super.processFormRequest(pageContext, webBean);
}
http://oracleapps88.blogspot.com/ Raju Ch

public void defaultForReceipt(OAPageContext pageContext,int calledFrom)


{
WebExpensesAMImpl am1=
(WebExpensesAMImpl)pageContext.getRootApplicationModule();
ExpenseReportLinesVOImpl receiptBasedLinesVOImpl
=(ExpenseReportLinesVOImpl)am1.getCashAndOtherLinesVO();
int i = receiptBasedLinesVOImpl.getRowCount();
String taskNumber = null;
String projectNumber = null;

M
if(i>0)
{
try O
.C
{
if (am1 instanceof ExpensesAMImpl)
{
T
ExpensesAMImpl expenseAM = (ExpensesAMImpl)am1;
O
P
ExpenseReportHeadersVOImpl headerVO =

S
(ExpenseReportHeadersVOImpl)expenseAM.getExpenseReportHeadersVO();
ExpenseReportHeadersVORowImpl headerRow =
(ExpenseReportHeadersVORowImpl)headerVO.first();
G
O
projectNumber = headerRow.getAttribute2();// here we are getting ProjectNumber from

L
Header
taskNumber = headerRow.getAttribute3();

.B
String purpose = headerRow.getAttribute1();

8
}

8
if(projectNumber !=null && taskNumber !=null)
{
S
for(RowSetIterator rowsetiterator = OIEUtil.getNoValIterator(receiptBasedLinesVOImpl);
rowsetiterator.hasNext();)
P
{
P
A
ExpenseReportLinesVORowImpl receiptBasedLinesVORowImpl =
(ExpenseReportLinesVORowImpl)rowsetiterator.next();
E
Date date = receiptBasedLinesVORowImpl.getStartExpenseDate();
L String existProjectNumber = receiptBasedLinesVORowImpl.getProjectNumber();
C String existTaskNumber = receiptBasedLinesVORowImpl.getTaskNumber();

A if(calledFrom==1){
if (date != null && existProjectNumber== null && existTaskNumber == null)
R {
O receiptBasedLinesVORowImpl.setProjectNumber(projectNumber);// here we are setting
the projectNumber to receiptBasedLinesVO
receiptBasedLinesVORowImpl.setTaskNumber(taskNumber);// and same way to
TaskNumber
}
}else
{
if(date != null)
http://oracleapps88.blogspot.com/ Raju Ch

{
receiptBasedLinesVORowImpl.setProjectNumber(projectNumber);
receiptBasedLinesVORowImpl.setTaskNumber(taskNumber);
}
}
}
}
}catch(Exception e)
{

M
System.out.println("Exception :"+e.getMessage());
}
} O
.C
}
The same which is applicable for remaning Methods
ie defaultForPerDiem(OAPageContext pageContext,int calledFrom)
T
defaultForMileage(OAPageContext pageContext,int calledFrom)
O
P
S
4.4 Setup
G
Installation steps O
L
.B
The following modules comprise the implementation set for the Project and Task
Number are defaulted from the Header Information.

8 FTP Target Location


Deployment Files
8
S Type

P
XXAPCreditCardLinesPG.xml ASCII /xxsai/oracle/apps/ap/oie/webui

P
XXAPCashAndOtherLinesCO.class BIN /xxsai/oracle/apps/ap/oie/server

A
XXAPCashAndOtherLinesPG.xml ASCII /xxsai/oracle/apps/ap/oie/webui
XXAPCashAndOtherCO.class BIN /xxsai/oracle/apps/ap/oie/server
E in your local machine and copy the final folder delivered into
L
1. Install JDeveloper

C<JDEV_INSTALL_DIR>\jdevhome\jdev\myclasses
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects and
and follow below steps. (Final
A2. folder will be delivered along with the last OA Framework object)

R Copy the final deliverable folder into $OA_JAVA folder in UNIX machine with
O appropriate directory structure “. Class” files should be moved in BIN mode and other
should be moved in ASCII mode.
3. Move the above files in mentioned Target Location.
4. Import the .xml file into the data base
i. <JDEV_INSTALL_DIR>\jdevbin\jdev\bin:\>import
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects\xxsai\oracle\apps\ap
\oie\webui\ XXAPCreditCardLinesPG.xml -rootdir
http://oracleapps88.blogspot.com/ Raju Ch

<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects -username apps -


password apps -dbconnection
"(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<HOST_NA
ME>)(PORT=<PORT_NUMBER>))(CONNECT_DATA=(SID=<SID_N
AME>)))"
ii. <JDEV_INSTALL_DIR>\jdevbin\jdev\bin:\>import
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects\xxsai\oracle\apps\ap
\oie\webui\ XXAPCashAndOtherLinesPG.xml -rootdir
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects -username apps -
password apps -dbconnection
M
"(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<HOST_NA
ME>)(PORT=<PORT_NUMBER>))(CONNECT_DATA=(SID=<SID_N O
AME>)))"
.C
iii. <JDEV_INSTALL_DIR>\jdevbin\jdev\bin:\>import
T
O
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects\xxsai\oracle\apps\ap

P
\oie\webui\ XXAPPurposeLookupVO.xml -rootdir
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects -username apps -
password apps -dbconnection S
G
"(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<HOST_NA

O
ME>)(PORT=<PORT_NUMBER>))(CONNECT_DATA=(SID=<SID_N

L
AME>)))"

B
5. Run the delivered jpx file using the below command by placing it in your local
machine(For example in the below command
. JPX file is placed in C:\ drive)

8 specified in the .jpx definition file to the


6. Run the jpx import utility to import substitutions
8
MDS repository using<JDEV_INSALL_DIR>\jdevbin\jdev\bin>jpximport
S
C:\iExpenses.jpx -username apps -password apps -dbconnection "(DESCRIPTION=
(ADDRESS=
P
P
(PROTOCOL=tcp)(HOST=<HOST_NAME>)(PORT=<PORT_NUMBER>))(CONNEC
T_DATA=(SID=<SID_NAME>)))"
A call of the function OIEENTRYFLOW
E
7. Change the HTML

L
(OA.jsp?page=/oracle/apps/ap/oie/entry/header/webui/GeneralInformationPG&OASF=O
IE_EXPENSE_REPORT_SEARCH) with the custom path
CE_EXPENSE_REPORT_SEARCH)
OA.jsp?page=/xxsai/oracle/apps/ap/oie/webui/XXAPGeneralInformationPG&OASF=OI

A8. Go to System Administrator  Application  Function  Query with the function


R
O
OIEENTRYFLOW  Click on Web HTML  Change the HTML Call with
OA.jsp?page=/xxsai/oracle/apps/ap/oie/webui/XXAPGeneralInformationPG&OASF=OI
E_EXPENSE_REPORT_SEARCH
9. Bounce the apache server.
http://oracleapps88.blogspot.com/ Raju Ch

5. Capture Attendee Information

While entering expense reports for expense type like Meals at Meetings-3rd parties to
which ‘expense type data rule’ functionality is attached, then business can capture
additional information for the attendees or recipients (both for employees and non-
employees).
M
O
Basic Business Needs
.C
T
When any expense report is entered for expense types to which ‘expense type data rule’

O
is attached the system allows capturing additional information for the attendees or
recipients (both employees and non-employees). For the non-employees the attendees or
P
recipients information need to be manually populated. For employees the attendees or
S
recipients information like name and title will come based on the value selected from the

G
LoV for the name column.

O
As per the standard product functionality the title column for the employees gets its value
from the position field on the HR Assignment form (PER_ALL_ASSIGNMENT_F
L
Table). But as the business stores the employee title in the ATTRIBUTE5 column of the

.B
PER_ALL_PEOPLE_F table the requirement is to get the title value from the same.

8
The following Expense Types will use expense type data rule:

8
1. Entertainment with 3rd parties

S
2. Entertain/Recreation with Personnel

P
3. Meals at Meetings-3rd parties

P
4. Meals at Offsite Mtgs- Personnel

A
5. Meals at On-site Mtgs- Personnel

E
6. Recruiting Expenses

L7. Meals-Employee Extended Workday

C
A
R
O

Process flow
Employee enters expense report
for certain Expense Types
http://oracleapps88.blogspot.com/ Raju Ch

The Detail page will have fields to capture


additional information for the attendees or
recipients (both employees and non-
employees)

M
Under Attendees or Recipients--> Employee O
.C
Information region – When the name is
selected from the LoV the title should default
the value stored in ATTRIBUTE5 column of T
the PER_ALL PEOPLE_F table
O
5.1 Before Customization
P
S
G
O
L
.B
8
8
S
P
P
A
E
L
C
A
R
O
http://oracleapps88.blogspot.com/ Raju Ch

5.2 After Customization

M
O
.C
T
O
P
S
G
O
L
.B
After the Customization Title displaying from the attribute5
8
8
S
5.3 How to achieve this Functionality using OAF Customization:

P
This customization done to capture correct title for the employees in the employee information.
P
A brief summary of the strategy appears below:
A
E
Program Logic

C
L
The whole process follows the following sequence:
Create a Custom BC4J Package (xxsai.oracle.apps.ap.oie.server).
A Create new Custom View Object XXAPAllEmployeesVO in custom BC4J package
R (xxsai.oracle.apps.ap.oie.server) by Extending the existing AllEmployeeVO.
O  Make the Substitution with the newly created XXAPAllEmployeesVO.

 Create a new application module XXAPAllEmployeesAM.xml.

 Create a new region XXAPAllEmployeesLovRN.xml style as based on the VO


XXAPAllEmployeesVO the region style as table.
http://oracleapps88.blogspot.com/ Raju Ch

 Attach the XXAPAllEmployeesVO to the application module XXAPAllEmployeesAM.

 Substitute this VO into the Standard VO.

 The BC4J framework updates the project's .jpx file (each project .jpr has a
corresponding .jpx file of the same name). The .jpx is an XML document that includes a
"Substitutes" section.

 The substitutions specified in the .jpx definition file will need to be deployed to the MDS
repository on the database of your target 11i instance. Zip the directory structure
M
O
(xxsai\oracle\apps\ap\oie\server) generated for the new extended objects and upload into
the server at $OA_JAVA and unzip it.

.C
 Run the jpx import utility to import substitutions specified in the .jpx definition file to the
MDS repository using<JDEV_INSALL_DIR>\jdevbin\jdev\bin>jpximport
T
O
C:\iExpenses.jpx -username apps -password apps -dbconnection "(DESCRIPTION=
(ADDRESS=
(PROTOCOL=tcp)(HOST=<HOST_NAME>)(PORT=<PORT_NUMBER>))(CONNEC P
T_DATA=(SID=<SID_NAME>)))"
S
 Import the page in to MDS Directory import G
O
<JDEV_INSALL_DIR>\jdevhome\jdev\myprojects\sai\oracle\apps\ap\oie\webui\
XXAPAllEmployeesLovRN.xml -rootdir
L
.B
<JDEV_INSALL_DIR>\jdevhome\jdev\myprojects -username apps -password apps -
dbconnection "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(

8
HOST=<HOST_NAME>)(PORT=<PORT_NUMBER>))(CONNECT_DATA=(SID=<S

8
ID_NAME>)))"

S
P
 Profile options “Personalize Self-service Defn” (FND_CUSTOM_OA_DEFINTION) and
“FND: Personalization Region Link Enabled”
P
(FND_PERSONALIZATION_REGION_LINK_ENABLED) should be set to ‘Yes’.
A
 BounceE the apache server.
L the profile options related to Personalization.
 Disable
C
A
R
O OA Framework Objects

1. Create Custom VO (XXAPAllEmployeeVO)

Process Value Notes


Field
http://oracleapps88.blogspot.com/ Raju Ch

Process Value Notes


Field
Name XXAPAllEmployeeVO
Package xxsai.oracle.apps.ap.oie.server

2. Substitution: Right-click on the project, select ‘Edit Business Components


Project’ and select ‘Substitutions’ section. Select base object and extended object
and then choose ‘ADD’ to create new Substitution rule.
M
Process Field Value Notes
O
Available AllEmployeeVO
.C
T
Substitution XXAPAllEmployeeVO

O
Logic For this Requirement is:
P
S
G
1. Create custom VO XXAPAllEmployeeVO
Note: Steps for Creating VO was specified in the previous Requirement (Refer 1.7,1.9)
O
Query for the XXAPAllEmployeeVO is:
L
SELECT .B
P.PERSON_ID,
8
P.FULL_NAME,
8
p.attribute5 Title,
S
P
ORG.NAME ORG_NAME,

P
p.employee_number AS employee_number
FROM
A
per_people_x p,
E
per_assignments_x a,

L
hr_organization_units org

C
WHERE
a.person_id = p.person_id
A AND a.organization_id = org.organization_id
R AND NOTap_web_db_hr_int_pkg.isPersonCwk(p.person_id) ='Y'.

O 5.4 Setup
Installation Steps
The following modules comprise the implementation set for the Project and Task
Number are defaulted from the Header Information.

Deployment Files FTP Target Location


Type
http://oracleapps88.blogspot.com/ Raju Ch

Deployment Files FTP Target Location


Type
XXAPAllEmployeesAM.xml ASCII /xxsai/oracle/apps/ap/oie/server
XXAPAllEmployeesAMImpl.class BIN /xxsai/oracle/apps/ap/oie/server
XXAPAllEmployeesVO.xml ASCII /xxsai/oracle/apps/ap/oie/server
XXAPAllEmployeesVOImpl.class BIN /xxsai/oracle/apps/ap/oie/server
XXAPAllEmployeesLovRN.xml BIN /xxsai/oracle/apps/ap/oie/webui
1. Install JDeveloper in your local machine and copy the final folder delivered into

M
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects and
<JDEV_INSTALL_DIR>\jdevhome\jdev\myclasses and follow below steps. (Final
folder will be delivered along with the last OA Framework object)
O
2. Copy the final deliverable folder into $OA_JAVA folder in UNIX machine with
appropriate directory structure “. Class” files should be moved in BIN mode and other .C
should be moved in ASCII mode. T
O
P
3. Move the above files in mentioned Target Location.

S
4. Import the .xml file into the data base
i.
G
<JDEV_INSTALL_DIR>\jdevbin\jdev\bin:\>import
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects\xxsai\oracle\apps\ap
O
\oie\webui\ XXAPAllEmployeesLovRN.xml -rootdir
L
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects -username apps -

.B
password apps -dbconnection
"(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<HOST_NA
8
ME)(PORT=<PORT_NUMBER>))(CONNECT_DATA=(SID=<SID_NA
ME>)))"
8
Sthe below command by placing it in your local machine
5. Run the delivered jpx file using
P
(For example in the below command JPX file is placed in C:\ drive)
P
6. Run the jpx import utility to import substitutions specified in the .jpx definition file to the
A
MDS repository using<JDEV_INSALL_DIR>\jdevbin\jdev\bin>jpximport
E (PROTOCOL=tcp)(HOST=<HOST-NAME>)(PORT=<PORT-
C:\iExpenses.jpx -username apps -password apps -dbconnection "(DESCRIPTION=

L
(ADDRESS=

7.C
NUMBER>))(CONNECT_DATA=(SID=<SID_NAME>)))"

A (OA.jsp?page=/oracle/apps/ap/oie/entry/header/webui/GeneralInformationPG&OASF=O
Change the HTML call of the function OIEENTRYFLOW

R IE_EXPENSE_REPORT_SEARCH) with the custom path


O OA.jsp?page=/xxsai/oracle/apps/ap/oie/webui/XXAPGeneralInformationPG&OASF=OI
E_EXPENSE_REPORT_SEARCH)
8. Go to System Administrator  Application  Function  Query with the function
OIEENTRYFLOW  Click on Web HTML  Change the HTML Call with
OA.jsp?page=/xxsai/oracle/apps/ap/oie/webui/XXAPGeneralInformationPG&OASF=OI
E_EXPENSE_REPORT_SEARCH
9. Bounce the apache server.
http://oracleapps88.blogspot.com/ Raju Ch

6. Business Rule Justification

The Airfare expenses requires justification if the class of travel is not COACH and is
claimed by employees who are lesser than Band D1.
M
Basic Business Needs O
.C
When any airfare expense is claimed by an employee then iExpenses can be setup to

T
require justification for incurring the expense irrespective of the band of the employee
claiming the expense, Flight type and Airline Class of Service used. But the requirement
here is that for Airfare expense claim, Justification is required if:
O
P
a. Airline Class of Service is not Coach, Flight Type is Domestic and employee is not
S
1st class travelers (i.e. Stan Glasgow Emp#47829 and Hideki Komiyama Emp# 23360
who always fly Ist class)
G
O
b. Airline Class of Service is not Coach, Flight Type is International and employee band

L
is lower than D1

. Bexpense and above conditions are satisfied


The Expense Report line details page should be customized in such a way that when the
expense report is entered claiming the Airfare
8
then Justification field should be become mandatory. The DFF attributes at expense
8
report line level details will be used to capture the values for ‘Airline Class of Service’

S
and ‘Flight Type’ for expense type: Airfare. The employee band information will be

P
taken from custom table: SECPI_USER_DATA.

Process Flow P
A
E
L
C
A Employee enters expense report
R for Airfare Expense

O
If the air travel does not meet the above
requirement then justification will be
mandatory.
http://oracleapps88.blogspot.com/ Raju Ch

Process Description

1. The employee enters the expense report through iExpense.


2. On expense report line employee selects Airfare expense and fill other details at
line level
3. When User clicks on Next or Return button and if the below conditions are met,
then the justification should be required:
Airline Class of Service is not Coach, Flight Type is Domestic and
employee is not 1st class travelers (i.e. Stan Glasgow Emp#47829 and
Hideki Komiyama Emp# 23360 who always fly Ist class) M
Airline Class of Service is not Coach, Flight Type is International and O
employee band is lower than D1.
.C
6.1 Before Customization T
O
P
S
G
O
L
.B
8
8
S
P
P
A
E
L
C
A
R 6.2 After Customization
O
http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
P
S
G
O
L
.B
8
8
S
P
P
A
E
L
C
A
R
O Justification is required for this case.

6.3 How We Achieve this Requirement Using OAF:


The customization for making justification required for Airfare Business Rule is achieved
by incorporating custom logic in the CO attached to the expense line details page. A brief
summary of the strategy appears below:
http://oracleapps88.blogspot.com/ Raju Ch

Program Logic
The whole process follows the following sequence:
 Create a Custom BC4J Package (xxsai.oracle.apps.ap.oie.server).

 Create a new Custom View Object XXAPEmpFirstClassVO in custom BC4J package


(xxsai.oracle.apps.ap.oie.server) for identifying the employees who don’t require the
justification.

 Create a new Custom View Object XXAPEmpBandVO in custom BC4J package


(xxsai.oracle.apps.ap.oie.server) for identifying the Band information. M
O
.C
 Create a new Custom View Object XXAPBandInfoVO in custom BC4J package
(xxsai.oracle.apps.ap.oie.server) for identifying the Band Details.
T
O
 Profile options “Personalize Self-service Defn” (FND_CUSTOM_OA_DEFINTION) and
“FND: Personalization Region Link Enabled”
(FND_PERSONALIZATION_REGION_LINK_ENABLED) should be set to ‘Yes’. P
S
 Bounce the apache server.
G
 Disable the profile options related to Personalization. O
L
OA Framework Objects .B
1. Create Custom VO 8
8
(XXAPEmpFirstClassVO)
S
P Value
P
Process Notes
A Field

E Name
L
XXAPEmpFirstClassVO
Package xxsai.oracle.apps.ap.oie.server
C
A
R 2. Create Custom VO (XXAPEmpBandVO)

O
Process Value Notes
Field
Name XXAPEmpBandVO
Package xxsai.oracle.apps.ap.oie.server
http://oracleapps88.blogspot.com/ Raju Ch

3. Create Custom VO (XXAPBandInfoVO)

Process Value Notes


Field
Name XXAPBandInfoVO
Package xxsai.oracle.apps.ap.oie.server

M
O
Query for XXAPEmpFirstClassVO is:

SELECT
.C
T
lookup_code EmployeeNumber,
ppf.person_id EmpID,
description Required
O
FROM
P
fnd_lookup_values flv,
per_all_people_f ppf S
WHERE G
flv.lookup_type='SEOIE_EMPLOYEE_FIRST_CLASS'
O
and flv.language='US'
L
.B
and flv.meaning in (select employee_number from per_all_people_f a where
a.person_id=ppf.person_id).
8
8
S
Query for XXAPEmpBandVO is:

SELECT P
P
ppf.person_id BandEmployeeID,
A
ppf.full_name EmployeeName,

Esud.emp_id EmployeeNumber,

L
sud.orig_band Band
FROM
C PER_ALL_PEOPLE_F PPF,
A SECPI_USER_DATA SUD

R WHERE
sud.emp_id in (select employee_number from per_all_people_f a where
O a.person_id=ppf.person_id).

Query for XXAPBandInfoVO is:

SELECT
lookup_code, meaning BandInfo from fnd_lookup_values
WHERE
http://oracleapps88.blogspot.com/ Raju Ch

lookup_type='SEOIE_BAND_INFORMATION'
and language='US'

6.4 Lookups for this Requirement

Define the Lookups for Airfare Class of Service: The lookup code definition has defined
for the employees whose not required the justification.

Lookups
M
O
Type SEOIE_EMPLOYEE_FIRST_CLASS
Meaning Airline Class of Service
Application East Oracle Internet Expenses
.C
T
Description Airline Class of Service
Values
Code Meaning O
Description
GLASGOW,STANFORD L 55673 Y P
HIDEKI KOMIYAMA 23360
S Y

G
O
L
.B
8
8
S
P
P
A
E
L
C
A
R
O
Note: For the above lookup definition the lookup code should be the Employee Name
and Meaning should be the Employee Number of the employee.

The lookup code definition has defined for the bands lower than D1.
http://oracleapps88.blogspot.com/ Raju Ch

Lookups
Type SEOIE_BAND_INFORMATION
Meaning SEOIE_BAND_INFORMATION
Application East Oracle Internet Expenses
Description Airline Class of Service
Values
Code Meaning
BAND A A
BAND B B M
BAND C C
O
.C
T
O
P
S
G
O
L
.B
8
8
S
P
P
A
E
L
C
A
R 6.5 Logic to Implement in XXAPDetailMainCO
O //This method which contains the Justification mandatory for given
conditions

public void validateJustification(OAPageContext pageContext,


OAWebBean webBean){
String expenseTemplateReportType=null;
http://oracleapps88.blogspot.com/ Raju Ch

int i=0;
String context = null;
String classCode = null;
String justfication = null;
String flight_type=null;
WebExpensesAMImpl am1 =
(WebExpensesAMImpl)pageContext.getRootApplicationModule();
ExpenseReportHeadersVOImpl expenseReportHeaderVO = M
am1.getExpenseReportHeadersVO();
O
.C
ExpenseReportHeadersVORowImpl expenseReportHeaderROW =
(ExpenseReportHeadersVORowImpl)expenseReportHeaderVO.first();
Number employeeID = expenseReportHeaderROW.getEmployeeId(); T
O
P
Number
expensereportid=expenseReportHeaderROW.getExpenseReportId();
int count=0; S
G
O
DetailReceiptBasedVORowImpl row=null;
try{
L
.B
DetailAMImpl detailAMImpl =
(DetailAMImpl)pageContext.getApplicationModule(webBean);
8 vo =
8
DetailReceiptBasedVOImpl
(DetailReceiptBasedVOImpl)detailAMImpl.getDetailLineVO();
S
P= row.getAttributeCategory();
row = (DetailReceiptBasedVORowImpl)vo.first();

P
context

A justfication = row.getJustification();
classCode = row.getAttribute8();

E
L flight_type=row.getAttribute15();}
C catch(Exception e){
A
R
System.out.println("Error was occured in Detail main CO:"+e);

O
count++; }
if(count==0) {
if(context!=null){
if((context.equals("Airfare"))||(context.equals("Relo.Airfare"))){
if(xxapExpenseTemplateVo == null){
http://oracleapps88.blogspot.com/ Raju Ch

xxapExpenseTemplateVo =
(XXAPExpenseTemplatesVOImpl)am1.findViewObject("XXAPExpe
nseTemplatesVO");
if(xxapExpenseTemplateVo == null){
xxapExpenseTemplateVo =
(XXAPExpenseTemplatesVOImpl)am1.createViewObject("XXAPEx
penseTemplatesVO",
"xxssai.oracle.apps.ap.oie.server.XXAPExpenseTemplatesVO");}}
if(xxapExpenseTemplateVo!= null){
M
xxapExpenseTemplateVo.setWhereClause("EXPENSE_REPORT_ID
O
.C
=" + expensereportid);
String query = xxapExpenseTemplateVo.getQuery();
T
O
xxapExpenseTemplateVo.executeQuery();

P
Row xxapExpenseTemplateVoRow = null;

S
if((xxapExpenseTemplateVoRow = xxapExpenseTemplateVo.next())

G
!= null){

O
expenseTemplateReportType =

L
(String)xxapExpenseTemplateVoRow.getAttribute("ReportType");}}

.B
if (("Regular ER
Template".equalsIgnoreCase(expenseTemplateReportType))||("Reloca
8
tion ER Template".equalsIgnoreCase(expenseTemplateReportType))){

8
S
//This VO which contains the all First Class Employee details.
P
P
if(xxapEmpFirstClassVO == null){

A (XXAPEmpFirstClassVOImpl)am1.findViewObject("XXAPEmpFirst
xxapEmpFirstClassVO =

E ClassVO");
L
C
if(xxapEmpFirstClassVO == null){

A
xxapEmpFirstClassVO =
(XXAPEmpFirstClassVOImpl)am1.createViewObject("XXAPEmpFir
R stClassVO",
O "xxsai.oracle.apps.ap.oie.server.XXAPEmpFirstClassVO");}}
if(xxapEmpFirstClassVO != null){
xxapEmpFirstClassVO.setWhereClause("EmpID='" + employeeID+
"'");
String query = xxapEmpFirstClassVO.getQuery();
xxapEmpFirstClassVO.executeQuery();
http://oracleapps88.blogspot.com/ Raju Ch

Row xxapEmpFirstClassVORow = null;


i=xxapEmpFirstClassVO.getRowCount();}
if(classCode!= null){

//Here the condition will check wheather the ClassCode is First then
the Justficiation is must otherwise Throw Exception
if((classCode.equalsIgnoreCase("FIRST")) && (i==0) ){
if(justfication != null){} M
else{ O
.C
throw new OAException("Justfication is required for airfare class of
service", (byte)0);}}
T
O
//Same way the conditions will be check for the Remaining conditions

P
also like Classcode is Business and Class is not Coach

6.6 Setup S
Installation Steps G
O
The following modules comprise the implementation set for the Business Rule to require
Justification Process.
L
.B FTP
Deployment Files
8 Type Target Location

8
S
XXAPEmpBandVO.xml ASCII /xxsai/oracle/apps/ap/oie/webui
XXAPEmpFirstClassVO.xml ASCII / xxsai /oracle/apps/ap/oie/webui
P
XXAPEmpBandVORowImpl.class BIN / xxsai /oracle/apps/ap/oie/server
P
XXAPEmpBandVOImpl.class BIN / xxsai /oracle/apps/ap/oie/server
A
XXAPEmpFirstClassVORowImpl.class BIN / xxsai /oracle/apps/ap/oie/server
EXXAPEmpFirstClassVOImpl.class BIN / xxsai /oracle/apps/ap/oie/server

L
1. Install JDeveloper in your local machine and copy the final folder delivered into
C <JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects and

A <JDEV_INSTALL_DIR>\jdevhome\jdev\myclasses and follow below steps.

R
(Final folder will be delivered along with the last OA Framework object)

O
2. Copy the final deliverable folder into $OA_JAVA folder in UNIX machine with
appropriate directory structure “. Class” files should be moved in BIN mode and
other should be moved in ASCII mode.
3. Move the above files in mentioned Target Location.
4. Change the HTML call of the function OIEENTRYFLOW
(OA.jsp?page=/oracle/apps/ap/oie/entry/header/webui/GeneralInformationPG&O
ASF=OIE_EXPENSE_REPORT_SEARCH) with the custom path
http://oracleapps88.blogspot.com/ Raju Ch

OA.jsp?page=/xxsai/oracle/apps/ap/oie/webui/XXAPGeneralInformationPG&OA
SF=OIE_EXPENSE_REPORT_SEARCH)
i. Go to System Administrator  Application  Function  Query with
the function OIEENTRYFLOW  Click on Web HTML  Change the
HTML Call with
OA.jsp?page=/xxsai/oracle/apps/ap/oie/webui/XXAPGeneralInformationP
G&OASF=OIE_EXPENSE_REPORT_SEARCH
5. Bounce the apache server.

M
O
.C
T
O
7. Defaulting Additional CC details to ER Line DFF
P
S
This document describes the functionality of customization required to default additional

G
Credit Card Transaction details to Expense Report Line DFF fields.

O
Standard functionality of iExpenses will not provide fields on Expense Report Screen to

L
display some of the additional Credit Card Transaction details. To accommodate such
fields on Expense Report Entry screen, line level DFF will be defined with mapping

.B
between Attribute columns and transaction fields. And customization will be done to

8
default additional Credit Card Transaction details into respective DFF fields. Based on
the Credit Card Transaction line Expense Category, the additional details will be
8
defaulted to the corresponding ER Line DFF fields.
S
P details of Expense Category ‘Airline’ like Airline Booking
Example

Agent, DepartureP
The credit card transaction
City, Destination City etc.. will be defaulted to respective ER line DFF
A
Attributes columns ATTRIBUTE3, ATTRIBUTE4, ATTRIBUTE10 (Which are mapped
E
to Airline Booking Agent, Departure City, and Destination City in DFF definition)
L
CThe additional Credit Card Transaction details should be captured on Credit Card
Basic Business Needs

A
R
Expense Entry Details Screen.

O
http://oracleapps88.blogspot.com/ Raju Ch

Process Flow

Enter expense report

Select credit card transaction

M
O
Enter the expense report line
information

.C
T
O
On detail page DFF fields are displayed based on the

P
expense type used on the line. These fields will
automatically fetch the values from the credit card
transaction table.S
G
O
7.1 Before Customization L
.B
8
8
S
P
P
A
E
L
C
A
R
O
http://oracleapps88.blogspot.com/ Raju Ch

7.2 After Customization

M
O
.C
T
O
P
S
G
O
L
7.3 How We Achieve this Requirement Using OAF:.B
details to Expense Report Line8
8
This functionality of customization required to default additional Credit Card Transaction
DFF fields. A brief summary of the strategy appears
below: S
P
After analyzing the ExpenseDetailsPG, Customization is required for
P
A
1. XXAPExpenseDetailsPG

E
2. XXAPDetailsMainCO

L 3. XXAPAirClassCodeVO

CProgram st
Note: Creation of VO, CO and Page will be discussed in the 1 requirement.

A Logic
R The whole process follows the following sequence:
O  Create a Custom BC4J Package (xxsai.oracle.apps.ap.oie.server).

 Create a new custom Page XXAPExpenseDetailsPG.xml in package


xxsai.oracle.apps.ap.oie.webui and copy the code from existing page ExpenseDetailsPG.

 Set new Controller Object XXAPDetailMainCO for OIEDetails region of


XXAPExpenseDetailsPG by extending the existing Controller Object DetailMainCO.
Package Name for this CO is xxsai.oracle.apps.ap.oie.webui.
http://oracleapps88.blogspot.com/ Raju Ch

 Create a new Custom View Object XXAPAirfareClassCodeVO in custom BC4J package


(xxsai.oracle.apps.ap.oie.server) for identifying the Airfare Class Code.

 The substitutions specified in the .jpx definition file will need to be deployed to the MDS
repository on the database of your target 11i instance. Zip the directory structure
(xxsai\oracle\apps\ap\oie\server) generated for the new extended objects and upload into
the server at $OA_JAVA and unzip it.
 Run the import utility to import the pages into the MDS repository import
<JDEV_INSALL_DIR>\jdevhome\jdev\myprojects\xxsai\oracle\apps\ap\oie\webui\XXA
M
O
PCashAndOtherLinesPG.xml -rootdir
<JDEV_INSALL_DIR>\jdevhome\jdev\myprojects -username apps -password apps -
dbconnection
.C
T
"(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<HOST_NAME>)(PORT=
<PORT_NUMBER>))(CONNECT_DATA=(SID=<SID_NAME>)))"
 Run the import utility to import the pages into the MDS repository import O
P
<JDEV_INSALL_DIR>\jdevhome\jdev\myprojects\xxsai\oracle\apps\ap\oie\webui\
XXAPCreditCardLinesPG.xml -rootdir
S
G
<JDEV_INSALL_DIR>\jdevhome\jdev\myprojects -username apps -password apps -
dbconnection
O
"(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<HOST_NAME>)(PORT=
<PORT_NUMBER>))(CONNECT_DATA=(SID=<SID_NAME>)))" L
.B
8
 Profile options “Personalize Self-service Defn” (FND_CUSTOM_OA_DEFINTION) and

8
“FND: Personalization Region Link Enabled”
(FND_PERSONALIZATION_REGION_LINK_ENABLED) should be set to ‘Yes’.
S
P
 Bounce the apache server.
 Disable the profileP
A
options related to Personalization.

E
L
C
A
R OA Framework Objects
O 1. Set New Controller((XXAPDetailMainCO)Object on XXAPExpenseDetailPG Page

Process Field Value Notes


Name XXAPDetailMainCO
Package xxsai.oracle.apps.ap.oie.webui
Region OIEDetails
Extends Controller DetailMainCO
http://oracleapps88.blogspot.com/ Raju Ch

Process Field Value Notes


Object
2. Create Custom VO (XXAPAirfareClassCodesVO)

Process Value Notes


Field
Name XXAPAirfareClassCodesVO
M
Package xxsai.oracle.apps.ap.oie.server
O
Query for XXAPAirfareClassCodesVO is:
.C
T
O
SELECT
lookup_code AirfareClassCode,
Description ClassType P
FROM
S
G
fnd_lookup_values
WHERE
lookup_type='SEOIE_AIRFARE_CLASS_CODES' O
L
.B
The Lookup code definition has defined for the Airline class of service codes

8
8
S
7.4 Logic to implement in XXAPDetailMainCO

//this is the method whichP


P
is used to default some fileds in detail page.
A
public void defaultCreditInformation(OAPageContext pageContext,OAWebBean webBean)
E
L
{

C
WebExpensesAMImpl am1=
(WebExpensesAMImpl)pageContext.getRootApplicationModule();
A
R DetailReceiptBasedVOImpl vo =
DetailAMImpl detailAMImpl = (DetailAMImpl)pageContext.getApplicationModule(webBean);

O (DetailReceiptBasedVOImpl)detailAMImpl.getDetailLineVO();
DetailReceiptBasedVORowImpl row=(DetailReceiptBasedVORowImpl)vo.first();
Number transactionId=row.getCreditCardTrxId();
String context=row.getAttributeCategory();
String expenseType = row.getExpenseTypeName();
String expenseType1 = am1.getPrompt(row.getWebParameterId());
http://oracleapps88.blogspot.com/ Raju Ch

if(context==null && expenseType1 != null){


row.setAttributeCategory(expenseType1);
context = row.getAttributeCategory();}
if(xxapCCTransactionVo == null){
xxapCCTransactionVo =
(XXAPCreditCardTransactionsVOImpl)am1.findViewObject("XXAPCreditCardTransactionsV
O");
if(xxapCCTransactionVo == null){
M
xxapCCTransactionVo=(XXAPCreditCardTransactionsVOImpl)am1.createViewObject("XXAP
O
.C
CreditCardTransactionsVO","xxsai.oracle.apps.ap.oie.server.XXAPCreditCardTransactionsVO"
);}}
if(xxapCCTransactionVo != null){ T
xxapCCTransactionVo.setWhereClause("TRX_ID ="+transactionId); O
String query=xxapCCTransactionVo.getQuery(); P
xxapCCTransactionVo.executeQuery(); S
G
O
XXAPCreditCardTransactionsVORowImpl xxapCCTransactionsVoRow=null;
if((xxapCCTransactionsVoRow =
L
.B
(XXAPCreditCardTransactionsVORowImpl)xxapCCTransactionVo.next())!=null)
{
8
8
Number trxId=xxapCCTransactionsVoRow.getTrxId();

are".equalsIgnoreCase(context))) S
if(("Airfare".equalsIgnoreCase(context))||("IHR.Airfare".equalsIgnoreCase(context))||("Relo.Airf

P
{
P
A
String destCity=xxapCCTransactionsVoRow.getAirarrival();

E
Date dirDepartDate=xxapCCTransactionsVoRow.getAirdepdate();
L
String bookingAgent=xxapCCTransactionsVoRow.getAirticketissue();
C
String departCity=xxapCCTransactionsVoRow.getAirdepcity();
A
R String sDate=null;
String dDate=null;

O try{
if(dirDepartDate !=null){
dDate=dirDepartDate.toString();
sDate=dateMethod(dDate);
row.setAttribute10(sDate); }
http://oracleapps88.blogspot.com/ Raju Ch

else{
throw new OAException("Date is Null", (byte)0);}}
catch(Exception e){
System.out.println("Date is null");}
try{
if(destCity!=null){
row.setAttribute4(destCity); }}
catch(Exception e){ M
O
.C
System.out.println("Destination city is null");}
try{
if(bookingAgent!=null){ T
O
P
row.setAttribute5(bookingAgent); }}

S
catch(Exception e){
try{
G
if(departCity!=null){
O
row.setAttribute3(departCity);}}
L
.B
catch(Exception e){

8
String classCode=xxapCCTransactionsVoRow.getAirserclass ();
if(classCode!=null){ 8
try{ S
char c=classCode.charAt(0); P
P== null){
A
if(xxapAirfareClassCodesvo

E
xxapAirfareClassCodesvo =

L
(XXAPAirfareClassCodesVOImpl)am1.findViewObject("XXAPAirfareClassCodesVO");

C
if(xxapAirfareClassCodesvo == null){

A
xxapAirfareClassCodesvo=(XXAPAirfareClassCodesVOImpl)am1.createViewObject("XXAPAi

R if(xxapAirfareClassCodesvo != null){
rfareClassCodesVO","xxsai.oracle.apps.ap.oie.server.XXAPAirfareClassCodesVO");}}

O xxapAirfareClassCodesvo.setWhereClause("AirfareClassCode='"+c+"'");
String query1=xxapAirfareClassCodesvo.getQuery();
xxapAirfareClassCodesvo.executeQuery();
int count=xxapAirfareClassCodesvo.getRowCount();
if(count!=0){
http://oracleapps88.blogspot.com/ Raju Ch

XXAPAirfareClassCodesVORowImpl xxapAirfareClassCodesVoRow=null;
if((xxapAirfareClassCodesVoRow =
(XXAPAirfareClassCodesVORowImpl)xxapAirfareClassCodesvo.next())!=null){
String classType=xxapAirfareClassCodesVoRow.getClasstype();
if(classType.equalsIgnoreCase("First")){
row.setAttribute8("First"); }
else
if(classType.equalsIgnoreCase("Business")){ M
row.setAttribute8("Business");}}} O
else{
.C
row.setAttribute8("Coach");}}}
T
catch(Exception e)
O
{ P
System.out.println ("Exception was raised");}} S
else{ G
O
L
System.out.println ("class code is null");}}

.B
The same logic is applicable for the Context “CarRental “,”Loding-Room Charges” and
“Loding-Room Tax” 8
8
7.5 Setup
S
P
Installation Steps
P
A
E
The Lookup code definition has defined for the Airline class of service codes

L
C
A
R
O
http://oracleapps88.blogspot.com/ Raju Ch

M
O
.C
T
O
Note:
P
S
If Air class of service starts with A, F or P in credit card transactions table we have to
G
default First Class in DFF field of Expense line details for Air class of Service.

O
If Air class of service starts with C, D or J in credit card transactions table we have to

L
default Business Class in DFF field of Expense line details for Air class of Service.

.B
If we find any other codes in the credit card transaction table then we have to default
Coach in DFF field of Expense line details for Air class of Service.

8
8Lookups
S
P
Type SEOIE_AIRFARE_CLASS_CODES
Meaning Airline Class Of Service Codes
Application P East Oracle Internet Expenses
Description A
E Values
Code
L
Meaning Description
A
CC A First

A
C Business
D D Business
RF F First
O J
P
J
P
Business
First

The following modules comprise the implementation set for the Defaulting Additional CC details
to ER Line DFF Process.
http://oracleapps88.blogspot.com/ Raju Ch

Deployment Files FTP Target Location


Type
XXAPCreditCardLinesPG.xml ASCII /xxsai/oracle/apps/ap/oie/webui
XXAPCashAndOtherListPG.xml ASCII /xxsai/oracle/apps/ap/oie/webui
XXAPCashAndOtherCO.class BIN /xxsai/oracle/apps/ap/oie/webui
XXAPCreditCardLinesCO.class BIN /xxsai/oracle/apps/ap/oie/webui

a. Install JDeveloper in your local machine and copy the final folder delivered into
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects and
M
O
<JDEV_INSTALL_DIR>\jdevhome\jdev\myclasses and follow below steps.
(Final folder will be delivered along with the last OA Framework object)
b. Copy the final deliverable folder into $OA_JAVA folder in UNIX machine with
.C
T
appropriate directory structure “. Class” files should be moved in BIN mode and

O
other should be moved in ASCII mode.
c. Move the above files in mentioned Target Location.
P
d. Import the custom pages into the data base
S
i. <JDEV_INSTALL_DIR>\jdevbin\jdev\bin:\>import
G
O
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects\xxsai\oracle\apps\ap

L
\oie\webui\ XXAPCreditCardLinesPG.xml -rootdir
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects -username apps -

.B
password apps -dbconnection

8
"(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<HOST_NA

8
ME>)(PORT=<PORT_NUMBER>))(CONNECT_DATA=(SID=<SID_N
AME>)))"
S
P
ii. <JDEV_INSTALL_DIR>\jdevbin\jdev\bin:\>import
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects\xxsai\oracle\apps\ap
P
\oie\webui\ XXAPCashAndOtherListPG.xml -rootdir
A <JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects -username apps -

E password apps -dbconnection

L "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<HOST_NA

C
ME>)(PORT=<PORT_NUMBER>))(CONNECT_DATA=(SID=<SID_N
AME>))" -mmddir
A <JDEV_INSTALL_DIR>\jdevhome\jdev\myclasses\JRADXML

R e. Change the HTML call of the function OIEENTRYFLOW


O (OA.jsp?page=/oracle/apps/ap/oie/entry/header/webui/GeneralInformationPG&O
ASF=OIE_EXPENSE_REPORT_SEARCH) with the custom path
OA.jsp?page=/xxsai/oracle/apps/ap/oie/webui/XXAPGeneralInformationPG&OA
SF=OIE_EXPENSE_REPORT_SEARCH)
a. Go to System Administrator  Application  Function 
Query with the function OIEENTRYFLOW  Click on
Web HTML  Change the HTML Call with
OA.jsp?page=/xxsai/oracle/apps/ap/oie/webui/XXAPGener
http://oracleapps88.blogspot.com/ Raju Ch

alInformationPG&OASF=OIE_EXPENSE_REPORT_SEA
RCH
f. Bounce the apache server.

8. AMEX Late Fee Transactions

M
The Late fee transactions charged by AMEX should not be charged as business expenses.

Basic Business Needs


O
.C
The late fee transactions charged by the AMEX will be loaded against the card of the
employee. The user/employee should not be able to charge this transaction as business
T
expense. Hence the page where the employee attaches a transaction to an Expense Report

O
should be customized in such a way that the employee should be forced to categorize the

P
late fee expense as Personal expense. The employee should not be able to attach these
transactions as business expense.
S
Process
G
Employee logs onto O
applications and L
.B
creates a new Expense
Report
8
8
He has late fee transactions in list of

S
transactions that can be attached to an

P
Expense Report

P
AThe employee should be forced to
E categorize the late fee transaction as
L
C personal expense. He should not be to

A
attach the late fee transaction as business
expense.
R
O
http://oracleapps88.blogspot.com/ Raju Ch

8.1 Before Customization

M
O
.C
T
O
P
S
G
O
L
.B
8
8.2 After Customization
8
S
P
P
A
E
L
C
A
R
O

8.3 How We Achieve this Requirement Using OAF:


The customization for making AMEX late fee transactions as personal transactions is
achieved by incorporating custom logic in the CO attached to the credit card expenses
page. A brief summary of the strategy appears below:
http://oracleapps88.blogspot.com/ Raju Ch

Program Logic
The whole process follows the following sequence:
 Create a Custom BC4J Package (xxsai.oracle.apps.ap.oie.server).

 Create a new custom Page XXAPCreditCardLinesPG.xml in package


xxsai.oracle.apps.ap.oie.webui and copy the code from existing page CreditCardLinesPG.

 Set new Controller Object XXAPCreditCardLinesCO for OIECreditCardExpense region


of XXAPCreditCardLinesPG by extending the existing Controller Object M
CreditCardLinesCO. Package Name for this CO is xxsai.oracle.apps.ap.oie.webui.
O
 Modify the Custom View Object XXAPCCTransactionVO in custom BC4J package .C
(xxsai.oracle.apps.ap.oie.server) for identifying the AmexLateFee Transaction Types
T
 Bounce the apache server.
O
 Disable the profile options related to Personalization. P
S
G
OA Framework Objects

O
1. Set New Controller(XXAPDetailMainCO) Object on XXAPExpenseDetailPG

L
Page

Process Field
. B
Value Notes
Name 8XXAPCreditCardLinesCO
Package 8 xxsai.oracle.apps.ap.oie.webui
Region
S OIECreditCardExpense
P
Extends Controller CreditCardLinesCO

P
Object

A
E Custom VO (XXAPCCTransactionVO) (Refer 1.7,1.9)
2. Create
L
C
A Process Value Notes
R Field

O Name
Package
XXAPCCTransactionVO
xxsai.oracle.apps.ap.oie.server

Query for XXAPCCtransactionVO is:

SELECT
http://oracleapps88.blogspot.com/ Raju Ch

Trx_Id,
Card_Program_Id,
Transaction_Date,
Transaction_Amount,
Billed_Amount,
Posted_Currency_Code,
Billed_Currency_Code,
Merchant_Name1,
Merchant_City,

M
Merchant_Province_State,
Merchant_Country,
Folio_Type, O
.C
Category,
Report_Header_Id,
Company_Prepaid_Invoice_Id,
T
Expensed_Amount,
O
P
Billed_Date,

S
Hotel_Room_Amount,
Hotel_Telephone_Amount,
Hotel_Room_Tax,
G
O
Hotel_Bar_Amount,

L
Hotel_Movie_Amount,
Hotel_Gift_Shop_Amount,
Hotel_Laundry_Amount,
.B
8
Hotel_Health_Amount,

8
Hotel_Restaurant_Amount,
Hotel_Business_Amount,
S
Hotel_Parking_Amount,
P
Hotel_Room_Service_Amount,

P
Hotel_Tip_Amount,

A
Hotel_Misc_Amount,
Payment_Due_From_Code,
E Posted_Date,
L Air_Ticket_Number,
C Trunc(Sysdate - Posted_Date) As Age,

A Air_Arrival_City Airarrival,
Air_Departure_Date Airdepdate,
R Air_Ticket_Issuer Airticketissue,
O Air_Departure_City Airdepcity,
Car_Rental_Location Carrentalloc,
Car_Rental_Agreement_Number Carrentalagreenum,
Car_Rental_Date Carrentaldate,
Car_Return_Location Carreturnloc,
Car_Return_Date Carreturndate,
Car_Class Carclass,
Hotel_Stay_Duration Hotelstayduration,
http://oracleapps88.blogspot.com/ Raju Ch

Hotel_Room_Rate Hotelroomrate,
Air_Service_Class Airserclass,
mis_industry_code amexlatefeecode
FROM
AP_CREDIT_CARD_TRXNS_ALL

8.4 Logic for this Customization in XXAPCCTransactionVO

M
public void amexTransaction(OAPageContext pageContext) O
.C
{
//Create VO and Row Objects for ExpenseReportLines
ArrayList arraylist = new ArrayList(); T
int i = businessCreditCardLinesVO.getRowCount();
O
int j=1;
P
S
Number transactionId=null;
if(i>0)
{
G
for(RowSetIterator rowsetiterator =
O
L
OIEUtil.getNoValIterator(businessCreditCardLinesVO); rowsetiterator.hasNext();)
{

.B
Date date = businessCreditCardLinesVORow.getStartExpenseDate();

8
String existProjectNumber = businessCreditCardLinesVORow.getProjectNumber();

8
String existTaskNumber = businessCreditCardLinesVORow.getTaskNumber();
String context=businessCreditCardLinesVORow.getAttributeCategory();
S
transactionId=businessCreditCardLinesVORow.getCreditCardTrxId();
P
if(xxapCCTransactionVo == null)
{
P
A
//Create VO and ROW object for CreditCardTransactionsVO

E
xxapCCTransactionVo.setWhereClause("TRX_ID ="+transactionId);
String query=xxapCCTransactionVo.getQuery();
L
xxapCCTransactionVo.executeQuery();
C XXAPCreditCardTransactionsVORowImpl xxapCCTransactionsVoRow=null;

A if((xxapCCTransactionsVoRow =

R
(XXAPCreditCardTransactionsVORowImpl)xxapCCTransactionVo.next())!=null
)
O {
Number trxId=xxapCCTransactionsVoRow.getTrxId();
String amexLatefeeType=xxapCCTransactionsVoRow.getAmexlatefeecode();
if(amexLatefeeType!=null)
{
if(amexLatefeeType.equalsIgnoreCase("DC"))
{
String error = "Line "+j+" Error: ";
http://oracleapps88.blogspot.com/ Raju Ch

OAException oaException = new OAException(error+"AMEX Late Fee


transactions need to be categorized as personal. Please personalize this credit card
transaction",OAException.ERROR);
arraylist.add(oaException);}}
else
{
try
{
throw new OAException("Amex Late fee transaction type is null ", (byte)0);}

M
catch(Exception e)
{
System.out.println("Exception :"+e.getMessage());}}} O
.C
if(arraylist.size() > 0)
{
OAException.raiseBundledOAException(arraylist);}
T
O
P
8.5 Setup S
G
Installation Steps
O
L
The following modules comprise the implementation set for the AMEX Late Fee Transactions.

.B FTP
8 Type
Deployment Files Target Location

8
XXAPCreditCardTranscatiosVO.xml ASCII /xxsai/oracle/apps/ap/oie/webui
S
XXAPCashAndOtherCO.class BIN /xxsai/oracle/apps/ap/oie/webui
P
XXAPCreditCardLinesCO.class BIN /xxsai/oracle/apps/ap/oie/webui
P
A
E
1. Install JDeveloper in your local machine and copy the final folder delivered into

L
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects and
<JDEV_INSTALL_DIR>\jdevhome\jdev\myclasses and follow below steps. (Final
C folder will be delivered along with the last OA Framework object)

A 2. Copy the final deliverable folder into $OA_JAVA folder in UNIX machine with
R appropriate directory structure “. Class” files should be moved in BIN mode and other

O
should be moved in ASCII mode.
3. Move the above files in mentioned Target Location.
4. Change the HTML call of the function OIEENTRYFLOW
(OA.jsp?page=/oracle/apps/ap/oie/entry/header/webui/GeneralInformationPG&OASF=O
IE_EXPENSE_REPORT_SEARCH) with the custom path
OA.jsp?page=/xxsai/oracle/apps/ap/oie/webui/XXAPGeneralInformationPG&OASF=OI
E_EXPENSE_REPORT_SEARCH)
http://oracleapps88.blogspot.com/ Raju Ch

5. Go to System Administrator  Application  Function  Query with the function


OIEENTRYFLOW  Click on Web HTML  Change the HTML Call with
OA.jsp?page=/xxsai/oracle/apps/ap/oie/webui/XXAPGeneralInformationPG&OASF=OI
E_EXPENSE_REPORT_SEARCH
6. Bounce the apache server.

M
O
.C
T
O
P
S
G
O
L
.B
8
8
S
P
P
A
E
L
C
A
R
O

Vous aimerez peut-être aussi