You are on page 1of 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
1.3 HOW TO ACHIEVE THIS FUNCTIONALITY USING OAF CUSTOMIZATION:
1.4 PROGRAM LOGIC:
1.5 TRAIN
1.6 HOW TO IDENTIFY THE CONTROLLERS AND VIEW OBJECTS BEHIND THAT PAGE:
1.7 STEPS TO EXTEND THE VO
1.8 STEPS TO SUBSTITUTE THE VO
1.9 STEPS TO CREATE CUSTOM CO:
1.10 PROGRAM LOGIC IN XXAPHEADERCO
1.11 SETUP
2. PROJECT AND TASK NUMBERS ARE MANDATORY
2.1 BEFORE CUSTOMIZATION
2.2 AFTER CUSTOMIZATION
2.3 HOW TO ACHIEVE THIS FUNCTIONALITY USING OAF CUSTOMIZATION:
2.5 PROGRAM LOGIC IN XXAPHEADERCO
2.6 SETUP
3. INDIRECT PROJECTS LOV
3.1 BEFORE CUSTOMIZATION
3.2 AFTER CUSTOMIZATION
3.2 HOW TO ACHIEVE THIS FUNCTIONALITY USING OAF CUSTOMIZATION:
3.4 SETUP
4. DEFAULTING PROJECT AND TASK NUMBER AT REPORT LINE LEVEL
4.1 BEFORE CUSTOMIZATION
4.2 AFTER CUSTOMIZATION
4.3 HOW TO ACHIEVE THIS FUNCTIONALITY USING OAF CUSTOMIZATION:
4.4 LOGIC TO IMPLEMENT IN XXAPCASHANDOTHERCO
4.4 SETUP
5. CAPTURE ATTENDEE INFORMATION
5.1 BEFORE CUSTOMIZATION
5.2 AFTER CUSTOMIZATION
5.3 HOW TO ACHIEVE THIS FUNCTIONALITY USING OAF CUSTOMIZATION:
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

.C

.B
8

S
P

A
E

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

BIBLIOGRAPHY

.C

What is Oracle Application Development Framework (OAF)?

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,
and Controller. The Model is where the application implements its business logic. The View is
where the application implements its user interface and the Controller is where the application
handles user interaction and directs business flow.

Model-View-Controller (MVC) Architecture

.B
8

S
P

A
E

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

.C

As a result the OA Framework provides with benefits of Productivity, Scalability, and


Customizability etc.
though the OA Framework is J2EE based, it also used various industry standards like HTML,
XML, Java, JSP, SQL and Web Services.

.B
8

S
P

A
E

The Model Data Processing

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
a multiple backend technologies accommodating business services implemented as ADF
Application Modules, custom JavaBeans, EJB's, and Web Services.

.C

VO

BC4J View Object encapsulates a database query. After a query is executed, a view
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
declarative page definition and a rich UI component set for HTML and wireless UI's,
complementing OAF support for JSP pages and JSP tag libraries like JSTL, Jakarta
Struts, OAF Data Tags, and others. The OAF JClient layer dovetails with Swing to
simplify building sophisticated rich client UI's.

AM

.B
8

S
P

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
Application Module (as per 11.5.10 - CU2). AM extensions are supported by OA
Framework and they are upgrade safe. Not supporting root AM extensions is equivalent
to not supporting AM
Extensions in many cases as most of the standard pages have only root AM, but where
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.
(Eg: Adding a dummy region to the page using personalizing and add custom AM to the
newly added region.)

A
E

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

OA Framework architecture and key features

Personalization features, including:

.C

The ability to hide and show page items and regions, reordering page items, adding new
items, adding corporate branding.

Importing and exporting personalizations with the Personalization Document Manager

New user interface for creating personalizations

Matching the Release 12 colors and fonts to match your corporate website

Using simple expression (SPEL) bindings for more control over fields, items, and regions
Extensibility features, including:

.B
8to be preserved across upgrades
Durability of extensions, allowing them
8
Use of Oracle JDeveloper 10g with OA Extension to support J2EE development and
S
integration with Release 12
P
Support for service interfaces, standalone components that can be deployed as web
P
services, EJB session beans, or as co-located Java APIs
A
E
L OA Framework Architecture
C
Client
Application Server
Data Server
A
The ability to add new business logic to existing screens

http://oracleapps88.blogspot.com/

Raju Ch

.C

MDS

We know it means Meta Data Service. We also know that it has something to do with web page
displayed in OA Framework. Lets try to understand the basics of MDS.

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
etc] are stored in a dictionary, in the database. These units when combined together, they become
a webpage that gets rendered on the browser.

.B
8
Data: - Those Meta pieces are not stored
as binary files, but as data in tables. Those tables begin
8
with jdr, for example JDR_ATTRIBUTES,
JDR_ATTRIBUTES_TRANS,
S
JDR_COMPONENTS and JDR_PATHS. The definition and relationship of each
Pin these JDR tables. OA framework reads that data when you
field/region/component is stored
request a page. The page P
structure is then built based on MetaData.
A
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
clubbed into a meaningful manner to make a web page. You can say that MDS provides service
C& return page definitions. MDS collates those definitions in components/fields in a
to store
meaningful manner to build a page.
A

R These two below methods are available in the Default Controller class that gets created.

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.

processRequest (pageContext, webBean)


In this method, usually page rendering related code is written. Effectively, each GUI
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.

.C

D2K Form Comparison with OA Frame Work Pages

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


JDeveloper\jdevdoc\index.htm]
Step 1.

.B
8

S
P

Created a new Workspace and a new Project as dictated by Oracle's tutorial


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

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

A
E

Step 2
Next, you will create an OAPage within hello project.
Think of OAPage as the fmx file itself in D2K. I am saying so because this page gets attached to
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, its 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.
Add a button to one of the nested regions.
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
controller java code to handle events like Form Submit button clicks. JDeveloper generates the
default code for you. Primarily two functions will be created processRequest[for UI Rendering
Handling] and processFormRequest.
Think of processRequest as WHEN-NEW-FORM-INSTANCE, though processRequest is very
restrictive.

.C

Step 5.
In the controller to access the value in field "HelloName" the command is
String userContent = pageContext.getParameter ("HelloName");
In D2k, we used :block.field. In OAFramework, at submission of page, all the field values get
passed into to OAPageContext object.
a. Use getParameter to access the field value
b. To set the value of the field, use
OAMessageTextInputBean fieldHelloName =
(OAMessageTextInputBean) webBean.findChildRecursive ("HelloName");
fieldHelloName.setText(pageContext,"Setting the default value" );
Note when setting field value in controller:
Note 1. Do not set the value in processFormRequest
Note 2. If the field comes from ViewObject [in latter tutorials], then do not use setText in
controller.
Note 3. For control fields [that are not based on ViewObjects], you can use setText to assign
values in processRequest method.

.B
8

S
P

A
E

Lets 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 midtier.
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/../..
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
Mandatory. Oracle might just have developed their tutorials without including these. Think of
these like Visual Attributes of D2K forms [to an extent]

.C

5. Controller is where you will write any java code in OA Framework. You can create a
Controller per Page or have a different Controller for each of the Regions with the same Page.

6. In the method processFormRequest of the Controller, you can access the values of the page by
using notation pageContext.getParameter ("<fieldname here>"). This method
processFormRequest is executed when the OAF Screen/Page is submitted by click of a button.

7. Inside the controller, all the Database Related interactions for example interaction with View
Objects happens via Application Module. But why so?

.B
Because Application Module manages the transaction
8 state of the Application.
8
OAApplicationModuleImpl oaapplicationmoduleimpl
= (OAApplicationModuleImpl)
S
oapagecontext.getApplicationModule (oawebbean);
P
OADBTransaction oadbtransaction =
P
(OADBTransaction)oaapplicationmoduleimpl.getDBTransaction();
A
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
control field. Hence in HelloWorld example, field HelloName is a control field [in D2K
C A viewObject can either be based on a view/table.synonym or on a SQL statement.
terminology].
A

I wish to access the fields in multi record block that is based on view Object. Can I do this in
R 9.Controller?

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?

.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).
WHEN-VALIDATE-ITEM in D2K
Ideally does not set a item value, simply it
validates

Can fire immediately after navigating out


of the field(assuming it was changed)
Restricted trigger, but can indirectly
influence navigation by setting enable off,
or by setting navigation property of other
items.

setItemAttribute() in Entity Object


Sets the value of field that corresponds to
the column. But we can also add field level
validations in this method.
Unless we implement PPR (Partial Page
Rendering) around that field, this will fire
at page level by default.
No relationship to User Interface, as
controller manages the User Interface.

.B
8

S
P

OA Framework Extension Tip: - If you wish to implement additional validation for an existing
OA Framework screen, then you will extend the method setItemAttribute of Entity Object.

A
E

WHEN-CREATE-RECORD in
D2K
As soon as a new record is created,
values can be defaulted to fields via
this trigger.

create() in Entity Object


Defaults values for the fields
super.create(attributelist);
SetPOHeaderId (getOADBTransaction ().
getSequenceValue("XXPO_HEADER_ID_S"));

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


Framework screen, then you will override extend the method create () of Entity Object.
WHEN-VALIDATE-RECORD in
D2K
Used to cross validating values in
multiple fields for a record. This trigger
fires as soon as you navigate out of a
record [if any of its fields have been

validateEntity() in Entity Object


Ditto in OA Framework. For example if you
wish to ensure that every CLERK must have a
supervisorId attached, then write similar to
below

http://oracleapps88.blogspot.com/

changed].

Raju Ch

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().
PRE-COMMIT in D2K
Fires before Form issues a commit

postChanges() in Entity Object


This isn't exactly similar to the listed D2K
counterpart, but comes close to it. Here you
can assign values to Entity Attribute at the
very last moment, prior to changes are
posted.
public void postChanges(TransactionEvent
transactionevent)
{
Number docSeqNum =
calculateDocSeqNum();
populateAttribute(1, docSeqNum);
super.postChanges(transactionevent);
}

.C

.B
8

S
P

Lets touch base on some other similarities & dis-similarities between D2K and Entity
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
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
Objects, you can iterate through the rows in the Entity cache.
You can get a handle to iterator using which you can programmatically scroll through the records
in that buffer. Framework maintains a cache for records being inserted/modified into EO via VO.

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:

Operating Systems: Windows NT or Windows 2000 or Windows XP.


Preferred Web Browser: Internet Explorer 5.0 or later
CPU Type and Speed: Pentium IV 1 GHz or greater
Memory: 512 MB RAM
Display: 65536 colors, set to at least 1024 X 768 resolution
Disk Space: 570 MB

.C

2. Download the OA Patch (4045639) from the metalink.

3. Unzip the accompanying zip file to a directory of your choice on your Client machine,
which creates the following directory structure Under your <jdev_install_dir>:
jdevbin\
jdevdoc\
jdevhome\

.B
8
4. Creating a Desktop Shortcut to JDeveloper
8
S create a desktop shortcut to
To facilitate launching JDeveloper,
P
jdevbin\jdev\bin\jdevw.exe.
P
5. ConfiguringA
the JDEV_USER_HOME Environment Variable
E
Configure the JDEV_USER_HOME environment variable using Windows XP or
L
CWindows 2000:
Go to your desktop and select My Computer, right-click and select Properties.
A

On the System Properties dialog, select the advanced tab.


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

.C

Creating the OA Project:


Click on Workspace Select New OA Workspace

.B
8

S
P

A
E

http://oracleapps88.blogspot.com/

Raju Ch

.C

.B
8

S
P

A
E

R Workspace Name

Check the Add New OA Project

After you click OK, you will see the Oracle Applications Project Wizard.

http://oracleapps88.blogspot.com/

Raju Ch

.C

.B
8

S
P

A
E

http://oracleapps88.blogspot.com/

Raju Ch

.C

.B
8

S
P

A
E

http://oracleapps88.blogspot.com/

Raju Ch

.C

Click on Finish

.B
8

S
P

Set System Profile Values


To Analyzing the Page Objects we need to enable the profile options.

A
E

Like About this Page link to get lots of information


Diagnostics mode must be enabled
Get page name and location
Version numbers
BC4J object names

A
Sign on to Oracle Applications as the System Administrator responsibility.

System Profile Option


FND: Diagnostics

Description
This profile enables about this page link
at the end of the page.

Required
YES

dDefault Value
None

Personalize SelfService Defn

On enabling this profile option, every


OAFramework page will contain a
global Personalize button. This profile
enables personalization link and enables

YES

None

http://oracleapps88.blogspot.com/

Disable Self-service
Personal

Raju Ch

user to personalize page.


This is a system profile option
specifically created for use by Oracle
Support.

NO

None

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

.C

iExpenses Objects:

1. Adding the additional field (Description) on General Information Page:

As per the iExpenses standard functionality during expense report entry when employee
selects the expense report template in the expense template field the LOV shows only the
expense report template name. It does not show the description for the same. Also there is
no other field where the expense report template description gets displayed based on the
expense report template selected.

.B
8

8
1. OA Framework guidelines suggest
S to Extend BC4J objects to extend business logic so
that changes are upgrade safe. Solution design considers extending only BC4J objects
P
where ever possible.
P
2. iExpenses pages are created with Allow Indexed children property set to false and
Acant be added using personalization. This necessitates copying the
hence new items
standardE
page and creating a custom page so that changes are not overridden by upgrades.
L
3. Fields on iExpenses pages are added programmatically using Controller. This
Cnecessitates extending Controller and incorporating item creation inside extended
A controller to achieve requirement.
Design Considerations

4. Extended controller makes a call to super class method thus business logic changes made
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

.C

We need to add the additional field (Description) here

1.2 After Customization

.B
8

S
P

A
E

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.

.C

.B
8

S
P

A
E
The whole
L process follows the following sequence:
C Create a Custom BC4J Package (xxsai.oracle.apps.ap.oie.server).

1.4 Program Logic:

Create new Custom View Object XXAPExpenseTemplatesVO in custom BC4J


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
layout Bean by using the controller XXAPHeaderCO.
Create a new Region XXAPEntryTrainRN.xml style as train on the package
xxsai.oracle.apps.ap.oie.webui.

C
.
Copy the contents of existing EntryTrainRN.xml into XXAPEntryTrainRN.xml.
T
O
The BC4J framework updates the project's .jpx file (each project .jpr has a
P that
corresponding .jpx file of the same name). The .jpx is an XML document
S
includes a "Substitutes" section.
G
The substitutions specified in the .jpx definition file will need to be deployed to the
MDS repository on the database of your target 11iO
Zip the directory
L instance.
structure (xxsai\oracle\apps\ap\oie\server) generated
for the new extended objects and
upload into the server at $OA_JAVA and
unzip it.
B
.
Run the jpx import utility to import
8substitutions specified in the .jpx definition file to
the MDS repository using<JDEV_INSALL_DIR>\jdevbin\jdev\bin>jpximport
8
C:\iExpenses.jpx -username apps -password apps -dbconnection "(DESCRIPTION=
S
(ADDRESS=
P
(PROTOCOL=tcp)(HOST=<HOST_NAME>)(PORT=<PORT_NUMBER>))(CON
NECT_DATA=(SID=<SID_NAME>)))"
P
A
For above
example I have placed the .jpx file into C:\ directory in my local
Machine.
E
L
options Personalize Self-service Defn (FND_CUSTOM_OA_DEFINTION)
C Profile
and FND: Personalization Region Link Enabled

(FND_PERSONALIZATION_REGION_LINK_ENABLED) should be set to Yes.


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

.C

B
.
All the pages in the train should be copied
8 to custom pages for proper navigation between
pages and the Destination URL links of the pages in the train should be replaced with the
8
custom path if we are customizing any single page in the train.we are customizing
S Description field. The following pages should be
GeneralinformationPG for adding
P
customized:
P
GeneralInformationPG
CreditCardTrxnsPG
A
CreditCardLinesPG
E
CashAndOtherLinesPG
L
CExpenseAllocationsPG
FinalReviewPG

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

.C

.B
8

S
P

A
E

Enter the Page Name

Give the package name where the page will


Stored

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.

.C

Add indexed child property is


.B
false
8 the standard Controllers (CO) and extending
This requirement can be achieved by customizing
8
the Corresponding View Object (VO).
How to identify the COs and VOs of the
S
XXAPGeneralInformationPG is discussed below:
P
P
1.6 How to identify the Controllers
and View Objects behind that page:
Every page containsA
one Option like About this Page, click on this option to view controllers,
entity objects, view objects & Application Module associated to the current page
E
L
CSteps for Enable the About this Page link
Enable the FND: Diagnostics profile option from the System Administrator
A
Responsibility.
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

.C

.B
8

Click on About this page link

S
P

A
E

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.

.C

.B
8

Copy the query

SELECT
ApExpenseReportsEO.EXPENSE_REPORT_ID,
ApExpenseReportsEO.REPORT_TYPE,
FROM
AP_EXPENSE_REPORTS ApExpenseReportsEO
WHERE
WEB_ENABLED_FLAG = 'Y'
AND trunc (sysdate) <= trunc (nvl (inactive_date, sysdate))

S
P

A
E

http://oracleapps88.blogspot.com/

Raju Ch

.C

.B
8

S
P

A
E

http://oracleapps88.blogspot.com/

Raju Ch

.C

.B
8

S
P

A
E

http://oracleapps88.blogspot.com/

Raju Ch

.C

.B
8

S
P

A
E

http://oracleapps88.blogspot.com/

Raju Ch

.C

.B
8

S
P

A
E

http://oracleapps88.blogspot.com/

Raju Ch

.C

Paste the Query at Query Statement


SELECT
ApExpenseReportsEO.EXPENSE_REPORT_ID,
ApExpenseReportsEO.REPORT_TYPE,
ApExpenseReportsEO.DESCRITPTION
FROM
AP_EXPENSE_REPORTS ApExpenseReportsEO
WHERE
WEB_ENABLED_FLAG = 'Y'
AND trunc (sysdate) <= trunc (nvl (inactive_date, sysdate))

.B
8

S
P

A
E

http://oracleapps88.blogspot.com/

Raju Ch

.C

Added the additional description column in the query

.B
8region OIEGeneralInformation of the page
Create a new message Styled Text Item on the
8
XXAPGeneralInformationPG for adding the Expense Report Template Description.
S
1.8 Steps to substitute the VO
P
P
A
E
L
C
A
Note: For extensions of VOs we have to add the columns at the end of the query.

http://oracleapps88.blogspot.com/

Raju Ch

.C

.B
8

S
P

A
E

Select the Standard VO from the Available list and Extended VO from the Substitute list.

http://oracleapps88.blogspot.com/

Raju Ch

.C

Click on Add button.

.B
8

S
P

A
E

Steps to Create New Item on OIEGeneralInformation Region:

http://oracleapps88.blogspot.com/

Raju Ch

.C

.B
8

S
P

A
E

1.9 Steps to Create Custom CO:


1. Select OIEGeneralInformation region under XXAPGenerationInformationPG.xml.

http://oracleapps88.blogspot.com/

Raju Ch

.C

.B
8

S
P

A
E

2. Set New Controller for OIEGeneralInformation


Right Click on OIEGeneralInformation

http://oracleapps88.blogspot.com/

Raju Ch

.C

Enter Package Name and Class name.


Note: Controller class must be in the webui folder.
For example xxsai.oracle.apps.ap.oie.webui.

.B
8

S
P

A
E

Now new Controller is created for OIEGenerationInformation.

http://oracleapps88.blogspot.com/

Raju Ch

.C

1.10 Program Logic in XXAPHeaderCO


If (uiNode instance of OAStackLayoutBean)
{

.B
8

OAStackLayoutBean stackLayout = (OAStackLayoutBean) uiNode;


OATableLayoutBean tabLayOut = (OATableLayoutBean) stackLayout.getIndexedChild

(0);

S
P = (OACellFormatBean) rowLayOut.getIndexedChild
OACellFormatBean cellFormBean
(0);
PtableBean1 = (OATableLayoutBean)
OATableLayoutBean
A
cellFormBean.getIndexedChild (0);
E
OAMessageStyledTextBean descBean = (OAMessageStyledTextBean) createWebBean
L
(pageContext, webBean, "ExpTempDescription");
CString eventType = pageContext.getParameter ("event");
viewobject1 = pageContext.getApplicationModule
A ViewObject
(webBean).findViewObject ("XXAPExpenseTemplatesVO");
OARowLayoutBean rowLayOut = (OARowLayoutBean) tabLayOut.getIndexedChild

(0);

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 ();
Do
{
If ((row = viewobject1.next ()) == null)
{
Break;
}
Number expenseTemplateReportId = (Number) row.getAttribute
("ExpenseReportId");
If (expenseTemplateReportId.equals (expensReportId))
{

.C

}
} while (true);

.B
8

1.11 Setup

S
P

Installation Steps

descBean.setText (expenseTemplateReportDes);

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

A
E

Deployment Files

LXXAPOIEMAINPAGE.xml

XXAPGeneralInformationPG.xml
XXAPEntryPageIndexRN.xml
XXAPEntryTrainRN.xml
XXAPCreditCardTrxnsPG.xml
XXAPCreditCardLinesPG.xml
XXAPCashAndOtherLinesPG.xml
XXAPItemizationDetailsPG.xml
XXAPExpenseAllocationsPG.xml
XXAPExpenseAllocationDetailPG.xml
XXAPExpenseDetailsPG.xml
XXAPConfirmationPG.xml

FTP
Type
ASCII
ASCII
ASCII
ASCII
ASCII
ASCII
ASCII
ASCII
ASCII
ASCII
ASCII
ASCII

Target Location
/xxsai/oracle/apps/ap/oie/webui
/xxsai/oracle/apps/ap/oie/webui
/xxsai/oracle/apps/ap/oie/webui
/xxsai/oracle/apps/ap/oie/webui
/xxsai/oracle/apps/ap/oie/webui
/xxsai/oracle/apps/ap/oie/webui
/xxsai/oracle/apps/ap/oie/webui
/xxsai/oracle/apps/ap/oie/webui
/xxsai/oracle/apps/ap/oie/webui
/xxsai/oracle/apps/ap/oie/webui
/xxsai/oracle/apps/ap/oie/webui
/xxsai/oracle/apps/ap/oie/webui

http://oracleapps88.blogspot.com/

Deployment Files

Raju Ch

XXAPReadOnlyDetailsPG.xml
XXAPFinalReviewPG.xml
XXAPHeaderCO.class
XXAPExpenseTemplatesVO.xml
XXAPExpenseTemplatesVOImpl.class

FTP
Type
ASCII
ASCII
BIN
ASCII
BIN

Target Location
/xxsai/oracle/apps/ap/oie/webui
/xxsai/oracle/apps/ap/oie/webui
/xxsai/oracle/apps/ap/oie/webui
/xxsai/oracle/apps/ap/oie/server
/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
<JDEV_INSTALL_DIR>\jdevhome\jdev\myclasses and follow below steps. (Final
folder will be delivered along with the last OA Framework object)

3. Move the above files in mentioned Target Location.

4. Import the custom pages into the data base

<JDEV_INSTALL_DIR>\jdevbin\jdev\bin:\>import
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects\xxsai\oracle\apps\ap\oie\we
bui\ XXAPOIEMAINPAGE.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

.B
8

S
P

<JDEV_INSTALL_DIR>\jdevbin\jdev\bin:\>import
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects\xxsai\oracle\apps\ap\oie\we
bui\ XXAPGeneralInformationPG.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

A
E

.C

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 .XML
files should be moved in ASCII mode.

<JDEV_INSTALL_DIR>\jdevbin\jdev\bin:\>import
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects\xxsai\oracle\apps\ap\oie\we
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
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

.C

<JDEV_INSTALL_DIR>\jdevbin\jdev\bin:\>import
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects\xxsai\oracle\apps\ap\oie\we
bui\ XXAPCreditCardLinesPG.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

.B
8

<JDEV_INSTALL_DIR>\jdevbin\jdev\bin:\>import
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects\xxsai\oracle\apps\ap\oie\we
bui\ XXAPCashAndOtherLinesPG.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

S
P

L bui\ XXAPItemizationDetailsPG.xml -rootdir

A
<JDEV_INSTALL_DIR>\jdevbin\jdev\bin:\>import
E
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects\xxsai\oracle\apps\ap\oie\we

<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\ 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
<JDEV_INSTALL_DIR>\jdevbin\jdev\bin:\>import
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects\xxsai\oracle\apps\ap\oie\we
bui\ XXAPExpenseDetailsPG.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

.C

<JDEV_INSTALL_DIR>\jdevbin\jdev\bin:\>import
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects\xxsai\oracle\apps\ap\oie\we
bui\ XXAPConfirmationPG.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

.B
8

S
P

<JDEV_INSTALL_DIR>\jdevbin\jdev\bin:\>import
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects\xxsai\oracle\apps\ap\oie\we
bui\ XXAPReadOnlyDetailsPG.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

A
E

<JDEV_INSTALL_DIR>\jdevbin\jdev\bin:\>import
<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>)))"
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
OA.jsp?page=/xxsai/oracle/apps/ap/oie/webui/XXAPGeneralInformationPG&OASF=OI
E_EXPENSE_REPORT_SEARCH)

.C

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

8. Bounce the apache server.

.B
8
2. Project and Task Numbers are Mandatory
8
For project-related expense
the project number and task numbers have to be
Sreport
mandatory at Header and
line
level
by
the selected business purpose.
P
P
Basic Business Needs
Aexpense reports business has to mandatory enter the Project Number and
While creating
E at Header and line level for specific pre-defined purposes. Thus the
Task Number
Expense
Report header and lines webpage should be customized in such a way that when
L
the
user
selects
the specific purpose, the Project Number and Task number DFF at header
Clevel and Project/Task
Number fields at line level should be made mandatory.
A

Process flow

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
3. The Business Purpose DFF is a Mandatory field when the User selects the
Expense Report template but the project number and task number DFFs are not
mandatory fields at the header at the first instance.

.C

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.

2.1 Before Customization

.B
8

S
P

A
E

http://oracleapps88.blogspot.com/

Raju Ch

.C

2.2 After Customization

.B
8

S
P

A
E

http://oracleapps88.blogspot.com/

Raju Ch

.C

Overview
This Requirement the mandatory Project and Task Number for Specific Business
Purposes on the General Information Page. A brief summary of the strategy appears
below:

.B
8

S
P customizations needs to be done for below objects
To achieve the requirement
P CreditCardLinesCO, CashAndOtherCO, and
1. HeaderCO,
CashAndOtherListCO
A
2. PurposeLookupVO
E
L 3. CreditCardLinesPG and CashAndOtherLinesPG
CNote: Identification of the COs, VOs and Page and Creation of CO, VO and PG was

2.3 How to achieve this Functionality using OAF Customization:

already discussed in the previous requirement. (Refer 1.7, 1.9)

R Program Logic

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
CreditCardLinesCO. Package Name for this CO is xxsai.oracle.apps.ap.oie.webui.

Create a new custom Page XXAPCashAndOtherLinesPG.xml in package


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

.C

Set new Controller Object XXAPCashAndOtherCO for OIECashAndOther region of


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

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.

O
L
The substitutions specified in the .jpx definition
file will need to be deployed to the MDS
.B
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
8
the server at $OA_JAVA and unzip
8it.
S
Run the jpx import utility to import substitutions specified in the .jpx definition file to the
P
MDS repository using<JDEV_INSALL_DIR>\jdevbin\jdev\bin>jpximport
C:\iExpenses.jpx P
-username apps -password apps -dbconnection "(DESCRIPTION=
(ADDRESS=
A
(PROTOCOL=tcp)(HOST=<HOST_NAME>)(PORT=<PORT_NUMBER))(CONNECT
E
_DATA=(SID=<SID_NAME>)))"
L
C
options Personalize Self-service Defn (FND_CUSTOM_OA_DEFINTION) and
A Profile
FND: Personalization Region Link Enabled

(FND_PERSONALIZATION_REGION_LINK_ENABLED) should be set to Yes.

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
Field

Value

Notes

Name
Package

XXAPPurposeLookupVO
xxsai.oracle.apps.ap.oie.server

Query for the XXAPPurposeLookupVO is


SELECT FLT.LOOKUP_TYPE,
FLV.MEANING,
FLT.MEANING LOOKUP,
FLV.DESCRIPTION,
APR.EXPENSE_REPORT_ID
FROM
FND_LOOKUP_VALUES FLV,
FND_LOOKUP_TYPES_TL FLT,
AP_EXPENSE_REPORTS_ALL APR
WHERE
FLV.LOOKUP_TYPE=FLT.LOOKUP_TYPE
AND LT.MEANING=APR.REPORT_TYPE
AND LT.LANGUAGE='US'
AND FLV.LANGUAGE='US'

.C

.B
8

Lookup Definitions:

S
P

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

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

R Application
Description

Code
RELOCATION-HOME
PURCHASE
RELOCATION-HOME SALE
RELOCATION-HOUSEHOLD

East Oracle Internet Expenses


Relocation ER Template
Values
Meaning
Relocation-Home Purchase

Description
Optional

Relocation-Home Sale
Relocation-Household Moving Expenses

Optional
Optional

http://oracleapps88.blogspot.com/

RELOCATIONHOUSEHUNTING
RELOCATION-IN-TRANSIT
RELOCATION-INTERIM
LIVING
RELOCATIONRENTAL/LEASE
RELOCATION-SETTLINGIN/MISC

Raju Ch

Relocation-Househunting

Optional

Relocation-In-Transit (Final Trip)


Relocation-Interim Living

Optional
Optional

Relocation-Rental/Lease Expenses

Optional

Relocation-Settling-in/Misc Expenses

Optional

.C

.B
8

Type
Meaning
Application
Description

Code
CUSTOMER VISITS
DEALER VISITS
EMPLOYEE RECOGNITION
EVENTS
FIELD CALLS
INTERVIEW EXPENSES
MEDIA RELATIONS
MEETING
NATIONALSALES
CONFERENCE
OFFICE EXPENSES

A
E

S
P

Lookups
SEOIE_REGULAR-_ER_TEMPLATE
Regular ER Template
East Oracle Internet Expenses
Regular ER Template
Values
Meaning
Description
Customer Visits
Optional
Dealer Visits
Optional
Employee Recognition
Optional
Events
Mandatory
Field Calls
Optional
Interview Expenses
Optional
Media Relations
Optional
Meeting
Optional
National Sales Conference
Mandatory
Office Expenses

Optional

http://oracleapps88.blogspot.com/

OPEN HOUSE
OTHER
OTHER CONVENTIONS
OUTLETPHYSICAL
INVENTORY
OUTLET VISITATION
PUBLIC RELATIONS
RECRUITING
SALES CALLS
TECHNICAL SUPPORT
TELEPHONE - HOME OFFICE
TELEPHONE - MOBILE
TRADE SHOW
TRAINING
VARIOUS

Raju Ch

Open House
Other
Other Conventions
Outlet Physical Inventory

Mandatory
Optional
Mandatory
Optional

Outlet Visitation
Public Relations
Recruiting
Sales Calls
Technical Support
Telephone - Home Office
Telephone - Mobile
Trade Show
Training
Various

Optional
Optional
Optional
Optional
Optional
Optional
Optional
Mandatory
Optional
Optional

.B
8

S
P

A
E

.C

http://oracleapps88.blogspot.com/

Raju Ch

.C

.B
8

S
P

A
E

2.5 Program logic in XXAPHeaderCO


The same logic has to be incorporated in the following COs 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
If (xxapPurposeLookupVo == null) {
XxapPurposeLookupVo = (XXAPPurposeLookupVOImpl) am1.createViewObject
("XXAPPurposeLookupVO", "xxsai.oracle.apps.ap.oie.server.XXAPPurposeLookupVO") ;}}
If (purpose! = null && xxapPurposeLookupVo! = null) {
xxapPurposeLookupVo.setWhereClause ("MEANING='" + purpose + "'" + AND
EXPENSE_REPORT_ID=" + expensReportId);
String query = xxapPurposeLookupVo.getQuery ();
xxapPurposeLookupVo.executeQuery ();
Row xxapPurposeLookupVORow = null;
If ((xxapPurposeLookupVORow = xxapPurposeLookupVo.next()) != null){
String description = (String) xxapPurposeLookupVORow.getAttribute("Description");
if("Mandatory".equalsIgnoreCase(description)){
If (projectNumber == null || projectNumber! = null && projectNumber.equals ("") {
throw new OAException (message, (byte) 0);
}
If (taskNumber == null || taskNumber! = null && taskNumber.equals (""))
{
String message = "Task Number is required for the purpose + purpose;
Throw new OAException (message, (byte) 0);

.C

.B
8

S
P

A
E

}} }

2.6 Setup

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

R mandatory for Specific Business Purposes Process.

Deployment Files
XXAPCreditCardLinesPG.xml
XXAPCreditCardLinesCO.class
XXAPCashAndOtherLinesPG.xml
XXAPCashAndOtherCO.class

FTP
Type
ASCII
BIN
ASCII
BIN

Target Location
/xxsai/oracle/apps/ap/oie/webui
/ xxsai /oracle/apps/ap/oie/server
/ xxsai /oracle/apps/ap/oie/webui
/ xxsai /oracle/apps/ap/oie/server

http://oracleapps88.blogspot.com/

Raju Ch

Deployment Files

FTP
Type
XXAPExpenseReportHeaderEO.class
BIN
XXAPPurposeLookupVO.xml
ASCII
XXAPPurposeLookupVOImpl.class
BIN
XXAPPurposeLookupVORowImpl.class BIN

Target Location
/ xxsai /oracle/apps/ap/oie/server
/ xxsai /oracle/apps/ap/oie/webui
/ xxsai /oracle/apps/ap/oie/server
/ 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
<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
appropriate directory structure . Class files should be moved in BIN mode and
other should be moved in ASCII mode.

.C

3. Move the above files in mentioned Target Location.

4. Import the .xml file into the data base

<JDEV_INSTALL_DIR>\jdevbin\jdev\bin:\>import
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects\xxsai\oracle\apps\ap
\oie\webui\ XXAPCreditCardLinesPG.xml -rootdir
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects -username apps password apps -dbconnection "(DESCRIPTION= (ADDRESS=
(PROTOCOL=tcp)(HOST=<HOST_NAME>)(PORT=<PORT_NUMBE
R))(CONNECT_DATA=(SID=<SID_NAME>)))"

.B
8
<JDEV_INSTALL_DIR>\jdevbin\jdev\bin:\>import
8
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects\xxsai\oracle\apps\ap
\oie\webui\ XXAPCashAndOtherLinesPG.xml
-rootdir
S
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects
-username apps P
password apps -dbconnection "(DESCRIPTION= (ADDRESS=
P
(PROTOCOL=tcp)(HOST=<HOST_NAME>)(PORT=<PORT_NUMBE
AR))(CONNECT_DATA=(SID=<SID_NAME>)))"
E <JDEV_INSTALL_DIR>\jdevbin\jdev\bin:\>import

<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects\xxsai\oracle\apps\ap
\oie\webui\ XXAPPurposeLookupVO.xml -rootdir
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects -username apps password apps -dbconnection "(DESCRIPTION= (ADDRESS=
(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
OA.jsp?page=/xxsai/oracle/apps/ap/oie/webui/XXAPGeneralInformationPG&OA
SF=OIE_EXPENSE_REPORT_SEARCH

.C

9. Bounce the apache server.

3. Indirect Projects LOV


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.

.B
8

Basic Business Needs


For all project related expenses the List of Values at the Expense Report line level will
contain both CAPITAL and INDIRECT projects. But the requirement is customize the
List of Values to list only INDIRECT Projects at the Expense Report line level.

A
E

Process flow

S
P

Employee enters an expense report


using a template.

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.

.C

.B
8

3.1 Before Customization

S
P

A
E

http://oracleapps88.blogspot.com/

Raju Ch

.C

Capital Project (20985)

.B
8

S
P

A
E

Only Indirect Projects are displayed.


Overview

3.2 After Customization

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:

.C

.B
8

S
P

A
E

Click on Project Number LoV

http://oracleapps88.blogspot.com/

Raju Ch

.C

.B
8

S
P

A
E

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
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
T
MDS repository using<JDEV_INSALL_DIR>\jdevbin\jdev\bin>jpximport
O
C:\iExpenses.jpx -username apps -password apps -dbconnection "(DESCRIPTION=
P
(ADDRESS=
(PROTOCOL=tcp)(HOST=<HOST_NAME>)(PORT=<PORT_NUMBER>))(CONNEC
S
T_DATA=(SID=<SID_NAME>)))"
G
Profile options Personalize Self-service Defn (FND_CUSTOM_OA_DEFINTION)
O
andFND: PersonalizationRegionLinkEnabled
L
(FND_PERSONALIZATION_REGION_LINK_ENABLED) should be set to Yes.
.B
Bounce the apache server.
Disable the profile options related to 8
8 Personalization.
S
3.3 Steps to extend the VO
P
PJdeveloper.
Open the Standard VO from
A
E
L
C
A
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)

http://oracleapps88.blogspot.com/

Raju Ch

.C

.B
8

Copy the query

SELECT
P.PROJECT_NUMBER
PROJECT_NUMBER,
P.PROJECT_NAME
PROJECT_NAME,
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

S
P

A
E

http://oracleapps88.blogspot.com/

Raju Ch

.C

.B
8

S
P

A
E

http://oracleapps88.blogspot.com/

Raju Ch

.C

.B
8

S
P

A
E

http://oracleapps88.blogspot.com/

Raju Ch

.C

.B
8

S
P

A
E

Paste the Query at Query Statement


SELECT
P.PROJECT_NUMBER
P.PROJECT_NAME

PROJECT_NUMBER,
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
PA_PROJECTS_EXPEND_V P,
HR_ORGANIZATION_UNITS O

FROM
WHERE

P.CARRYING_OUT_ORGANIZATION_ID = O.ORGANIZATION_ID
P.PROJECT_TYPE_CLASS_CODE='INDIRECT'

AND

.C

.B
8

S
P

A
E

As per the requirement the LOV should display only INDIRECT Projects

http://oracleapps88.blogspot.com/

Raju Ch

.C

For the substitution of VO (Refer 1.8)

O
L
1. Extended VO (XXAPProjectsLovVO)
B
.
Process Field
Value
Notes
8
8
Name
XXAPProjectsLovVO
Package S xxsai.oracle.apps.ap.oie.server
Extends
View ProjectsLovVO
P
Object
P
A
E
Substitution: Right-click on the project, select Edit Business Components
L2.Project
and select Substitutions section. Select base object and extended object

OA Framework Objects

and then choose ADD to create new Substitution rule.


Process Field

Value

Available
Substitution

ProjectsLovVO
XXAPProjectsLovVO

Notes

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
XXAPProjectsLovVO.xml
XXAPProjectsLovVOImpl.class

FTP
Type
ASCII
BIN

Target Location
/xxsai/oracle/apps/ap/oie/server
/xxsai/oracle/apps/ap/oie/webui

1. Install JDeveloper in your local machine and copy the final folder delivered into
<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)

.C

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.

O
L
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
.B
C:\iExpenses.jpx -username apps -password
8 apps -dbconnection "(DESCRIPTION=
(ADDRESS=
8
(PROTOCOL=tcp)(HOST=<HOST_NAME>)(PORT=<PORT_NUMBER>))(CONNEC
T_DATA=(SID=<SID_NAME>)))"
S
5. Change the HTML callP
of the function OIEENTRYFLOW
(OA.jsp?page=/oracle/apps/ap/oie/entry/header/webui/GeneralInformationPG&OASF=O
P
IE_EXPENSE_REPORT_SEARCH)
with the custom path
A
OA.jsp?page=/xxsai/oracle/apps/ap/oie/webui/XXAPGeneralInformationPG&OASF=OI
E
E_EXPENSE_REPORT_SEARCH)
L
to System Administrator Application Function Query with the function
CGo
OIEENTRYFLOW Click on Web HTML Change the HTML Call with
A OA.jsp?page=/xxsai/oracle/apps/ap/oie/webui/XXAPGeneralInformationPG&OASF=
3. Move the above files in mentioned Target Location.

OIE_EXPENSE_REPORT_SEARCH

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
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
defaulted to the respective fields at the expense report line level. The user should be able
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
Number. Thus the Expense Report Header level page should be customized in such a way
that when the user clicks the next button to enter the expense report lines the project
number and task number fields in the expense report lines page should be populated with
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.

.C

.B
8 an expense report
Employee enters
8the project number and
and enters
taskS
number at the header level
P

Process flow

A
E

When the user enters the next page to enter


the expense report lines the project number
and task number in the expense report lines
page should be populated with the values
entered in the previous page.

http://oracleapps88.blogspot.com/

Raju Ch

4.1 Before Customization

.C

.B
8

S
P

A
E

http://oracleapps88.blogspot.com/

Raju Ch

.C

4.2 After Customization

.B
8

S
P

A
E

http://oracleapps88.blogspot.com/

Raju Ch

.C

Project and Task Numbers are defaulted from the Header Information

Task Number should be Mandatory for the Business Purpose Events at Header level.

.B
8

S
P

A
E

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
XXAPCreditCardLinesPG.xml by extending the existing Controller Object
CreditCardLinesCO. Package Name for this CO is xxsai.oracle.apps.ap.oie.webui.

Set new Controller Object XXAPCashAndOtherCO for OIECashAndOther region of


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

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.

.B
8

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.

S
Pto import substitutions specified in the .jpx definition file to the
Run the jpx import utility
P
MDS repository using<JDEV_INSALL_DIR>\jdevbin\jdev\bin>jpximport
C:\iExpenses.jpx
A -username apps -password apps -dbconnection "(DESCRIPTION=
(ADDRESS=
E
(PROTOCOL=tcp)(HOST=<HOST_NAME>)(PORT=<PORT_NUMBER>))(CONNEC
L
CT_DATA=(SID=<SID_NAME>)))"
options Personalize Self-service Defn (FND_CUSTOM_OA_DEFINTION) and
A Profile
FND: Personalization Region Link Enabled

(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):

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

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.

.C

.B
8
1. Select Date (Here we are8
creating PPR on date only) field in Structure panel and
give the Event in Property panel.
S
P
P
A
E
L

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)


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

.C

.B
8

S
P

A
E

Public void processFormRequest (OAPageContext pageContext, OAWebBean webBean)


{
String eventType = pageContext.getParameter (OAWebBeanConstants.EVENT_PARAM);
If (eventType! =null && eventType.equals ("goto"))
{
int i = Integer.parseInt (pageContext.getParameter("value"));
int j = NavigationUtility.getCurrentPageIndex (pageContext);
if(j<i)
{
ValidateProjectTask (pageContext);
}
}
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.
{
defaultForReceipt(pageContext,1);
}
if("OIE_DATE_CHANGE_PERDIEM".equals(eventType))
{
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;
if(i>0)
{
try
{
if (am1 instanceof ExpensesAMImpl)
{
ExpensesAMImpl expenseAM = (ExpensesAMImpl)am1;
ExpenseReportHeadersVOImpl headerVO =
(ExpenseReportHeadersVOImpl)expenseAM.getExpenseReportHeadersVO();
ExpenseReportHeadersVORowImpl headerRow =
(ExpenseReportHeadersVORowImpl)headerVO.first();
projectNumber = headerRow.getAttribute2();// here we are getting ProjectNumber from
Header
taskNumber = headerRow.getAttribute3();
String purpose = headerRow.getAttribute1();
}
if(projectNumber !=null && taskNumber !=null)
{
for(RowSetIterator rowsetiterator = OIEUtil.getNoValIterator(receiptBasedLinesVOImpl);
rowsetiterator.hasNext();)
{
ExpenseReportLinesVORowImpl receiptBasedLinesVORowImpl =
(ExpenseReportLinesVORowImpl)rowsetiterator.next();
Date date = receiptBasedLinesVORowImpl.getStartExpenseDate();
String existProjectNumber = receiptBasedLinesVORowImpl.getProjectNumber();
String existTaskNumber = receiptBasedLinesVORowImpl.getTaskNumber();
if(calledFrom==1){
if (date != null && existProjectNumber== null && existTaskNumber == null)
{
receiptBasedLinesVORowImpl.setProjectNumber(projectNumber);// here we are setting
the projectNumber to receiptBasedLinesVO
receiptBasedLinesVORowImpl.setTaskNumber(taskNumber);// and same way to
TaskNumber
}
}else
{
if(date != null)

.C

.B
8

S
P

A
E

http://oracleapps88.blogspot.com/

Raju Ch

{
receiptBasedLinesVORowImpl.setProjectNumber(projectNumber);
receiptBasedLinesVORowImpl.setTaskNumber(taskNumber);
}
}
}
}
}catch(Exception e)
{
System.out.println("Exception :"+e.getMessage());
}

.C

}
The same which is applicable for remaning Methods
ie defaultForPerDiem(OAPageContext pageContext,int calledFrom)
defaultForMileage(OAPageContext pageContext,int calledFrom)

4.4 Setup

O
L
The following modules comprise the implementation set for the Project and Task
Number are defaulted from the Header Information.
.B
8 FTP Target Location
Deployment Files
8
Type
S
XXAPCreditCardLinesPG.xml
ASCII
/xxsai/oracle/apps/ap/oie/webui
P
XXAPCashAndOtherLinesCO.class
BIN
/xxsai/oracle/apps/ap/oie/server
P
XXAPCashAndOtherLinesPG.xml
ASCII
/xxsai/oracle/apps/ap/oie/webui
XXAPCashAndOtherCO.class
BIN
/xxsai/oracle/apps/ap/oie/server
A
E in your local machine and copy the final folder delivered into
1. Install JDeveloper
L
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects and
and follow below steps. (Final
C<JDEV_INSTALL_DIR>\jdevhome\jdev\myclasses
will be delivered along with the last OA Framework object)
A2. folder
Copy the final deliverable folder into $OA_JAVA folder in UNIX machine with
Installation steps

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
"(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<HOST_NA
ME>)(PORT=<PORT_NUMBER>))(CONNECT_DATA=(SID=<SID_N
AME>)))"

.C

iii. <JDEV_INSTALL_DIR>\jdevbin\jdev\bin:\>import
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects\xxsai\oracle\apps\ap
\oie\webui\ XXAPPurposeLookupVO.xml -rootdir
<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>)))"

O
L
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)
B
.
6. Run the jpx import utility to import substitutions
8 specified in the .jpx definition file to the
MDS repository using<JDEV_INSALL_DIR>\jdevbin\jdev\bin>jpximport
8
C:\iExpenses.jpx -username apps -password apps -dbconnection "(DESCRIPTION=
S
(ADDRESS=
P
(PROTOCOL=tcp)(HOST=<HOST_NAME>)(PORT=<PORT_NUMBER>))(CONNEC
T_DATA=(SID=<SID_NAME>)))"
P
A call of the function OIEENTRYFLOW
7. Change the HTML
(OA.jsp?page=/oracle/apps/ap/oie/entry/header/webui/GeneralInformationPG&OASF=O
E
IE_EXPENSE_REPORT_SEARCH)
with the custom path
L
OA.jsp?page=/xxsai/oracle/apps/ap/oie/webui/XXAPGeneralInformationPG&OASF=OI
CE_EXPENSE_REPORT_SEARCH)
A8. 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

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 nonemployees).

.C

Basic Business Needs


When any expense report is entered for expense types to which expense type data rule
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
recipients information need to be manually populated. For employees the attendees or
recipients information like name and title will come based on the value selected from the
LoV for the name column.
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
Table). But as the business stores the employee title in the ATTRIBUTE5 column of the
PER_ALL_PEOPLE_F table the requirement is to get the title value from the same.
The following Expense Types will use expense type data rule:
1. Entertainment with 3rd parties
2. Entertain/Recreation with Personnel
3. Meals at Meetings-3rd parties
4. Meals at Offsite Mtgs- Personnel
5. Meals at On-site Mtgs- Personnel
6. Recruiting Expenses
7. Meals-Employee Extended Workday

.B
8

S
P

A
E

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 nonemployees)

Under Attendees or Recipients--> Employee


Information region When the name is
selected from the LoV the title should default
the value stored in ATTRIBUTE5 column of
the PER_ALL PEOPLE_F table
5.1 Before Customization

.C

.B
8

S
P

A
E

http://oracleapps88.blogspot.com/

Raju Ch

5.2 After Customization

.C

.B
8

After the Customization Title displaying from the attribute5

S
P

5.3 How to achieve this Functionality using OAF Customization:


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

A
E
The whole process follows the following sequence:
L
C
Create a Custom BC4J Package (xxsai.oracle.apps.ap.oie.server).
A Create new Custom View Object XXAPAllEmployeesVO in custom BC4J package
Program Logic

(xxsai.oracle.apps.ap.oie.server) by Extending the existing AllEmployeeVO.


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
(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
C:\iExpenses.jpx -username apps -password apps -dbconnection "(DESCRIPTION=
(ADDRESS=
(PROTOCOL=tcp)(HOST=<HOST_NAME>)(PORT=<PORT_NUMBER>))(CONNEC
T_DATA=(SID=<SID_NAME>)))"

Import the page in to MDS Directory import


<JDEV_INSALL_DIR>\jdevhome\jdev\myprojects\sai\oracle\apps\ap\oie\webui\
XXAPAllEmployeesLovRN.xml -rootdir
<JDEV_INSALL_DIR>\jdevhome\jdev\myprojects -username apps -password apps dbconnection "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(
HOST=<HOST_NAME>)(PORT=<PORT_NUMBER>))(CONNECT_DATA=(SID=<S
ID_NAME>)))"

.B
8

S
P

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.

A
BounceE
the apache server.
L the profile options related to Personalization.
Disable
C
A

OA Framework Objects
1.

Create Custom VO (XXAPAllEmployeeVO)

Process
Field

Value

Notes

http://oracleapps88.blogspot.com/

Raju Ch

Process
Field

Value

Notes

Name
Package

XXAPAllEmployeeVO
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.
Process Field

Value

Available
Substitution

AllEmployeeVO
XXAPAllEmployeeVO

.C

Logic For this Requirement is:

1. Create custom VO XXAPAllEmployeeVO


Note: Steps for Creating VO was specified in the previous Requirement (Refer 1.7,1.9)
Query for the XXAPAllEmployeeVO is:

.B
8

SELECT
P.PERSON_ID,
P.FULL_NAME,
p.attribute5 Title,
ORG.NAME ORG_NAME,
p.employee_number AS employee_number
FROM
per_people_x p,
per_assignments_x a,
hr_organization_units org
WHERE
a.person_id = p.person_id
AND a.organization_id = org.organization_id
AND NOTap_web_db_hr_int_pkg.isPersonCwk(p.person_id) ='Y'.

S
P

A
E

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
Type

Notes

Target Location

http://oracleapps88.blogspot.com/

Deployment Files

Raju Ch

XXAPAllEmployeesAM.xml
XXAPAllEmployeesAMImpl.class
XXAPAllEmployeesVO.xml
XXAPAllEmployeesVOImpl.class
XXAPAllEmployeesLovRN.xml

FTP
Type
ASCII
BIN
ASCII
BIN
BIN

Target Location
/xxsai/oracle/apps/ap/oie/server
/xxsai/oracle/apps/ap/oie/server
/xxsai/oracle/apps/ap/oie/server
/xxsai/oracle/apps/ap/oie/server
/xxsai/oracle/apps/ap/oie/webui

1. Install JDeveloper in your local machine and copy the final folder delivered into
<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)

4. Import the .xml file into the data base


i.

3. Move the above files in mentioned Target Location.

<JDEV_INSTALL_DIR>\jdevbin\jdev\bin:\>import
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects\xxsai\oracle\apps\ap
\oie\webui\ XXAPAllEmployeesLovRN.xml -rootdir
<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_NA
ME>)))"

.B
8

8
5. Run the delivered jpx file using
Sthe below command by placing it in your local machine
(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
P
MDS repository using<JDEV_INSALL_DIR>\jdevbin\jdev\bin>jpximport
A
C:\iExpenses.jpx -username apps -password apps -dbconnection "(DESCRIPTION=
E (PROTOCOL=tcp)(HOST=<HOST-NAME>)(PORT=<PORT(ADDRESS=
L
NUMBER>))(CONNECT_DATA=(SID=<SID_NAME>)))"
7.C
Change the HTML call of the function OIEENTRYFLOW
A (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)

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.

.C

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.

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.
Basic Business Needs
When any airfare expense is claimed by an employee then iExpenses can be setup to
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:

.C

a. 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)

O
L
The Expense Report line details page should be customized in such a way that when the
Bexpense and above conditions are satisfied
expense report is entered claiming the Airfare
.
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
8
and Flight Type for expense type: Airfare. The employee band information will be
S
taken from custom table: SECPI_USER_DATA.
P
Process Flow P
A
E
L
C
b. Airline Class of Service is not Coach, Flight Type is International and employee band
is lower than D1

Employee enters expense report


for Airfare Expense

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)
Airline Class of Service is not Coach, Flight Type is International and
employee band is lower than D1.

.C

6.1 Before Customization

.B
8

S
P

R 6.2 After Customization

A
E

http://oracleapps88.blogspot.com/

Raju Ch

.C

.B
8

S
P

A
E

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 dont 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.
Create a new Custom View Object XXAPBandInfoVO in custom BC4J package
(xxsai.oracle.apps.ap.oie.server) for identifying the Band Details.

.C

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.

Bounce the apache server.


Disable the profile options related to Personalization.

.B
8
1. Create Custom VO 8
(XXAPEmpFirstClassVO)
S
P Value
Process
P
Field
A
XXAPEmpFirstClassVO
E Name

OA Framework Objects

Package

2.

Notes

xxsai.oracle.apps.ap.oie.server

Create Custom VO (XXAPEmpBandVO)

Process
Field

Value

Name
Package

XXAPEmpBandVO
xxsai.oracle.apps.ap.oie.server

Notes

http://oracleapps88.blogspot.com/

Raju Ch

3. Create Custom VO (XXAPBandInfoVO)

Process
Field

Value

Notes

Name
Package

XXAPBandInfoVO
xxsai.oracle.apps.ap.oie.server

Query for XXAPEmpFirstClassVO is:


SELECT
lookup_code EmployeeNumber,
ppf.person_id EmpID,
description Required
FROM
fnd_lookup_values flv,
per_all_people_f ppf
WHERE
flv.lookup_type='SEOIE_EMPLOYEE_FIRST_CLASS'
and flv.language='US'
and flv.meaning in (select employee_number from per_all_people_f a where
a.person_id=ppf.person_id).

.B
8

S
P

Query for XXAPEmpBandVO is:


SELECT
ppf.person_id BandEmployeeID,
ppf.full_name EmployeeName,
sud.emp_id EmployeeNumber,
sud.orig_band
Band
FROM
PER_ALL_PEOPLE_F PPF,
SECPI_USER_DATA SUD
WHERE
sud.emp_id in (select employee_number from per_all_people_f a where
a.person_id=ppf.person_id).

A
E

Query for XXAPBandInfoVO is:


SELECT
lookup_code, meaning BandInfo from fnd_lookup_values
WHERE

.C

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.

Type
Meaning
Application
Description

Lookups
SEOIE_EMPLOYEE_FIRST_CLASS
Airline Class of Service
East Oracle Internet Expenses
Airline Class of Service
Values
Meaning
Description
55673
Y
23360
Y

.C

Code
GLASGOW,STANFORD L
HIDEKI KOMIYAMA

.B
8

S
P

A
E

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
SEOIE_BAND_INFORMATION
SEOIE_BAND_INFORMATION
East Oracle Internet Expenses
Airline Class of Service
Values
Meaning
A
B
C

Type
Meaning
Application
Description
Code
BAND A
BAND B
BAND C

.C

.B
8

S
P

A
E

R 6.5 Logic to Implement in XXAPDetailMainCO


//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 =
am1.getExpenseReportHeadersVO();

.C

ExpenseReportHeadersVORowImpl expenseReportHeaderROW =
(ExpenseReportHeadersVORowImpl)expenseReportHeaderVO.first();

Number employeeID = expenseReportHeaderROW.getEmployeeId();

Number
expensereportid=expenseReportHeaderROW.getExpenseReportId();
int count=0;

O
L
DetailAMImpl detailAMImpl =
(DetailAMImpl)pageContext.getApplicationModule(webBean);
.B
8 vo =
DetailReceiptBasedVOImpl
(DetailReceiptBasedVOImpl)detailAMImpl.getDetailLineVO();
8
S
row = (DetailReceiptBasedVORowImpl)vo.first();
P= row.getAttributeCategory();
context
P
classCode = row.getAttribute8();
DetailReceiptBasedVORowImpl row=null;
try{

A justfication = row.getJustification();
E

flight_type=row.getAttribute15();}
catch(Exception e){

System.out.println("Error was occured in Detail main CO:"+e);


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){
xxapExpenseTemplateVo.setWhereClause("EXPENSE_REPORT_ID
=" + expensereportid);

.C

String query = xxapExpenseTemplateVo.getQuery();

xxapExpenseTemplateVo.executeQuery();

Row xxapExpenseTemplateVoRow = null;

if((xxapExpenseTemplateVoRow = xxapExpenseTemplateVo.next())
!= null){

expenseTemplateReportType =
(String)xxapExpenseTemplateVoRow.getAttribute("ReportType");}}

.B
8

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

S
P
if(xxapEmpFirstClassVO
== null){
P
xxapEmpFirstClassVO =

//This VO which contains the all First Class Employee details.

A (XXAPEmpFirstClassVOImpl)am1.findViewObject("XXAPEmpFirst
E ClassVO");

if(xxapEmpFirstClassVO == null){

xxapEmpFirstClassVO =
(XXAPEmpFirstClassVOImpl)am1.createViewObject("XXAPEmpFir
stClassVO",
"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){}
else{

.C

throw new OAException("Justfication is required for airfare class of


service", (byte)0);}}

//Same way the conditions will be check for the Remaining conditions
also like Classcode is Business and Class is not Coach

6.6 Setup
Installation Steps

The following modules comprise the implementation set for the Business Rule to require
Justification Process.

Deployment Files

S
P

.B FTP
8 Type

XXAPEmpBandVO.xml
XXAPEmpFirstClassVO.xml
XXAPEmpBandVORowImpl.class
XXAPEmpBandVOImpl.class
XXAPEmpFirstClassVORowImpl.class
XXAPEmpFirstClassVOImpl.class

/xxsai/oracle/apps/ap/oie/webui
/ xxsai /oracle/apps/ap/oie/webui
/ xxsai /oracle/apps/ap/oie/server
/ xxsai /oracle/apps/ap/oie/server
/ xxsai /oracle/apps/ap/oie/server
/ xxsai /oracle/apps/ap/oie/server

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

ASCII
ASCII
BIN
BIN
BIN
BIN

Target Location

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

.C

7. Defaulting Additional CC details to ER Line DFF

This document describes the functionality of customization required to default additional


Credit Card Transaction details to Expense Report Line DFF fields.

Standard functionality of iExpenses will not provide fields on Expense Report Screen to
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
between Attribute columns and transaction fields. And customization will be done to
default additional Credit Card Transaction details into respective DFF fields. Based on
the Credit Card Transaction line Expense Category, the additional details will be
defaulted to the corresponding ER Line DFF fields.

.B
8

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

Expense Entry Details Screen.

http://oracleapps88.blogspot.com/

Raju Ch

Process Flow
Enter expense report

Select credit card transaction

Enter the expense report line


information

.C

On detail page DFF fields are displayed based on the


expense type used on the line. These fields will
automatically fetch the values from the credit card
transaction table.

.B
8

S
P

A
E

7.1 Before Customization

http://oracleapps88.blogspot.com/

Raju Ch

7.2 After Customization

.C

.B
This functionality of customization required
to default additional Credit Card Transaction
8
details to Expense Report Line8
DFF fields. A brief summary of the strategy appears
below:
S
After analyzing the ExpenseDetailsPG,
Customization is required for
P
P
1. XXAPExpenseDetailsPG
A
2. XXAPDetailsMainCO
E
3. XXAPAirClassCodeVO
L
Note: Creation of VO, CO and Page will be discussed in the 1 requirement.
CProgram
Logic

7.3 How We Achieve this Requirement Using OAF:

st

The whole process follows the following sequence:

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
PCashAndOtherLinesPG.xml -rootdir
<JDEV_INSALL_DIR>\jdevhome\jdev\myprojects -username apps -password apps dbconnection
"(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<HOST_NAME>)(PORT=
<PORT_NUMBER>))(CONNECT_DATA=(SID=<SID_NAME>)))"

.C

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\
XXAPCreditCardLinesPG.xml -rootdir
<JDEV_INSALL_DIR>\jdevhome\jdev\myprojects -username apps -password apps dbconnection
"(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<HOST_NAME>)(PORT=
<PORT_NUMBER>))(CONNECT_DATA=(SID=<SID_NAME>)))"

.B
8

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.

S
P
Bounce the apache server.
Disable the profileP
options related to Personalization.
A
E
L
C
A

OA Framework Objects

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


Process Field

Value

Name
Package
Region
Extends Controller

XXAPDetailMainCO
xxsai.oracle.apps.ap.oie.webui
OIEDetails
DetailMainCO

Notes

http://oracleapps88.blogspot.com/

Process Field

Raju Ch

Value

Notes

Object
2. Create Custom VO (XXAPAirfareClassCodesVO)

Process
Field

Value

Notes

Name
Package

XXAPAirfareClassCodesVO
xxsai.oracle.apps.ap.oie.server

.C

Query for XXAPAirfareClassCodesVO is:


SELECT
lookup_code AirfareClassCode,
Description ClassType
FROM
fnd_lookup_values
WHERE
lookup_type='SEOIE_AIRFARE_CLASS_CODES'

O
L
The Lookup code definition has defined for the Airline class of service codes
.B
8
8
7.4 Logic to implement in XXAPDetailMainCO
S
P
//this is the method whichP
is used to default some fileds in detail page.
public void defaultCreditInformation(OAPageContext
pageContext,OAWebBean webBean)
A
{
E
L
WebExpensesAMImpl am1=
(WebExpensesAMImpl)pageContext.getRootApplicationModule();
C
A
DetailAMImpl detailAMImpl = (DetailAMImpl)pageContext.getApplicationModule(webBean);

R DetailReceiptBasedVOImpl vo =

(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){
xxapCCTransactionVo=(XXAPCreditCardTransactionsVOImpl)am1.createViewObject("XXAP
CreditCardTransactionsVO","xxsai.oracle.apps.ap.oie.server.XXAPCreditCardTransactionsVO"
);}}

.C

if(xxapCCTransactionVo != null){
xxapCCTransactionVo.setWhereClause("TRX_ID ="+transactionId);
String query=xxapCCTransactionVo.getQuery();

xxapCCTransactionVo.executeQuery();

XXAPCreditCardTransactionsVORowImpl xxapCCTransactionsVoRow=null;

if((xxapCCTransactionsVoRow =
(XXAPCreditCardTransactionsVORowImpl)xxapCCTransactionVo.next())!=null)

.B
8
Number trxId=xxapCCTransactionsVoRow.getTrxId();
8
if(("Airfare".equalsIgnoreCase(context))||("IHR.Airfare".equalsIgnoreCase(context))||("Relo.Airf
are".equalsIgnoreCase(context))) S
P
{
P
String destCity=xxapCCTransactionsVoRow.getAirarrival();
A
Date dirDepartDate=xxapCCTransactionsVoRow.getAirdepdate();
E
String bookingAgent=xxapCCTransactionsVoRow.getAirticketissue();
L
C
String
departCity=xxapCCTransactionsVoRow.getAirdepcity();
A
String dDate=null;
{

R String sDate=null;
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){

.C

System.out.println("Destination city is null");}


try{
if(bookingAgent!=null){

row.setAttribute5(bookingAgent); }}

catch(Exception e){

try{
if(departCity!=null){

row.setAttribute3(departCity);}}

.B
8

catch(Exception e){

String classCode=xxapCCTransactionsVoRow.getAirserclass ();


if(classCode!=null){

S
char c=classCode.charAt(0); P
P== null){
if(xxapAirfareClassCodesvo
A
xxapAirfareClassCodesvo =
E
(XXAPAirfareClassCodesVOImpl)am1.findViewObject("XXAPAirfareClassCodesVO");
L
if(xxapAirfareClassCodesvo == null){
C
xxapAirfareClassCodesvo=(XXAPAirfareClassCodesVOImpl)am1.createViewObject("XXAPAi
A
rfareClassCodesVO","xxsai.oracle.apps.ap.oie.server.XXAPAirfareClassCodesVO");}}
try{

R if(xxapAirfareClassCodesvo != null){

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")){

row.setAttribute8("Business");}}}

.C

else{
row.setAttribute8("Coach");}}}
catch(Exception e)

System.out.println ("Exception was raised");}}


else{

System.out.println ("class code is null");}}

.B
8

The same logic is applicable for the Context CarRental ,Loding-Room Charges and
Loding-Room Tax

S
P

7.5 Setup
Installation Steps

A
E

The Lookup code definition has defined for the Airline class of service codes

http://oracleapps88.blogspot.com/

Raju Ch

.C

Note:

If Air class of service starts with A, F or P in credit card transactions table we have to
default First Class in DFF field of Expense line details for Air class of Service.
If Air class of service starts with C, D or J in credit card transactions table we have to
default Business Class in DFF field of Expense line details for Air class of Service.
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.

Type
Meaning
Application
Description
Code
A
C
D
F
J
P

8Lookups

S
P

A
E
Meaning
L
A

CC

.B
8

D
F
J
P

SEOIE_AIRFARE_CLASS_CODES
Airline Class Of Service Codes
East Oracle Internet Expenses
Values
Description
First
Business
Business
First
Business
First

The following modules comprise the implementation set for the Defaulting Additional CC details
to ER Line DFF Process.

http://oracleapps88.blogspot.com/

Deployment Files

Raju Ch

XXAPCreditCardLinesPG.xml
XXAPCashAndOtherListPG.xml
XXAPCashAndOtherCO.class
XXAPCreditCardLinesCO.class

FTP
Type
ASCII
ASCII
BIN
BIN

Target Location
/xxsai/oracle/apps/ap/oie/webui
/xxsai/oracle/apps/ap/oie/webui
/xxsai/oracle/apps/ap/oie/webui
/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
<JDEV_INSTALL_DIR>\jdevhome\jdev\myclasses and follow below steps.
(Final folder will be delivered along with the last OA Framework object)

.C

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

c. Move the above files in mentioned Target Location.

d. Import the custom pages 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
<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>)))"

.B
8

S
P

ii. <JDEV_INSTALL_DIR>\jdevbin\jdev\bin:\>import
<JDEV_INSTALL_DIR>\jdevhome\jdev\myprojects\xxsai\oracle\apps\ap
\oie\webui\ XXAPCashAndOtherListPG.xml -rootdir
<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>))" -mmddir
<JDEV_INSTALL_DIR>\jdevhome\jdev\myclasses\JRADXML

A
E

e. 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)
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


The Late fee transactions charged by AMEX should not be charged as business expenses.
Basic Business Needs
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
expense. Hence the page where the employee attaches a transaction to an Expense Report
should be customized in such a way that the employee should be forced to categorize the
late fee expense as Personal expense. The employee should not be able to attach these
transactions as business expense.

.C

Process
Employee logs onto
applications and
creates a new Expense
Report

.B
8
He has late fee transactions in list of
8
transactions that can be attached to an
S
Expense Report
P
P

AThe employee should be forced to


E categorize the late fee transaction as

personal expense. He should not be to


attach the late fee transaction as business
expense.

http://oracleapps88.blogspot.com/

Raju Ch

8.1 Before Customization

.C

8.2 After Customization

.B
8

S
P

A
E

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
CreditCardLinesCO. Package Name for this CO is xxsai.oracle.apps.ap.oie.webui.
Modify the Custom View Object XXAPCCTransactionVO in custom BC4J package
(xxsai.oracle.apps.ap.oie.server) for identifying the AmexLateFee Transaction Types
Bounce the apache server.

.C

Disable the profile options related to Personalization.

OA Framework Objects

1. Set New Controller(XXAPDetailMainCO) Object on XXAPExpenseDetailPG


Page

B
.
8XXAPCreditCardLinesCO
xxsai.oracle.apps.ap.oie.webui

Process Field

Value

Name
Package
Region
Extends Controller
Object

S
P

OIECreditCardExpense
CreditCardLinesCO

A
2. Create
E Custom VO (XXAPCCTransactionVO) (Refer 1.7,1.9)
L

Process
Field

Value

Name
Package

XXAPCCTransactionVO
xxsai.oracle.apps.ap.oie.server

Query for XXAPCCtransactionVO is:


SELECT

Notes

Notes

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,
Merchant_Province_State,
Merchant_Country,
Folio_Type,
Category,
Report_Header_Id,
Company_Prepaid_Invoice_Id,
Expensed_Amount,
Billed_Date,
Hotel_Room_Amount,
Hotel_Telephone_Amount,
Hotel_Room_Tax,
Hotel_Bar_Amount,
Hotel_Movie_Amount,
Hotel_Gift_Shop_Amount,
Hotel_Laundry_Amount,
Hotel_Health_Amount,
Hotel_Restaurant_Amount,
Hotel_Business_Amount,
Hotel_Parking_Amount,
Hotel_Room_Service_Amount,
Hotel_Tip_Amount,
Hotel_Misc_Amount,
Payment_Due_From_Code,
Posted_Date,
Air_Ticket_Number,
Trunc(Sysdate - Posted_Date) As Age,
Air_Arrival_City Airarrival,
Air_Departure_Date Airdepdate,
Air_Ticket_Issuer
Airticketissue,
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,

.C

.B
8

S
P

A
E

http://oracleapps88.blogspot.com/

Hotel_Room_Rate
Air_Service_Class
mis_industry_code

Raju Ch

Hotelroomrate,
Airserclass,
amexlatefeecode

FROM
AP_CREDIT_CARD_TRXNS_ALL

8.4 Logic for this Customization in XXAPCCTransactionVO

public void amexTransaction(OAPageContext pageContext)


{
//Create VO and Row Objects for ExpenseReportLines
ArrayList arraylist = new ArrayList();
int i = businessCreditCardLinesVO.getRowCount();
int j=1;
Number transactionId=null;
if(i>0)
{
for(RowSetIterator rowsetiterator =
OIEUtil.getNoValIterator(businessCreditCardLinesVO); rowsetiterator.hasNext();)
{
Date date = businessCreditCardLinesVORow.getStartExpenseDate();
String existProjectNumber = businessCreditCardLinesVORow.getProjectNumber();
String existTaskNumber = businessCreditCardLinesVORow.getTaskNumber();
String context=businessCreditCardLinesVORow.getAttributeCategory();
transactionId=businessCreditCardLinesVORow.getCreditCardTrxId();
if(xxapCCTransactionVo == null)
{
//Create VO and ROW object for CreditCardTransactionsVO
xxapCCTransactionVo.setWhereClause("TRX_ID ="+transactionId);
String query=xxapCCTransactionVo.getQuery();
xxapCCTransactionVo.executeQuery();
XXAPCreditCardTransactionsVORowImpl xxapCCTransactionsVoRow=null;
if((xxapCCTransactionsVoRow =
(XXAPCreditCardTransactionsVORowImpl)xxapCCTransactionVo.next())!=null
)
{
Number trxId=xxapCCTransactionsVoRow.getTrxId();
String amexLatefeeType=xxapCCTransactionsVoRow.getAmexlatefeecode();
if(amexLatefeeType!=null)
{
if(amexLatefeeType.equalsIgnoreCase("DC"))
{
String error = "Line "+j+" Error: ";

.C

.B
8

S
P

A
E

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);}
catch(Exception e)
{
System.out.println("Exception :"+e.getMessage());}}}
if(arraylist.size() > 0)
{
OAException.raiseBundledOAException(arraylist);}

.C

8.5 Setup

Installation Steps

The following modules comprise the implementation set for the AMEX Late Fee Transactions.

.B FTP
8 Type

Deployment Files

XXAPCreditCardTranscatiosVO.xml
XXAPCashAndOtherCO.class
XXAPCreditCardLinesCO.class

S
P

A
E

ASCII
BIN
BIN

Target Location
/xxsai/oracle/apps/ap/oie/webui
/xxsai/oracle/apps/ap/oie/webui
/xxsai/oracle/apps/ap/oie/webui

1. Install JDeveloper in your local machine and copy the final folder delivered into
<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)

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

.C

.B
8

S
P

A
E

You might also like