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
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.
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.
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.
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.
The Model –Data Processing
· 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.
- 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
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.)
- 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 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:
- The ability to hide and show page items and regions, reordering page items, adding new items, adding corporate branding.
- Importing and exporting personalization’s with the Personalization Document Manager
- New user interface for creating personalization’s
- 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:
- The ability to add new business logic to existing screens
- Durability of extensions, allowing them to be preserved across upgrades
- Use of Oracle JDeveloper 10g with OA Extension to support J2EE development and integration with Release 12
- Support for service interfaces, standalone components that can be deployed as web services, EJB session beans, or as co-located Java APIs
OA Framework Architecture
Client Application Server Data Server
MDS
We
know it means Meta Data Service. We also know that it has something to
do with web page displayed in OA Framework. Let’s try to understand the
basics of MDS.
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.
Data: -
Those Meta pieces are not stored as binary files, but as data in
tables. Those tables begin with jdr, for example JDR_ATTRIBUTES,
JDR_ATTRIBUTES_TRANS, JDR_COMPONENTS and JDR_PATHS. The definition and
relationship of each field/region/component is stored in these JDR
tables. OA framework reads that data when you request a page. The page
structure is then built based on MetaData.
Service: -
Meta Data is available as a service (plain service not webservice). The
data is there in JDR tables, but 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 to
store & return page definitions. MDS collates those definitions in
components/fields in a meaningful manner to build a page.
These two below methods are available in the Default Controller class that gets created.
ProcessFormRequest (oapageContext, oawebBean)
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(
if(oapagecontext.getParameter(
if(oapagecontext.getParameter(
In the above three examples, you could be calling oapagecontext.
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.
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.
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.
Step 2Next, 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, it’s a convention to have page in webui, means this page represents the Web User Interface
c. You will assign the default AM [OAApplicationModule]. Think of AM "Connection Manager" and "Transaction State Manager" for your page.
I can't co-relate this to anything in D2k, as there is no concept of Connection Pooling and that D2k is not stateless. Reason being that as soon as you kick off a D2K Form, it connects to a 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.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(
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.
Let’s take some notes to expand beyond the Hello World Project:
1. In D2K-forms we sort of created a Window, attached to Canvas, and then fields within that Canvas.
However in OA Framework, think of Page being fmx/Window, think of Region being a Canvas, and fields being within Regions.
This is not a formal/accurate understanding of analogy between D2k and Framework, but is close to being logical.
2. In D2k, your Forms fmb file was compiled to fmx. It was fmx file that was deployed on mid-tier.
In case of OAF, your OA Page is nothing but a XML file. We call this MDS [Meta data].
Whatever name you give to "Page" in OAF, an XML file of the same name gets created. This xml file must then be loaded into database by using XMLImporter command.
3. Apart from MDS XML file, almost everything else is merely deployed to your mid-tier. Usually this is underneath $JAVA_TOP/oracle/apps/../..
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]
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?
Because Application Module manages the transaction state of the Application.
OAApplicationModuleImpl oaapplicationmoduleimpl = (OAApplicationModuleImpl) oapagecontext.
OADBTransaction oadbtransaction = (OADBTransaction)
8. In D2K, we have control block or a block based on database view.
Similarly, 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 terminology]. A viewObject can either be based on a view/table.synonym or on a SQL statement.
9. I wish to access the fields in multi record block that is based on view Object. Can I do this in Controller?
Sure you can. To traverse through those records, do the below
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
oracle.jbo.Row row = oaviewobject. getRowAtRangeIndex (loop index here);
(String) row.getAttribute ("Column name of VO here ");
b. Loop through the records in View Objects using count returned from oaviewobject.
c. For each record, fetch the value of the fields within the loop as
oracle.jbo.Row row = oaviewobject.
(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?
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
|
setItemAttribute() in Entity Object
|
Ideally does not set a item value, simply it validates
|
Sets the value of field that corresponds to the column. But we can also add field level validations in this method.
|
Can fire immediately after navigating out of the field(assuming it was changed)
|
Unless we implement PPR (Partial Page Rendering) around that field, this will fire at page level by default.
|
Restricted
trigger, but can indirectly influence navigation by setting enable off,
or by setting navigation property of other items.
|
No relationship to User Interface, as controller manages the User Interface.
|
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.
WHEN-CREATE-RECORD in D2K
|
create() in Entity Object
|
As soon as a new record is created, values can be defaulted to fields via this trigger.
|
Defaults values for the fields
super.create(attributelist);
SetPOHeaderId (getOADBTransaction ().
getSequenceValue("XXPO_HEADER_
|
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
|
validateEntity() in Entity Object
|
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 changed].
|
Ditto
in OA Framework. For example if you wish to ensure that every CLERK
must have a supervisorId attached, then write similar to below
protected void validateEntity()
{
super.validateEntity();
if(xxGetSupervisrId() == null
&&
!"CLERK".equals(
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
|
postChanges() in Entity Object
|
Fires before Form issues a commit
|
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(
}
|
Let’s
touch base on some other similarities & dis-similarities between
D2K and Entity Objects in Framework Buffering of records
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.
JDeveloper Setup Using Windows:
- 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
- Download the OA Patch (4045639) from the metalink.
- 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\
- Creating a Desktop Shortcut to JDeveloper
To facilitate launching JDeveloper, create a desktop shortcut to jdevbin\jdev\bin\jdevw.exe.
- Configuring the JDEV_USER_HOME Environment Variable
Configure the JDEV_USER_HOME environment variable using Windows XP or Windows 2000:
· Go to your desktop and select My Computer, right-click and select Properties.
· 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.
· 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
Creating the OA Project:
Click on Workspace à Select New OA Workspace
Workspace Name Check the Add New OA Project
After you click OK, you will see the Oracle Applications Project Wizard.
Click on Finish
Set System Profile Values
To Analyzing the Page Objects we need to enable the profile options.
· 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
Sign on to Oracle Applications as the System Administrator responsibility.
System Profile Option | Description | Required | dDefault Value |
FND: Diagnostics | This profile enables about this page link at the end of the page. | YES | None |
Personalize Self-Service Defn | On enabling this profile option, every OAFramework page will contain a global Personalize button. This profile enables personalization link and enables user to personalize page. | YES | None |
Disable Self-service Personal | 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.
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.
Design Considerations
1. OA
Framework guidelines suggest to Extend BC4J objects to extend business
logic so that changes are upgrade safe. Solution design considers
extending only BC4J objects where ever possible.
2. iExpenses
pages are created with “Allow Indexed children” property set to false
and hence new items can’t be added using personalization. This
necessitates copying the standard page and creating a custom page so
that changes are not overridden by upgrades.
3. Fields
on iExpenses pages are added programmatically using Controller. This
necessitates extending Controller and incorporating item creation inside
extended controller to achieve requirement.
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.
1.1 Before Customization
We need to add the additional field (Description) here
1.2 After Customization
New field (Description) is added
1.3 How to achieve this Functionality using OAF Customization:
Overview
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.
1.4 Program Logic:
The whole process follows the following sequence:
Ø Create a Custom BC4J Package (xxsai.oracle.apps.ap.oie. server).
Ø 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.
Ø 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.
Ø Copy the contents of existing EntryTrainRN.xml into XXAPEntryTrainRN.xml.
Ø 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.
Ø 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>))( CONNECT_DATA=(SID=<SID_NAME>)) )"
For above example I have placed the .jpx file into C:\ directory in my local
Machine.
Ø 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.
1.5 Train
The train region is used to indicate the current page of a multi-page process.
All
the pages in the train should be copied to custom pages for proper
navigation between pages and the Destination URL links of the pages in
the train should be replaced with the custom path if we are customizing
any single page in the train.we are customizing GeneralinformationPG for
adding Description field. The following pages should be customized:
- GeneralInformationPG
- CreditCardTrxnsPG
- CreditCardLinesPG
- CashAndOtherLinesPG
- ExpenseAllocationsPG
- FinalReviewPG
How to extend the Page:
Right click on project (iExpenses.jpr)
Select the Web Tier à OA Components à Page
Click on Ok button.
Enter the Page Name Give the package name where the page will
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.
As per the requirement we have to add the additional field on OIEGeneralInformation region under GeneralInformationPG page.
Add indexed child property is false
This
requirement can be achieved by customizing the standard Controllers
(CO) and extending the Corresponding View Object (VO). How to identify
the CO’s and VO’s of the XXAPGeneralInformationPG is discussed below:
1.6 How to identify the Controller’s and View Object’s behind that page:
Every page contains one Option like “About this Page”,
click on this option to view controllers, entity objects, view objects
& Application Module associated to the current page
Steps for Enable the “About this Page” link
· Enable the FND: Diagnostics profile option from the System Administrator
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
Click on About this page link
After
referring the about this page of GeneralInformationPG it is identified
that customization should be done on the following CO and VO.
- HeaderCO
- ExpenseTemplateVO
1.7 Steps to extend the VO
Open the VO from Jdeveloper.
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))
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))
Added the additional description column in the query
Note: For extensions of VO’s we have to add the columns at the end of the query.
Create
a new message Styled Text Item on the region OIEGeneralInformation of
the page XXAPGeneralInformationPG for adding the Expense Report Template
Description.
1.8 Steps to substitute the VO
Select the Standard VO from the Available list and Extended VO from the Substitute list.
Click on Add button.
Steps to Create New Item on OIEGeneralInformation Region:
1.9 Steps to Create Custom CO:
1. Select OIEGeneralInformation region under XXAPGenerationInformationPG. xml.
2. Set New Controller for OIEGeneralInformation
Right Click on OIEGeneralInformationà
Enter Package Name and Class name.
Note: Controller class must be in the webui folder.
For example xxsai.oracle.apps.ap.oie. webui.
Now new Controller is created for OIEGenerationInformation.
1.10 Program Logic in XXAPHeaderCO
If (uiNode instance of OAStackLayoutBean)
{
OAStackLayoutBean stackLayout = (OAStackLayoutBean) uiNode;
OATableLayoutBean tabLayOut = (OATableLayoutBean) stackLayout.getIndexedChild (0);
OARowLayoutBean rowLayOut = (OARowLayoutBean) tabLayOut.getIndexedChild (0);
OACellFormatBean cellFormBean = (OACellFormatBean) rowLayOut.getIndexedChild (0);
OATableLayoutBean tableBean1 = (OATableLayoutBean) cellFormBean.getIndexedChild (0);
OAMessageStyledTextBean descBean = (OAMessageStyledTextBean) createWebBean (pageContext, webBean, "ExpTempDescription");
String eventType = pageContext.getParameter ("event");
ViewObject viewobject1 = pageContext. getApplicationModule (webBean).findViewObject ("XXAPExpenseTemplatesVO");
If (viewobject1! = null)
{
String query = viewobject1.getQuery ();
}
ExpenseReportHeadersVOImpl expenseReportHeadersVO = (ExpenseReportHeadersVOImpl) pageContext. getApplicationModule (webBean).findViewObject ("ExpenseReportHeadersVO");
If (expenseReportHeadersVO! = null)
{
ExpenseReportHeadersVORowImpl expenseReportHeadersVORow = ( ExpenseReportHeadersVORowImpl) expenseReportHeadersVO.first ();
Number expensReportId = expenseReportHeadersVORow. getExpenseReportId ();
If (viewobject1! = null && expensReportId! = null)
{
Do
{
If ((row = viewobject1.next ()) == null)
{
Break;
}
Number expenseTemplateReportId = (Number) row.getAttribute ("ExpenseReportId");
If (expenseTemplateReportId. equals (expensReportId))
{
}
} while (true);
1.11 Setup
Installation Steps
The following modules comprise the implementation set for the Adding the Expense Report Template Description Process.
Deployment Files
|
FTP Type
|
Target Location
|
XXAPOIEMAINPAGE.xml
|
ASCII
|
/xxsai/oracle/apps/ap/oie/
|
XXAPGeneralInformationPG.xml
|
ASCII
|
/xxsai/oracle/apps/ap/oie/
|
XXAPEntryPageIndexRN.xml
|
ASCII
|
/xxsai/oracle/apps/ap/oie/
|
XXAPEntryTrainRN.xml
|
ASCII
|
/xxsai/oracle/apps/ap/oie/
|
XXAPCreditCardTrxnsPG.xml
|
ASCII
|
/xxsai/oracle/apps/ap/oie/
|
XXAPCreditCardLinesPG.xml
|
ASCII
|
/xxsai/oracle/apps/ap/oie/
|
XXAPCashAndOtherLinesPG.xml
|
ASCII
|
/xxsai/oracle/apps/ap/oie/
|
XXAPItemizationDetailsPG.xml
|
ASCII
|
/xxsai/oracle/apps/ap/oie/
|
XXAPExpenseAllocationsPG.xml
|
ASCII
|
/xxsai/oracle/apps/ap/oie/
|
XXAPExpenseAllocationDetailPG.
|
ASCII
|
/xxsai/oracle/apps/ap/oie/
|
XXAPExpenseDetailsPG.xml
|
ASCII
|
/xxsai/oracle/apps/ap/oie/
|
XXAPConfirmationPG.xml
|
ASCII
|
/xxsai/oracle/apps/ap/oie/
|
XXAPReadOnlyDetailsPG.xml
|
ASCII
|
/xxsai/oracle/apps/ap/oie/
|
XXAPFinalReviewPG.xml
|
ASCII
|
/xxsai/oracle/apps/ap/oie/
|
XXAPHeaderCO.class
|
BIN
|
/xxsai/oracle/apps/ap/oie/
|
XXAPExpenseTemplatesVO.xml
|
ASCII
|
/xxsai/oracle/apps/ap/oie/
|
XXAPExpenseTemplatesVOImpl.
|
BIN
|
/xxsai/oracle/apps/ap/oie/
|
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 “.XML” files should be moved in ASCII mode.
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\webui\ XXAPOIEMAINPAGE.xml -rootdir <JDEV_INSTALL_DIR>\jdevhome\ jdev\myprojects -username apps -password apps -dbconnection "(DESCRIPTION=(ADDRESS=( PROTOCOL=tcp)(HOST=<HOST_NAME> )(PORT=<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\webui\ XXAPGeneralInformationPG.xml -rootdir <JDEV_INSTALL_DIR>\jdevhome\ jdev\myprojects -username apps -password apps -dbconnection "(DESCRIPTION=(ADDRESS=( PROTOCOL=tcp)(HOST=<HOST_NAME> )(PORT=<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\webui\ XXAPEntryPageIndexRN.xml -rootdir <JDEV_INSTALL_DIR>\jdevhome\ jdev\myprojects -username apps -password apps -dbconnection "(DESCRIPTION=(ADDRESS=( PROTOCOL=tcp)(HOST=<HOST_NAME> )(PORT=<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\webui\ XXAPEntryTrainRN.xml -rootdir <JDEV_INSTALL_DIR>\jdevhome\ jdev\myprojects -username apps -password apps -dbconnection "(DESCRIPTION=(ADDRESS=( PROTOCOL=tcp)(HOST=<HOST_NAME> )(PORT=<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\webui\ XXAPCreditCardTrxnsPG.xml -rootdir <JDEV_INSTALL_DIR>\jdevhome\ jdev\myprojects -username apps -password apps -dbconnection "(DESCRIPTION=(ADDRESS=( PROTOCOL=tcp)(HOST=<HOST_NAME> )(PORT=<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\webui\ XXAPCreditCardLinesPG.xml -rootdir <JDEV_INSTALL_DIR>\jdevhome\ jdev\myprojects -username apps -password apps -dbconnection "(DESCRIPTION=(ADDRESS=( PROTOCOL=tcp)(HOST=<HOST_NAME> )(PORT=<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\webui\ XXAPCashAndOtherLinesPG.xml -rootdir <JDEV_INSTALL_DIR>\jdevhome\ jdev\myprojects -username apps -password apps -dbconnection "(DESCRIPTION=(ADDRESS=( PROTOCOL=tcp)(HOST=<HOST_NAME> )(PORT=<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\webui\ XXAPItemizationDetailsPG.xml -rootdir <JDEV_INSTALL_DIR>\jdevhome\ jdev\myprojects -username apps -password apps -dbconnection "(DESCRIPTION=(ADDRESS=( PROTOCOL=tcp)(HOST=<HOST_NAME> )(PORT=<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\webui\ XXAPExpenseAllocationsPG.xml -rootdir <JDEV_INSTALL_DIR>\jdevhome\ jdev\myprojects -username apps -password apps -dbconnection "(DESCRIPTION=(ADDRESS=( PROTOCOL=tcp)(HOST=<HOST_NAME> )(PORT=<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\webui\ XXAPExpenseAllocationDetailPG. xml -rootdir <JDEV_INSTALL_DIR>\jdevhome\ jdev\myprojects -username apps -password apps -dbconnection "(DESCRIPTION=(ADDRESS=( PROTOCOL=tcp)(HOST=<HOST_NAME> )(PORT=<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\webui\ XXAPExpenseDetailsPG.xml -rootdir <JDEV_INSTALL_DIR>\jdevhome\ jdev\myprojects -username apps -password apps -dbconnection "(DESCRIPTION=(ADDRESS=( PROTOCOL=tcp)(HOST=<HOST_NAME> )(PORT=<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\webui\ XXAPConfirmationPG.xml-rootdir <JDEV_INSTALL_DIR>\jdevhome\ jdev\myprojects -username apps -password apps -dbconnection "(DESCRIPTION=(ADDRESS=( PROTOCOL=tcp)(HOST=<HOST_NAME> )(PORT=<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\webui\ XXAPReadOnlyDetailsPG.xml- rootdir <JDEV_INSTALL_DIR>\jdevhome\ jdev\myprojects -username apps -password apps -dbconnection "(DESCRIPTION=(ADDRESS=( PROTOCOL=tcp)(HOST=<HOST_NAME> )(PORT=<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\webui\ XXAPFinalReviewPG.xml-rootdir <JDEV_INSTALL_DIR>\jdevhome\ jdev\myprojects -username apps -password apps -dbconnection "(DESCRIPTION=(ADDRESS=( PROTOCOL=tcp)(HOST=<HOST_NAME> )(PORT=<PORT_NUMBER>))( CONNECT_DATA=(SID=<SID_NAME>)) )" -mmddir <JDEV_INSTALL_DIR>\jdevhome\ jdev\myclasses\JRADXML
· 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>))( CONNECT_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=OIE_ EXPENSE_REPORT_SEARCH) with the custom path OA.jsp?page=/xxsai/oracle/ apps/ap/oie/webui/ XXAPGeneralInformationPG&OASF= OIE_EXPENSE_REPORT_SEARCH)
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= OIE_EXPENSE_REPORT_SEARCH
8. Bounce the apache server.
2. Project and Task Numbers are Mandatory
Basic Business Needs
Process flow
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.
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
2.2 After Customization
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:
2.3 How to achieve this Functionality using OAF Customization:
To achieve the requirement customizations needs to be done for below objects
1. HeaderCO, CreditCardLinesCO, CashAndOtherCO, and CashAndOtherListCO
2. PurposeLookupVO
3. CreditCardLinesPG and CashAndOtherLinesPG
Note:
Identification of the CO’s, VO’s and Page and Creation of CO, VO and PG
was already discussed in the previous requirement. (Refer 1.7, 1.9)
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.
Ø 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.
Ø 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.
Ø 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 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))( CONNECT_DATA=(SID=<SID_NAME>)) )"
Ø 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.
OA Framework Objects
Create Custom VO (XXAPPurposeLookupVO)
Process Field | Value | Notes |
Name | XXAPPurposeLookupVO | |
Package | xxsai.oracle.apps.ap.oie. |
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'
Lookup Definitions:
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.
Following are the lookup definitions for the Project and Task Number Mandatory requirement
Lookups
| ||||
Type
|
RELOCATION_ER_TEMPLATE
| |||
Meaning
|
Relocation ER Template
| |||
Application
|
East Oracle Internet Expenses
| |||
Description
|
Relocation ER Template
| |||
Values
| ||||
Code
|
Meaning
|
Description
| ||
RELOCATION-HOME PURCHASE
|
Relocation-Home Purchase
|
Optional
| ||
RELOCATION-HOME SALE
|
Relocation-Home Sale
|
Optional
| ||
RELOCATION-HOUSEHOLD
|
Relocation-Household Moving Expenses
|
Optional
| ||
RELOCATION-HOUSEHUNTING
|
Relocation-Househunting
|
Optional
| ||
RELOCATION-IN-TRANSIT
|
Relocation-In-Transit (Final Trip)
|
Optional
| ||
RELOCATION-INTERIM LIVING
|
Relocation-Interim Living
|
Optional
| ||
RELOCATION-RENTAL/LEASE
|
Relocation-Rental/Lease Expenses
|
Optional
| ||
RELOCATION-SETTLING-IN/MISC
|
Relocation-Settling-in/Misc Expenses
|
Optional
| ||
Lookups
| ||||
Type
|
SEOIE_REGULAR-_ER_TEMPLATE
| |||
Meaning
|
Regular ER Template
| |||
Application
|
East Oracle Internet Expenses
| |||
Description
|
Regular ER Template
| |||
Values
| ||||
Code
|
Meaning
|
Description
| ||
CUSTOMER VISITS
|
Customer Visits
|
Optional
| ||
DEALER VISITS
|
Dealer Visits
|
Optional
| ||
EMPLOYEE RECOGNITION
|
Employee Recognition
|
Optional
| ||
EVENTS
|
Events
|
Mandatory
| ||
FIELD CALLS
|
Field Calls
|
Optional
| ||
INTERVIEW EXPENSES
|
Interview Expenses
|
Optional
| ||
MEDIA RELATIONS
|
Media Relations
|
Optional
| ||
MEETING
|
Meeting
|
Optional
| ||
NATIONALSALES CONFERENCE
|
National Sales Conference
|
Mandatory
| ||
OFFICE EXPENSES
|
Office Expenses
|
Optional
| ||
OPEN HOUSE
|
Open House
|
Mandatory
| ||
OTHER
|
Other
|
Optional
| ||
OTHER CONVENTIONS
|
Other Conventions
|
Mandatory
| ||
OUTLETPHYSICAL INVENTORY
|
Outlet Physical Inventory
|
Optional
| ||
OUTLET VISITATION
|
Outlet Visitation
|
Optional
| ||
PUBLIC RELATIONS
|
Public Relations
|
Optional
| ||
RECRUITING
|
Recruiting
|
Optional
| ||
SALES CALLS
|
Sales Calls
|
Optional
| ||
TECHNICAL SUPPORT
|
Technical Support
|
Optional
| ||
TELEPHONE - HOME OFFICE
|
Telephone - Home Office
|
Optional
| ||
TELEPHONE - MOBILE
|
Telephone - Mobile
|
Optional
| ||
TRADE SHOW
|
Trade Show
|
Mandatory
| ||
TRAINING
|
Training
|
Optional
| ||
VARIOUS
|
Various
|
Optional
| ||
2.5 Program logic in XXAPHeaderCO
The same logic has to be incorporated in the following CO’s for this requirement:
XXAPCashAndOtherCO
XXAPCreditCardLinesCO
XXAPCashAndOtherListCO
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);
2.6 Setup
Installation Steps
The
following modules comprise the implementation set for the Project and
Task Number are mandatory for Specific Business Purposes Process.
Deployment Files
|
FTP Type
|
Target Location
|
XXAPCreditCardLinesPG.xml
|
ASCII
|
/xxsai/oracle/apps/ap/oie/
|
XXAPCreditCardLinesCO.class
|
BIN
|
/ xxsai /oracle/apps/ap/oie/server
|
XXAPCashAndOtherLinesPG.xml
|
ASCII
|
/ xxsai /oracle/apps/ap/oie/webui
|
XXAPCashAndOtherCO.class
|
BIN
|
/ xxsai /oracle/apps/ap/oie/server
|
XXAPExpenseReportHeaderEO.
|
BIN
|
/ xxsai /oracle/apps/ap/oie/server
|
XXAPPurposeLookupVO.xml
|
ASCII
|
/ xxsai /oracle/apps/ap/oie/webui
|
XXAPPurposeLookupVOImpl.class
|
BIN
|
/ xxsai /oracle/apps/ap/oie/server
|
XXAPPurposeLookupVORowImpl.
|
BIN
|
/ xxsai /oracle/apps/ap/oie/server
|
1. Install JDeveloper in your local machine and copy the final folder delivered into <JDEV_INSTALL_DIR>\jdevhome\ jdev\myprojects and <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. 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_NUMBER))( CONNECT_DATA=(SID=<SID_NAME>)) )"
· <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_ NAME>)(PORT=<PORT_NUMBER))( CONNECT_DATA=(SID=<SID_NAME>)) )"
· <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_NUMBER))( 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= (PROTOCOL=tcp)(HOST=<HOST_ NAME>)(PORT=<PORT_NUMBER>))( CONNECT_DATA=(SID=<SID NAME>)))"
7. Change the HTML call of the function OIEENTRYFLOW (OA.jsp?page=/oracle/apps/ap/ oie/entry/header/webui/ GeneralInformationPG&OASF=OIE_ EXPENSE_REPORT_SEARCH) with the custom path OA.jsp?page=/xxsai/oracle/ apps/ap/oie/webui/ XXAPGeneralInformationPG&OASF= 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&OASF= OIE_EXPENSE_REPORT_SEARCH
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.
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.
Employee enters an expense report using a template.
Process flow
Employee enters an expense report using a template.
|
3.1 Before Customization
Capital Project (20985)
3.2 After Customization
Only Indirect Projects are displayed.
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:
Click on Project Number LoV
Program Logic:
The whole process follows the following sequence.
Ø Create a Custom BC4J Package (xxsai.oracle.apps.ap.oie. server).
Ø 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.
Ø 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)
Ø 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>))( CONNECT_DATA=(SID=<SID_NAME>)) )"
Ø Profile options “Personalize Self-service Defn” (FND_CUSTOM_OA_DEFINTION) and“FND: PersonalizationRegionLinkEnabl ed” (FND_PERSONALIZATION_REGION_ LINK_ENABLED) should be set to ‘Yes’.
Ø Bounce the apache server.
Ø Disable the profile options related to Personalization.
3.3 Steps to extend the VO
Open the Standard VO from Jdeveloper.
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
Paste the Query at Query Statement
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
AND P.PROJECT_TYPE_CLASS_CODE=' INDIRECT'
As per the requirement the LOV should display only INDIRECT Projects
For the substitution of VO (Refer 1.8)
OA Framework Objects
1. Extended VO (XXAPProjectsLovVO)
Process Field | Value | Notes |
Name | XXAPProjectsLovVO | |
Package | xxsai.oracle.apps.ap.oie. | |
Extends View Object | ProjectsLovVO |
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 | Notes |
Available | ProjectsLovVO | |
Substitution | XXAPProjectsLovVO |
3.4 Setup
Installation steps
The following modules comprise the implementation set for the Adding the Expense Report Template Description Process.
Deployment Files
|
FTP Type
|
Target Location
|
XXAPProjectsLovVO.xml
|
ASCII
|
/xxsai/oracle/apps/ap/oie/
|
XXAPProjectsLovVOImpl.class
|
BIN
|
/xxsai/oracle/apps/ap/oie/
|
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. 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>))( CONNECT_DATA=(SID=<SID_NAME>)) )"
5. Change the HTML call of the function OIEENTRYFLOW (OA.jsp?page=/oracle/apps/ap/ oie/entry/header/webui/ GeneralInformationPG&OASF=OIE_ EXPENSE_REPORT_SEARCH) with the custom path OA.jsp?page=/xxsai/oracle/ apps/ap/oie/webui/ XXAPGeneralInformationPG&OASF= OIE_EXPENSE_REPORT_SEARCH)
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= OIE_EXPENSE_REPORT_SEARCH
6. Bounce the apache server.
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.
Process flow
Employee enters an expense report and enters the project number and task number at the header level.
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.
Employee enters an expense report and enters the project number and task number at the header level.
|
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.
|
4.1 Before Customization
4.2 After Customization
Project and Task Numbers are defaulted from the Header Information
Task Number should be Mandatory for the Business Purpose Events at Header level.
4.3 How to achieve this Functionality using OAF Customization:
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.
Ø Create
a new custom Page XXAPCashAndOtherLinesPG.xml in package
xxsai.oracle.apps.ap.oie.webui and copy the code from existing page
CashAndOtherLinesPG.xml.
Ø 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.
Ø 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 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>))( CONNECT_DATA=(SID=<SID_NAME>)) )"
Ø 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.
Partial Page Rendering (PPR):
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.
1. Select Date (Here we are creating PPR on date only) field in Structure panel and give the Event in Property panel.
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);
}
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);
}
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)
{
receiptBasedLinesVORowImpl. setProjectNumber( projectNumber);
receiptBasedLinesVORowImpl. setTaskNumber(taskNumber);
}
}
}
}
}catch(Exception e)
{
System.out.println("Exception :"+e.getMessage());
}
}
}
The same which is applicable for remaning Methods
ie defaultForPerDiem( OAPageContext pageContext,int calledFrom)
defaultForMileage( OAPageContext pageContext,int calledFrom)
4.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
|
Target Location
|
XXAPCreditCardLinesPG.xml
|
ASCII
|
/xxsai/oracle/apps/ap/oie/
|
XXAPCashAndOtherLinesCO.class
|
BIN
|
/xxsai/oracle/apps/ap/oie/
|
XXAPCashAndOtherLinesPG.xml
|
ASCII
|
/xxsai/oracle/apps/ap/oie/
|
XXAPCashAndOtherCO.class
|
BIN
|
/xxsai/oracle/apps/ap/oie/
|
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. Import the .xml file into the data base
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= (PROTOCOL=tcp)(HOST=<HOST_ NAME>)(PORT=<PORT_NUMBER>))( CONNECT_DATA=(SID=<SID_NAME>)) )"
7. Change the HTML call of the function OIEENTRYFLOW (OA.jsp?page=/oracle/apps/ap/ oie/entry/header/webui/ GeneralInformationPG&OASF=OIE_ EXPENSE_REPORT_SEARCH) with the custom path OA.jsp?page=/xxsai/oracle/ apps/ap/oie/webui/ XXAPGeneralInformationPG&OASF= 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&OASF= OIE_EXPENSE_REPORT_SEARCH
9. Bounce the apache server.
5. Capture Attendee Information
While
entering expense reports for expense type like Meals at Meetings-3rd
parties to which ‘expense type data rule’ functionality is attached,
then business can capture additional information for the attendees or
recipients (both for employees and non-employees).
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
Employee enters expense report for certain Expense Types
Process flow
Employee enters expense report for certain Expense Types
|
| |||||
5.1 Before Customization
5.2 After Customization
After the Customization Title displaying from the attribute5
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:
Program Logic
The whole process follows the following sequence:
Ø Create a Custom BC4J Package (xxsai.oracle.apps.ap.oie. server).
Ø Create new Custom View Object XXAPAllEmployeesVO in custom BC4J package (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.
Ø 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.
Ø 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>))( CONNECT_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=< SID_NAME>)))"
Ø 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.
OA Framework Objects
1. Create Custom VO (XXAPAllEmployeeVO)
Process Field | Value | Notes |
Name | XXAPAllEmployeeVO | |
Package | xxsai.oracle.apps.ap.oie. |
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 | Notes |
Available | AllEmployeeVO | |
Substitution | XXAPAllEmployeeVO |
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:
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'.
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
|
Target Location
|
XXAPAllEmployeesAM.xml
|
ASCII
|
/xxsai/oracle/apps/ap/oie/
|
XXAPAllEmployeesAMImpl.class
|
BIN
|
/xxsai/oracle/apps/ap/oie/
|
XXAPAllEmployeesVO.xml
|
ASCII
|
/xxsai/oracle/apps/ap/oie/
|
XXAPAllEmployeesVOImpl.class
|
BIN
|
/xxsai/oracle/apps/ap/oie/
|
XXAPAllEmployeesLovRN.xml
|
BIN
|
/xxsai/oracle/apps/ap/oie/
|
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. Import the .xml file into the data base
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= (PROTOCOL=tcp)(HOST=<HOST- NAME>)(PORT=<PORT-NUMBER>))( CONNECT_DATA=(SID=<SID_NAME>)) )"
7. Change the HTML call of the function OIEENTRYFLOW (OA.jsp?page=/oracle/apps/ap/ oie/entry/header/webui/ GeneralInformationPG&OASF=OIE_ EXPENSE_REPORT_SEARCH) with the custom path OA.jsp?page=/xxsai/oracle/ apps/ap/oie/webui/ XXAPGeneralInformationPG&OASF= 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&OASF= OIE_EXPENSE_REPORT_SEARCH
9. Bounce the apache server.
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:
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)
b. Airline Class of Service is not Coach, Flight Type is International and employee band is lower than D1
The
Expense Report line details page should be customized in such a way
that when the expense report is entered claiming the Airfare expense and
above conditions are satisfied then Justification field should be
become mandatory. The DFF attributes at expense report line level
details will be used to capture the values for ‘Airline Class of
Service’ and ‘Flight Type’ for expense type: Airfare. The employee band
information will be taken from custom table: SECPI_USER_DATA.
Process Flow
|
|
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.
6.1 Before Customization
6.2 After Customization
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:
Program Logic
The whole process follows the following sequence:
Ø Create a Custom BC4J Package (xxsai.oracle.apps.ap.oie. server).
Ø Create a new Custom View Object XXAPEmpFirstClassVO in custom BC4J package (xxsai.oracle.apps.ap.oie. server) for identifying the employees who don’t require the justification.
Ø Create a new Custom View Object XXAPEmpBandVO in custom BC4J package (xxsai.oracle.apps.ap.oie. server) for identifying the Band information.
Ø Create a new Custom View Object XXAPBandInfoVO in custom BC4J package (xxsai.oracle.apps.ap.oie. server) for identifying the Band Details.
Ø 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.
OA Framework Objects
1. Create Custom VO (XXAPEmpFirstClassVO)
Process Field | Value | Notes |
Name | XXAPEmpFirstClassVO | |
Package | xxsai.oracle.apps.ap.oie. |
2. Create Custom VO (XXAPEmpBandVO)
Process Field | Value | Notes |
Name | XXAPEmpBandVO | |
Package | xxsai.oracle.apps.ap.oie. |
3. Create Custom VO (XXAPBandInfoVO)
Process Field | Value | Notes |
Name | XXAPBandInfoVO | |
Package | xxsai.oracle.apps.ap.oie. |
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).
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).
Query for XXAPBandInfoVO is:
SELECT
lookup_code, meaning BandInfo from fnd_lookup_values
WHERE
lookup_type='SEOIE_BAND_ INFORMATION'
and language='US'
6.4 Lookups for this Requirement
Define
the Lookups for Airfare Class of Service: The lookup code definition
has defined for the employees whose not required the justification.
Lookups
| ||||
Type
|
SEOIE_EMPLOYEE_FIRST_CLASS
| |||
Meaning
|
Airline Class of Service
| |||
Application
|
East Oracle Internet Expenses
| |||
Description
|
Airline Class of Service
| |||
Values
| ||||
Code
|
Meaning
|
Description
| ||
GLASGOW,STANFORD L
|
55673
|
Y
| ||
HIDEKI KOMIYAMA
|
23360
|
Y
| ||
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.
Lookups
| ||
Type
|
SEOIE_BAND_INFORMATION
| |
Meaning
|
SEOIE_BAND_INFORMATION
| |
Application
|
East Oracle Internet Expenses
| |
Description
|
Airline Class of Service
| |
Values
| ||
Code
|
Meaning
| |
BAND A
|
A
| |
BAND B
|
B
| |
BAND C
|
C
|
6.5 Logic to Implement in XXAPDetailMainCO
//This method which contains the Justification mandatory for given conditionspublic void validateJustification(
String expenseTemplateReportType=
int i=0;
String context = null;
String classCode = null;
String justfication = null;
String flight_type=null;
WebExpensesAMImpl am1 = (WebExpensesAMImpl)
ExpenseReportHeadersVOImpl expenseReportHeaderVO = am1.getExpenseReportHeadersVO(
ExpenseReportHeadersVORowImpl expenseReportHeaderROW = (
Number employeeID = expenseReportHeaderROW.
Number expensereportid=
int count=0;
DetailReceiptBasedVORowImpl row=null;
try{
DetailAMImpl detailAMImpl = (DetailAMImpl)pageContext.
DetailReceiptBasedVOImpl vo = (DetailReceiptBasedVOImpl)
row = (DetailReceiptBasedVORowImpl)
context = row.getAttributeCategory();
classCode = row.getAttribute8();
justfication = row.getJustification();
flight_type=row.
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"))
if(xxapExpenseTemplateVo == null){
xxapExpenseTemplateVo = (XXAPExpenseTemplatesVOImpl)
if(xxapExpenseTemplateVo == null){
xxapExpenseTemplateVo = (XXAPExpenseTemplatesVOImpl)
if(xxapExpenseTemplateVo!= null){
xxapExpenseTemplateVo.
String query = xxapExpenseTemplateVo.
xxapExpenseTemplateVo.
Row xxapExpenseTemplateVoRow = null;
if((xxapExpenseTemplateVoRow = xxapExpenseTemplateVo.next()) != null){
expenseTemplateReportType = (String)
if (("Regular ER Template".equalsIgnoreCase(
//This VO which contains the all First Class Employee details.
if(xxapEmpFirstClassVO == null){
xxapEmpFirstClassVO = (XXAPEmpFirstClassVOImpl)am1.
if(xxapEmpFirstClassVO == null){
xxapEmpFirstClassVO = (XXAPEmpFirstClassVOImpl)am1.
if(xxapEmpFirstClassVO != null){
xxapEmpFirstClassVO.
String query = xxapEmpFirstClassVO.getQuery()
xxapEmpFirstClassVO.
Row xxapEmpFirstClassVORow = null;
i=xxapEmpFirstClassVO.
if(classCode!= null){
//Here the condition will check wheather the ClassCode is First then the Justficiation is must otherwise Throw Exception
if((classCode.
if(justfication != null){}
else{
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
|
FTP Type
|
Target Location
|
XXAPEmpBandVO.xml
|
ASCII
|
/xxsai/oracle/apps/ap/oie/
|
XXAPEmpFirstClassVO.xml
|
ASCII
|
/ xxsai /oracle/apps/ap/oie/webui
|
XXAPEmpBandVORowImpl.class
|
BIN
|
/ xxsai /oracle/apps/ap/oie/server
|
XXAPEmpBandVOImpl.class
|
BIN
|
/ xxsai /oracle/apps/ap/oie/server
|
XXAPEmpFirstClassVORowImpl.
|
BIN
|
/ xxsai /oracle/apps/ap/oie/server
|
XXAPEmpFirstClassVOImpl.class
|
BIN
|
/ xxsai /oracle/apps/ap/oie/server
|
1. Install JDeveloper in your local machine and copy the final folder delivered into <JDEV_INSTALL_DIR>\jdevhome\ jdev\myprojects and <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=OIE_ EXPENSE_REPORT_SEARCH) with the custom path OA.jsp?page=/xxsai/oracle/ apps/ap/oie/webui/ XXAPGeneralInformationPG&OASF= OIE_EXPENSE_REPORT_SEARCH)
5. Bounce the apache server.
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.
Example
The
credit card transaction details of Expense Category ‘Airline’ like
Airline Booking Agent, Departure City, Destination City etc.. will be
defaulted to respective ER line DFF Attributes columns ATTRIBUTE3,
ATTRIBUTE4, ATTRIBUTE10 (Which are mapped to Airline Booking Agent,
Departure City, and Destination City in DFF definition)
Basic Business Needs
The additional Credit Card Transaction details should be captured on Credit Card Expense Entry Details Screen.
Process Flow
7.1 Before Customization
7.2 After Customization
7.3 How We Achieve this Requirement Using OAF:
This
functionality of customization required to default additional Credit
Card Transaction details to Expense Report Line DFF fields. A brief
summary of the strategy appears below:
After analyzing the ExpenseDetailsPG, Customization is required for
1. XXAPExpenseDetailsPG
2. XXAPDetailsMainCO
3. XXAPAirClassCodeVO
Note: Creation of VO, CO and Page will be discussed in the 1st requirement.
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 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.
Ø 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\ XXAPCashAndOtherLinesPG.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>)) )"
Ø 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>)) )"
Ø 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.
OA Framework Objects
1. Set New Controller((XXAPDetailMainCO) Object on XXAPExpenseDetailPG Page
Process Field | Value | Notes |
Name | XXAPDetailMainCO | |
Package | xxsai.oracle.apps.ap.oie.webui | |
Region | OIEDetails | |
Extends Controller Object | DetailMainCO |
2. Create Custom VO (XXAPAirfareClassCodesVO)
Process Field | Value | Notes |
Name | XXAPAirfareClassCodesVO | |
Package | xxsai.oracle.apps.ap.oie. |
Query for XXAPAirfareClassCodesVO is:
SELECT
lookup_code AirfareClassCode,
Description ClassType
FROM
fnd_lookup_values
WHERE
lookup_type='SEOIE_AIRFARE_ CLASS_CODES'
The Lookup code definition has defined for the Airline class of service codes
7.4 Logic to implement in XXAPDetailMainCO
//this is the method which is used to default some fileds in detail page.
public void defaultCreditInformation( OAPageContext pageContext,OAWebBean webBean)
{
WebExpensesAMImpl am1= (WebExpensesAMImpl) pageContext. getRootApplicationModule();
DetailAMImpl detailAMImpl = (DetailAMImpl)pageContext. getApplicationModule(webBean);
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());
if(context==null && expenseType1 != null){
row.setAttributeCategory( expenseType1);
context = row.getAttributeCategory();}
if(xxapCCTransactionVo == null){
xxapCCTransactionVo = ( XXAPCreditCardTransactionsVOIm pl)am1.findViewObject(" XXAPCreditCardTransactionsVO") ;
if(xxapCCTransactionVo == null){
xxapCCTransactionVo=( XXAPCreditCardTransactionsVOIm pl)am1.createViewObject(" XXAPCreditCardTransactionsVO", "xxsai.oracle.apps.ap.oie. server. XXAPCreditCardTransactionsVO") ;}}
if(xxapCCTransactionVo != null){
xxapCCTransactionVo. setWhereClause("TRX_ID ="+transactionId);
String query=xxapCCTransactionVo. getQuery();
xxapCCTransactionVo. executeQuery();
XXAPCreditCardTransactionsVORo wImpl xxapCCTransactionsVoRow=null;
if((xxapCCTransactionsVoRow = ( XXAPCreditCardTransactionsVORo wImpl)xxapCCTransactionVo. next())!=null)
{
Number trxId=xxapCCTransactionsVoRow. getTrxId();
if(("Airfare". equalsIgnoreCase(context))||(" IHR.Airfare".equalsIgnoreCase( context))||("Relo.Airfare". equalsIgnoreCase(context)))
{
String destCity= xxapCCTransactionsVoRow. getAirarrival();
Date dirDepartDate= xxapCCTransactionsVoRow. getAirdepdate();
String bookingAgent= xxapCCTransactionsVoRow. getAirticketissue();
String departCity= xxapCCTransactionsVoRow. getAirdepcity();
String dDate=null;
String sDate=null;
try{
if(dirDepartDate !=null){
dDate=dirDepartDate.toString() ;
sDate=dateMethod(dDate);
row.setAttribute10(sDate); }
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){
System.out.println(" Destination city is null");}
try{
if(bookingAgent!=null){
row.setAttribute5( bookingAgent); }}
catch(Exception e){
try{
if(departCity!=null){
row.setAttribute3(departCity); }}
catch(Exception e){
String classCode= xxapCCTransactionsVoRow. getAirserclass ();
if(classCode!=null){
try{
char c=classCode.charAt(0);
if(xxapAirfareClassCodesvo == null){
xxapAirfareClassCodesvo = (XXAPAirfareClassCodesVOImpl) am1.findViewObject(" XXAPAirfareClassCodesVO");
if(xxapAirfareClassCodesvo == null){
xxapAirfareClassCodesvo=( XXAPAirfareClassCodesVOImpl) am1.createViewObject(" XXAPAirfareClassCodesVO"," xxsai.oracle.apps.ap.oie. server. XXAPAirfareClassCodesVO");}}
if(xxapAirfareClassCodesvo != null){
xxapAirfareClassCodesvo. setWhereClause(" AirfareClassCode='"+c+"'");
String query1= xxapAirfareClassCodesvo. getQuery();
xxapAirfareClassCodesvo. executeQuery();
int count=xxapAirfareClassCodesvo. getRowCount();
if(count!=0){
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"); }}}
else{
row.setAttribute8("Coach");}}}
catch(Exception e)
{
System.out.println ("Exception was raised");}}
else{
System.out.println ("class code is null");}}
The same logic is applicable for the Context “CarRental “,”Loding-Room Charges” and “Loding-Room Tax”
7.5 Setup
Installation Steps
The Lookup code definition has defined for the Airline class of service codes
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.
Lookups
| ||||
Type
|
SEOIE_AIRFARE_CLASS_CODES
| |||
Meaning
|
Airline Class Of Service Codes
| |||
Application
|
East Oracle Internet Expenses
| |||
Description
| ||||
Values
| ||||
Code
|
Meaning
|
Description
| ||
A
|
A
|
First
| ||
C
|
C
|
Business
| ||
D
|
D
|
Business
| ||
F
|
F
|
First
| ||
J
|
J
|
Business
| ||
P
|
P
|
First
| ||
The following modules comprise the implementation set for the Defaulting Additional CC details to ER Line DFF Process.
Deployment Files
|
FTP Type
|
Target Location
|
XXAPCreditCardLinesPG.xml
|
ASCII
|
/xxsai/oracle/apps/ap/oie/
|
XXAPCashAndOtherListPG.xml
|
ASCII
|
/xxsai/oracle/apps/ap/oie/
|
XXAPCashAndOtherCO.class
|
BIN
|
/xxsai/oracle/apps/ap/oie/
|
XXAPCreditCardLinesCO.class
|
BIN
|
/xxsai/oracle/apps/ap/oie/
|
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)
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
e. Change the HTML call of the function OIEENTRYFLOW (OA.jsp?page=/oracle/apps/ap/ oie/entry/header/webui/ GeneralInformationPG&OASF=OIE_ EXPENSE_REPORT_SEARCH) with the custom path OA.jsp?page=/xxsai/oracle/ apps/ap/oie/webui/ XXAPGeneralInformationPG&OASF= 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/ XXAPGeneralInformationPG&OASF= OIE_EXPENSE_REPORT_SEARCH
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.
Process
8.1 Before Customization
8.2 After Customization
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:
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.
Ø Disable the profile options related to Personalization.
OA Framework Objects
1. Set New Controller(XXAPDetailMainCO) Object on XXAPExpenseDetailPG Page
Process Field | Value | Notes |
Name | XXAPCreditCardLinesCO | |
Package | xxsai.oracle.apps.ap.oie.webui | |
Region | OIECreditCardExpense | |
Extends Controller Object | CreditCardLinesCO |
2. Create Custom VO (XXAPCCTransactionVO) (Refer 1.7,1.9)
Process Field | Value | Notes |
Name | XXAPCCTransactionVO | |
Package | xxsai.oracle.apps.ap.oie. |
Query for XXAPCCtransactionVO is:
SELECT
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,
Hotel_Room_Rate Hotelroomrate,
Air_Service_Class Airserclass,
mis_industry_code amexlatefeecode
FROM
AP_CREDIT_CARD_TRXNS_ALL
8.4 Logic for this Customization in XXAPCCTransactionVO
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();
XXAPCreditCardTransactionsVORo wImpl xxapCCTransactionsVoRow=null;
if((xxapCCTransactionsVoRow = ( XXAPCreditCardTransactionsVORo wImpl)xxapCCTransactionVo. next())!=null)
{
Number trxId=xxapCCTransactionsVoRow. getTrxId();
String amexLatefeeType= xxapCCTransactionsVoRow. getAmexlatefeecode();
if(amexLatefeeType!=null)
{
if(amexLatefeeType. equalsIgnoreCase("DC"))
{
String error = "Line "+j+" Error: ";
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);}
8.5 Setup
Installation Steps
The following modules comprise the implementation set for the AMEX Late Fee Transactions.
Deployment Files
|
FTP Type
|
Target Location
|
XXAPCreditCardTranscatiosVO.
|
ASCII
|
/xxsai/oracle/apps/ap/oie/
|
XXAPCashAndOtherCO.class
|
BIN
|
/xxsai/oracle/apps/ap/oie/
|
XXAPCreditCardLinesCO.class
|
BIN
|
/xxsai/oracle/apps/ap/oie/
|
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=OIE_ EXPENSE_REPORT_SEARCH) with the custom path OA.jsp?page=/xxsai/oracle/ apps/ap/oie/webui/ XXAPGeneralInformationPG&OASF= OIE_EXPENSE_REPORT_SEARCH)
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= OIE_EXPENSE_REPORT_SEARCH
6. Bounce the apache server.
6 comments:
Extremely useful post! Just can you update the image links? None of them seem to be loading.
All your image URLs point to gmail attachments, can you please host them yourself so we can actually see them?
I am not able to see the images...can you please help me how to view them
Hello...,
If you are unable view the images or content of the post, please send an Email to "oracleapps88@yahoo.com" with mentioning name of the post.
Thanks,
Raju
@Ransico : Please let me know the process how to do.
Thanks,
Raju
Thanks for your work. Its very much helpful.
Please update the images. Its not opening.
Post a Comment