Tuesday, September 17, 2019

AutoLockbox in AR(Account Receivables)

Introduction :

AutoLockBox is a Service that commercial banks  offer corporate customers to enable them to outsource there account receivable Payment Processing.

AutoLockBox eliminates Manual Data Entry By Automatically Processing Receipts That are sent directly to your bank. you can also use AutoLockBox for Historical data conversion.

For Example, You can use AutoLockBox to transfer receipts from your previous accounting system into Receivable.

AutoLockBox ensures that the receipts are accurate and Valid before transferring them into receivables.

AutoLockBox is a Three Step Process:


  1. Import:  During this step , Lock box reads and formats the data from your bank file into interface table AR_PAYMENT_INTERFACE_ALL by using SQL*Loader script.
  2. Validation: The validation program checks data in this interface table for compatibility with receivables.once validated , the data is transferred into QuickCash tables (AR_INTERIM_CASH_RECEIPTS_ALL & AR_INTERIM_CASH_RCPT_LINES_ALL). at this point , you can optionally query your receipts in the Quick Cash Window and change how they will be applied before submitting the final step , post QuickCash.
  3. Post QuickCash:  this steps applies the receipts and updates your customer balances.
these steps can be submitted individually or at the same time from the submit lockbox processing window.


Responsibility : Receivable Manager
Navigation: Interface --> LockBox

After you run post QuickCash, Receivables treats the receipts like any other receipts, 
you can reverse and reapply them and apply any unapplied , unidentified , or on-account amounts.

Importing Data from the Data File Provided by Bank



Setups:

Define Bank & Bank Branches:

Define Internet Remittance Bank and Bank Branch where checks from  customers are deposited.
This is the bank which send s the Data file for Lock box transmission.

Responsibility : Cash Management Manager
Navigation : Setup-->Banks-->Banks



Remittance Bank Account
Define Internal Bank Account

Responsibility : Cash Management Manager
Navigation: Setup-->Bank-->Bank Accounts

  1. Enter the bank account owner (the legal entity that owns the account) and use (the types of function that this bank account is going to be used for : Payable , Payroll , Receivables , or Treasury or all.
  2. Enter the Bank Account Information.
  3. Enter Account Controls. a cash account is required.
  4. Enter Account Access and contacts as required.


Define Receipt Classes

Define Receipt classes to determine the required processing steps for receipts to which you assign payment methods with this class.
Enter the Payment Method to assign to this receipt class.


Assign Bank Account To Payment Method

Receivables uses payment methods to account for the receipt entries. 
One can assign multiple banks to each payment method, but only one bank account can be primary account for each currency.
Assign the payment method to the customer against whose invoice the receipt is going to be applied to.

Responsibility: Receivables Manager
Navigation: Setup > Receipts > Receipt Classes




Define Receipt Source

Define receipt batch sources and assign the receipt class, payment method, and remittance bank account fields to this source.
  • Receipt batch source type should be Manual.
  • Receipt batch sources can use either automatic or manual batch numbering. (Should be Automatic Batch numbering if to be used for LockBox process).
Responsibility: Receivables Manager
Navigation: Setup > Receipts > Receipt Sources



Define Lockbox 
Bank Tab

Responsibility: Receivables Manager
Navigation: Setup > Receipts > Lockboxes > Lockboxes > Bank Tab

Define Lockboxes to use the Receivables Autolockbox program
Select an operating unit.
Enter the lockbox Number provided by your bank.
Enter the receipt Batch Source for this lockbox. You must enter a batch source that uses automatic numbering. Receivables enters the bank name and account, address,
contact person, and accounting flexfield information associated with this batch source.
Enter the Bank Origination Number provided by your bank. This number uniquely identifies the bank branch that sends you lockbox information.



Receipts Tab

  • Enter the Batch Size you want the Lockbox Validation program to assign to each receipt batch.
  • Enter your GL Date Source. This can be 
    • Constant Date: Receivables uses the date you enter in the GL Date field of the Submit Lockbox Processing window. If you do not enter a date when you choose Constant Date, Receivables does not validate your data. If you choose this source and the lockbox transmission's deposit date is not defined, Receivables displays an error message indicating that you must define a deposit date to submit the lockbox.
    • Deposit Date: Receivables uses the date that your bank deposits your receipts.
    • Import Date: Receivables uses the date on which you import your receipts.
  • If you are using this lockbox to transfer foreign currency receipts and you did not specify exchange rate type in the bank file, enter an Exchange Rate Type.
  • Enter the Receipt Method to assign to this lockbox. The default is the receipt method associated with the receipt batch source you entered.
  • If you want AutoLockbox to be able to transfer receipts without billing locations into Receivables, uncheck the Require Billing Location check box. If this box is checked, AutoLockbox will only validate the receipt if the billing location is provided.
Choose a Match Receipts By method. (If Auto associate is set to Yes)

  • Transaction Number: Match receipts with transaction numbers.
  • Balance Forward Billing Number: Match receipts with balance forward billing numbers. To use this method, the customer must be enabled for balance forward billing.Lockbox uses the balance forward billing number to identify the customer. Post QuickCash then uses this customer's AutoCash Rule Set to determine how to apply the receipt to each invoice.
  • Sales Order: Lockbox uses this number to determine the corresponding invoice number.
  • Purchase Order: Lockbox uses this number to determine the corresponding invoice number.
  • Hook: Match receipts to any other type of matching number that is passed with this transmission.This is a custom matching method that you define. Lockbox uses this number to determine the corresponding invoice number.
Choose whether to Match on Corresponding Date for transactions in this Lockbox transmission.
  • Always: Always verify that the date for the transaction or other matched item is the same as the date specified in this transmission.
  • Duplicates Only: Only verify that the matching date and the specified date are the same if duplicate matching number were found and Lockbox needs to determine which is correct.
  • Never: Ignore the specified date. This is the default value.

Transactions Tab

  • If you do not want the Lockbox Validation program to use the debit item number to determine a customer, open the Transactions tabbed region, uncheck the AutoAssociate box. By default, the Lockbox Validation program uses an invoice or debit memo number to determine the customer with which the receipt should be associated (if there is no customer information or MICR number in your Lockbox transmission).
  • Auto Associate: Check the AutoAssociate check box.
         Note: Ensure that all invoices to which any single receipt will be applied belong to the same customer. And also ensure that the matching numbers within the transmission are unique

  • If using Oracle Trade Management, then select the Evaluate for Claim Eligibility check box if you want Lockbox to automatically create claims for eligible remittance lines.A remittance line's eligibility for claim creation depends on your system options setup.If you select this box but the remittance line is not eligible for claim creation, then Lockbox handles receipts according to the selection that you make in the next step.
  • Choose how Lockbox will handle Invalid Transaction Number: If the receipt record is associated with multiple invoices, but one of the invoices is invalid. Depending on how you set this option, Lockbox will:
    • Post Partial Amount as Unapplied: Apply the receipt to the valid transactions, then import the remaining receipt amount with a status of Unapplied.
    • Reject Entire Receipt: Do not import the receipt (it will remain in theAR_PAYMENTS_INTERFACE table).You need to edit the invalid record(s) in the Lockbox Transmission Data window, then resubmit the Validation step for the receipt before Lockbox can import it into Receivables interim tables.
  • Select the appropriate line level cash application option:
    • None: Receivables does not perform line level cash application for the Lockbox run.None is the default line level cash application option for new setups and migrated data.
    • Oracle Lease Management: Receivables calls Oracle Lease Management to resolve the matching numbers and populate the invoice, invoice lines, and actual amounts to be applied to the invoice lines.
    • Custom: Receivables calls a seeded custom program to resolve the matching numbers and populate the invoice, invoice lines, and the actual amounts to be applied to the invoice lines.


Define Transmission Format
Define the Transmission Format which Auto Lockbox uses when importing data into Receivables.

Responsibility: Receivables Manager
Navigation: Setup > Receipts > Lockboxes > Transmission Formats

Following are valid record types:

  • Batch Header: A Batch Header marks the beginning of a specific batch.Batch Headers usually contain information such as batch number, deposit date, and lockbox number.
  • Batch Trailer: A Batch Trailer marks the end of a specific batch.Batch Trailers usually contain information such as batch number, lockbox number, batch record count, and batch amount.
  • Lockbox Header: A Lockbox Header marks the beginning of a specific lockbox. Lockbox Headers usually contain information such as destination account and origination number.
  • Lockbox Trailer: A Lockbox Trailer marks the end of a specific lockbox. Lockbox Trailers usually contain information such as lockbox number, deposit date, lockbox amount, and lockbox record count.
  • Overflow Receipt: An Overflow Payment usually contains invoice information for a specific payment such as batch number, item number, sequence number, overflow indicator, invoice number, debit memo number, or chargeback number, and debit item amounts.Receivables combines the overflow and payment records to create a logical record to submit payment applications.
  • Receipt: A Payment usually contains information such as MICR number, batch number, item number, check number, and remittance amount.
  • Service Header: Service Header records contain general information about your transmission.
  • Transmission Header: A Transmission Header marks the beginning of a specific data file.Transmission Headers usually contain information such as destination account, origination number, deposit date, and deposit time.
  • Transmission Trailer: A Transmission Trailer marks the end of a specific data file.Transmission Trailers usually contain information such as total record count.

How to set custom top to AR Lock box CTL File instead of AR TOP?

Auto Lock box is a service that commercial banks offer corporate customers to enable them to outsource their accounts receivable payment processing.

Auto lock box eliminates manual data entry by automatically Processing receipts that are sent directly to your bank.

in order to load the bank files through oracle standard lock box process, oracle recommends only to keep that standard control file in $AR_TOP/12.0.0/BIN folder , but when we have custom control files , oracle will not suggest to keep it in  $AR_TOP/12.0.0/BIN  folder , because when DBA's do any patch update all custom files will go off.  solution where we can place custom control file in CUSTOM_TOP/12.0.0/BIN.

when we are passing a parameter value for a control file , if we give any control file name , program will search for given control file name directly in $AR_TOP/12.0.0/BIN so we need to divert to CUSTOM_TOP/12.0.0/BIN/Control_File_Name as per below screenshot.



Wednesday, September 11, 2019

PPR in OAF ?

PPR Stands for Partial Page rendering.

Which means that only a particular part of the page is refreshed and not the entire page.

PPR is a mechanism where in only the required part of the page is refreshed as against the whole page. The page objects fire the ?events? and accordingly the request is handled in the controller file

SPEL is the basic foundation of PPR in OA Framework.

PPR is used to change the contents of the page dynamically if certain events take place.
In this article I will explain the concepts of partial page rendering and its usage with SPEL in OA Framework.

What makes PPR so special?

By using Partial Page Rendering, the entire page is not refreshed.

Only the changed portion of the web page will be redrawn.

This reduces the network traffic and enhances the user experience.

Examples are :

Hiding Showing objects
Required/Optional
Disable/Enabled
Read Only Uneatable

While developing pages, we may face some scenarios where the requirement is to make
modifications on the current page itself, instead of navigating to different page.

Such as selecting an item from a choice list might result in modifications to other fields or clicking a
button to add a new row in table region and many more like these.

All these tasks can be performed by simply refreshing the page however this could result in
performance issues.

Another alternative is to use javaScript which will give faster results but implementing complex functions can be a tough job using javaScript.

UIX Framework provides a solution for this: Partial Page Rendering i.e. to re-render only
a limited portion of a page.

PPR is a three step process:

1) Partial page event

Partial page events are quite similar to full page events. However, there are two important differences between partial and full page events.

First, partial page events specify partial page rendering-specific event parameters which are not present on the full page event equivalents.



Real Time Example:

Method 1:

Let us try to implement partial page rendering for a text item.

If value of TextItem1 is null then TextItem2 will not be appeared on UI.


If value of TextItem1 is not null then TextItem2 will be appeared on UI.

Step 1: Create a New OA Workspace and Empty OA Project
File> New > General> Workspace Configured for Oracle Applications
File Name -- PPRProj
Project Name – PPRDemoProj
Default Package -- oracle.apps.fnd.pprdemo

Step 2: Create Application Module AM
PPRDemoProj right click > New > ADF Business Components > Application Module
Name -- PPRAM
Package -- oracle.apps.fnd.pprdemo.server
Check Application Module Class: PPRAMImpl Generate JavaFile(s)

Step 3: Create a PPRVO View Object
PPRDemoProj> New > ADF Business Components > View Objects
Name – PPRVO
Package – oracle.apps.fnd.pprdemo.server

In Attribute Page
Click on New button and create transient primary key attribute with the following properties:

Attribute-->Property
Name -->RowKey
Type -->Number
Updateable -->Always
Key Attribute--> (Checked)

Click New button again and create transient attribute with the following properties:

Attribute--> Property
Name--> TextItem2Render
Type--> Boolean
Updateable -->Always

Note – No Need to generate any JAVA files for PPRVO

Step 4: Add Your View Object to Root UI Application Module
Right click on PPRAM > Edit PPRAM > Data Model >
Select PPRVO in Available View Objects list and shuttle to Data Model list

Step 5: Create a OA components Page
PPRDemoProj right click > New > OA Components > Page
Name – PPRPG
Package -- oracle.apps.fnd.pprdemo.webui

Step 6: Modify the Page Layout (Top-level) Region
Attribute-->Property
ID -->PageLayoutRN
Region Style -->pageLayout
Form Property--> True
Auto Footer--> True
Window Title -->PPR Demo Window Title True
Title -->PPR Demo Page Header
AM Definition--> oracle.apps.fnd.pprdemo.server.PPRAM

Step 7: Create the Second Region (Main Content Region)
Right click on PageLayoutRN > New > Region
Attribute-->  Property
ID-->  MainRN
Region Style-->  messageComponentLayout

Step 8: Create Two Text Items
Create First messageTextItem --
Right click on MainRN > New > messageTextInput

Attribute Property
ID -->TextItem1
Region Style--> messageTextInput
Prompt Text--> Item1
Length--> 20
Disable Server Side Validation--> True
Disable Client Side Validation--> True
Action Type -->firePartialAction
Event--> TextItem1Change
Submit--> True

Note -- Disable Client Side Validation and Event property appears after you set the Action
Type property to firePartialAction

Create Second messageTextItem --
Select MainRN right click > New > messageTextInput

Attribute-->  Property
ID --> TextItem2
Region Style-->  messageTextInput
Prompt Text-->  Item2
Length-->  20
Rendered-->  ${oa.PPRVO1.TextItem2Render}

Step 9: Add Following code in PPRAMImpl.java

import oracle.apps.fnd.framework.OARow;
import oracle.apps.fnd.framework.OAViewObject;
import oracle.apps.fnd.framework.server.OAApplicationModuleImpl;
import oracle.apps.fnd.framework.server.OAViewObjectImpl;

public void handlePPRAction()
{
Number val = 1;
OAViewObject vo = (OAViewObject)findViewObject("PPRVO1");
if (vo != null)
{
if (vo.getFetchedRowCount() == 0)
{
vo.setMaxFetchSize(0);
vo.executeQuery();
vo.insertRow(vo.createRow());
OARow row = (OARow)vo.first();
row.setAttribute("RowKey", val);
row.setAttribute("TextItem2Render", Boolean.FALSE);
}
}
}

Step 10:  Implement Controller for Page
Select PageLayoutRN in Structure pane right click > Set New Controller
Package Name -- mahi.oracle.apps.fnd.pprdemo.webui

Class Name – PPRCO

Write following code in processFormRequest function of PPRCO Controller

import oracle.apps.fnd.framework.OARow;
import oracle.apps.fnd.framework.OAViewObject;
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);
PPRAMImpl am = (PPRAMImpl)pageContext.getApplicationModule(webBean);
am.invokeMethod("handlePPRAction");
}
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processFormRequest(pageContext, webBean);
PPRAMImpl am = (PPRAMImpl)pageContext.getApplicationModule(webBean);
OAViewObject vo = (OAViewObject)am.findViewObject("PPRVO1");
OARow row = (OARow)vo.getCurrentRow();
if ("TextItem1Change".equals(pageContext.getParameter(EVENT_PARAM)))
{
if (pageContext.getParameter("TextItem1").equals(""))
{
row.setAttribute("TextItem2Render", Boolean.FALSE);
}
else
{
row.setAttribute("TextItem2Render", Boolean.TRUE);
}
}
}


Step 11:  you have successfully finished. Run Your PPRPG page and Test Your
Work









QueryBean

QueryBean is used to execute and return the results of a query on behalf of the QueryPortlet Application.

What is JavaBean

JavaBean is an Object Oriented Programming interface that lets you build re-usable application or program buildings blocks called components that can be deployed in a network or any major operating system platform.

I have extended VO and Now i wish to locally test that extention in Jdeveloper ? is that possible without loading the JPX file into the DB?

it is possible. because in local jdeveloper it has its own mds where it stores these information,

How do you load XML Page developed from using jDeveloper ?

through XML Importer.

Tell Two different Methods you can use to get the XML Files of Standard OAFramework Pages ?

One is from APPL_TOP through file system and can also download from MDS  database.

What is the Sequence of personalization override in OAF

Organization Level
User Level
Function Level
Responsibility Level
Site Level

can we extend and substitute a root AM in OAF using Jdeveloper ?

You can extend root AM , but it doesn't work.



in Oracle OAF, is the MDS page document definition stored in database or in the file system ?

MDS documents will load into the Database.

JDR_ATTRIBUTES
JDR_ATTRIBUTES_TRANS
JDR_COMPONENTS
JDR_PATHS

the documents will load via XML Importer , as detailed in XML Importer article.


In OAF , Once your Application has been extended by substitutions , is it possible to revert back to remove the substitutions ?

Yes , Through functional administrator you can navigate to the personalization folder and can delete the personalization.

Monday, September 9, 2019

What is the Sequence of fire in Controller methods in OAF?

Process Form Data
Process Request
Process Form Request

Why do you think Multiple AM's are required in a transaction /Transactions ? Give one example ?

There can be one AM or Multiple AM's . The AM's are created and Stored in the pool for reuse . so if we have multiple AM's then there will be a faster processing and No need to retain the AM's for long time.


can we extend every possible AM?

We should not extend Root AM  or AM Which holds some other AM and Complex VO and VL.

Tell me one scenario in which you would have to Extend AM

When we want create Custom VO and that will be used in one page . then to access that VO we have to extend the AM and will add VO to the AM. this can be achieved pragmatically.

Can you add new columns to the Advance table region/section using personlization

we can add columns using personalization. when adding the column we have to create the cellformat , the header and the column.

Friday, September 6, 2019

You are working on Two projects , Both involves OAF

one instance is on 11.5.10.2 
one instance is on 12.2.5

can you setup development environment for both these instance are in your PC/LAPTOP.

Jdeveloper 10 g is used for R12
Jdeveloper 9i is used for 11i

so we can have 2 Jdevelopers in Local machine . But when we starting the Jdeveloper we have to change the environment variable named JDEV_USER_HOME . it should point to jdev folder where all our source codes lies.

How can we disable all OAF personalizations ?

By using profile options to Yes.

The profile name is : Disable Self Service Personal

Individual pages also we can disable by clicking on "Manage Personalizations"

In Oracle forms we have WHEN-VALIDATE-RECORD ? what will be the equivalent to OAF

We can do attribute validations in EO and for that we can use method named validateEntity() with in the EO.

Please tell me the scenario in which extension to VO is not upgrade safe in OAF

If the original VO is created in Expert mode, then you will have to copy the original VO Query and then you will paste that Sql statement and query into extended VO.

Now , if in future oracle is going to change the original SQL Statement (against Original VO) , then those changes will not be reflected in extended VO.


Thursday, September 5, 2019

"Each row in the Query Result Columns must be mapped to a unique query attribute in the Mapped Entity columns"

When you are extending a VO you can quite often run in to the error "Each row in the Query Result Columns must be mapped to a unique query attribute in the Mapped Entity columns". The error is related to the view object you are trying to extend and indicates that there is something wrong with it. If you search for this error on My Oracle Support you will see that the fix is to get a patch that replaces the base VO that the problem is related to.

One potential error is that there are some CASE problems in the base VO declaration. For example, a selected column is named PartyId in the query but under Attributes the name is partyId. Though java is case-sensitive you can run into problems.

If you google this problem you will find a few different potential solutions, but of the ones I have found, the solution below is the most reliable.

  1. Create your extended view object without changing anything.
  2. Open up you newly created VO and click on the tree node "Attributes".
  3. Click the "New..." button and create your new column (a transient attribute will be created).
  4. Save and reopen the VO.
  5. Now change the Query Statement and add the new column in your select (the new column must have the same alias as the column added in step 3).
  6. Save and reopen the VO.
  7. Change the attribute you added in step 3. Make sure you check "Mapped to Column or SQL" and that the rest of the settings are correct.
  8. Done
Note: When I have added the column in the select statement I sometimes get errors in the attribute names (the error can be seen under the "Attributes" tree node).
 - two many attributes
 - the names are corrupted

To fix this error close the VO declaration and go to the file system and open up the <VO>.xml. Edit the file and correct the errors and repoen the VO in jDeveloper.

VO Extension Steps in OAF ? with example

VO Extension Steps :


  • Identify the VO we need to extend.
  • Get the VO Object from Java Top which we want to extend and keep it inside Jdeveloper My Projects folder of your Jdev Setup.
  • Then Create a new VO and select the extend option as the parent VO  which is going to extended.This will be done in Jdeveloper Wizard. Now the Parent VO SQL will be shown in Jdeveloper Wizard (Sql Editor) and as per our requirement we can modify or can add New Attributes.
  • Once the VO Creation is complete we have to right click on project and select the substitution option. their we have to choose old VO and New VO. once it is done the substitution is complete.
  • We need to compile the project.
  • After compilation ,a XML entry will be created in the JPX file. the JPX file generally is the name of the project. so now we need to import the JPX to MDS and have to move the java and VO XML to Java Top.
  • After Import/Register , we add the new filed in the OAF page through personalization and then give reference in this field for a New Customer VO Object. 
Example For VO Extension: (How to add New colum in VO and Page):


Step 1:- First Go to your OAF page in the application , in which you will do View Object Extension.
This is the Page in which we will do View Extension. Here I want to display(After Report Status column) the DFF attribute5 in this Track Submitted Expense Reports Status Window.




Step 2:- To see the Properties of this Page and to know which View Object is working behind this Page. for this we need to go to 'About this Page' in the Bottom of the Page.

Step 3:- You can see like below and Click on the Expand All option and in the Controller Section you can see the Controller Name




Check your fields and you can find your VO there


Below is the VO for your fields.


this Highlighted VO details you can find in the BC4J Components.

Step 4:-Click '+' icon for Business Components References Details.




Step 5:- This is the Location of the View Object under Java_Top under which you will do Extension.



 Step 6:-  Now you get to know that where is your Standard View Object is Placed in the Oracle application Under Java_Top.

Then you Need to go to Server Under Java_Top then Under Java_Top follow the same path 'oracle/apps/ap/oie/server/' and copy the 'TrackExpesneReportsVO' from Server to your Local Desktop.

One Important Thing.

You need to create the same path in your JDev folder under' 'jdevhome'

Under JdevHome there is MyProjects' folder under this folder you have to Create same folder structure like oracle/apps/ap/oie/server/' and then this copied file 'TrackExpesneReportsVO' in this Location.

The rule is you have to create same folder structure like the Folder Structure created for The Standard Controller in the Application server Java_Top.

Step 7:-This is the steps you have to implement before doing Start Extension in the JDeveloper. 

Step 8:- Now open the JDeveloper

Step 9:- Now we will create OA Workspace and Project to do VO Extensions.

Step 10:- Give the Name of OA Workspace. Click Ok.

Step 11:- Now Give the Name of the Project same like OA workspace.

Package Path:- Choose the same like Standard View Object but choose the application Top start with xx like this this change 'xxap'

But here i am using standard application top , it is practice instance i dont have that to Use.

Step 12:- Then Finish this Project.

Step 13:- Now you can see your OAF Project has been completed. Now we will do Controller Extension under this Project.


Step 14:- Download your VO  oracle.apps.ap.oie.server.TrackExpenseReportsVO




Go to Jdeveloper select Project and Refresh you can see your VO like Below.



Step 15:- Creation VO Extension

Now right Click on the Project as below and click New.


Step 16:- Now Create View Object as below :-




Click on OK

Click on Next


Step 17:- Create Extended VO Name and select the Package.
Now select the Standard VO which you want to Extend Click on the Browse Button under Extends as below and Select the Standard View Object 'TrackExpesneReportsVO'  which we want to Extend in this VO Extension.

Step 18:- Select the 'TrackExpesneReportsVO' Standard Page Controller.

Click on Ok.




Step 19:- This is the Extended view Object Final Screen Click Next.



Step 20:- This is The Query working for the Standard View Object. Copy the Query of the View Object in the Toad.



Step 21:- Now Add the Custom column 'Attribute5' which you want to display in the OAF Page. Always add the New Column in the Last.

after adding the column attribute5 query looks below

SELECT 
AI.DESCRIPTION PURPOSE, 
AI.INVOICE_CURRENCY_CODE CURRENCY_CODE, 
AI.INVOICE_DATE REPORT_DATE, 
AERH.REPORT_SUBMITTED_DATE REPORT_SUBMITTED_DATE, 
AI.INVOICE_NUM REPORT_NUMBER, 
TO_CHAR(decode(nvl(nvl(AI.AMT_DUE_CCARD_COMPANY, AERH.AMT_DUE_CCARD_COMPANY) + nvl(AI.AMT_DUE_EMPLOYEE, AERH.AMT_DUE_EMPLOYEE) + nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0),0),
                 0, decode(AI.CANCELLED_DATE, 
                             null, APS.GROSS_AMOUNT, 
                             AERH.TOTAL),
               nvl(AI.AMT_DUE_CCARD_COMPANY, AERH.AMT_DUE_CCARD_COMPANY) + nvl(AI.AMT_DUE_EMPLOYEE, AERH.AMT_DUE_EMPLOYEE) + nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0)) ,   
        FND_CURRENCY_CACHE.GET_FORMAT_MASK
        (AI.INVOICE_CURRENCY_CODE, 30)) ||' '|| AI.INVOICE_CURRENCY_CODE REPORT_TOTAL_CURRENCY, 
TO_CHAR(decode(nvl(nvl(AI.AMT_DUE_CCARD_COMPANY, AERH.AMT_DUE_CCARD_COMPANY) + nvl(AI.AMT_DUE_EMPLOYEE, AERH.AMT_DUE_EMPLOYEE) + nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0),0),
                 0, decode(AI.CANCELLED_DATE, 
                             null, APS.GROSS_AMOUNT, 
                             AERH.TOTAL),
               nvl(AI.AMT_DUE_CCARD_COMPANY, AERH.AMT_DUE_CCARD_COMPANY) + nvl(AI.AMT_DUE_EMPLOYEE, AERH.AMT_DUE_EMPLOYEE) + nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0)) ,   
        FND_CURRENCY_CACHE.GET_FORMAT_MASK
        (AI.INVOICE_CURRENCY_CODE, 30))
REPORT_TOTAL, 
P.PERSON_ID EMPLOYEE_ID, 
AERH.REPORT_HEADER_ID REPORT_HEADER_ID, 
P.FULL_NAME FULL_NAME , 
DECODE(AI.CANCELLED_DATE,null, 
                          nvl(aerh.expense_status_code, DECODE(APS.GROSS_AMOUNT ,0,'PAID', 
                                decode(AI.Payment_status_flag,'Y','PAID', 
                                                        'N','INVOICED', 
                                                        'P','PARPAID',NULL))), 
                                        'CANCELLED') STATUS_CODE, 
AERH.source SOURCE,
NULL CURRENT_APPROVER, 
ROUND(sysdate - AI.LAST_UPDATE_DATE) DAYS_SINCE_ACTIVITY, 
AERH.RECEIPTS_STATUS RECEIPTS_STATUS_CODE,
AERH.HOLDING_REPORT_HEADER_ID,
AI.VENDOR_ID VENDOR_ID,
AERH.AMT_DUE_CCARD_COMPANY AMT_DUE_CCARD_COMPANY,
AERH.AMT_DUE_EMPLOYEE AMT_DUE_EMPLOYEE,          
'CurrentApproverName' CURRENT_APPROVER_SWITCHER,
to_char(AERH.LAST_UPDATE_DATE, 'DD-MON-RRRR HH:MI:SS'),
AI.INVOICE_ID INVOICE_ID,
AERH.IMAGE_RECEIPTS_STATUS IMAGE_RECEIPTS_STATUS_CODE,
AERH.ATTRIBUTE5 TRACK_ATTRIBUTE5
FROM 
       AK_WEB_USER_SEC_ATTR_VALUES A, 
       PO_VENDORS PV, 
       AP_INVOICES AI, 
       AP_EXPENSE_REPORT_HEADERS AERH, 
       PER_PEOPLE_X P, 
       AP_PAYMENT_SCHEDULES APS 
WHERE  AI.INVOICE_ID= APS.INVOICE_ID 
AND    AI.INVOICE_ID = AERH.VOUCHNO 
AND AI.INVOICE_TYPE_LOOKUP_CODE||'' = 'EXPENSE REPORT' 
AND AI.SOURCE in ('XpenseXpress','SelfService', 'CREDIT CARD', 'Both Pay')
AND A.ATTRIBUTE_CODE = 'ICX_HR_PERSON_ID' 
AND PV.EMPLOYEE_ID = A.NUMBER_VALUE 
AND A.WEB_USER_ID = :1 
AND P.PERSON_ID = PV.EMPLOYEE_ID 
AND PV.VENDOR_ID = AI.VENDOR_ID 
AND DECODE (AI.PAYMENT_STATUS_FLAG, 
         'Y', sysdate - AI.LAST_UPDATE_DATE, 
        decode(APS.GROSS_AMOUNT , 0 ,sysdate - AI.LAST_UPDATE_DATE,0) 
          )  <= 30 
AND (AERH.SOURCE <> 'Both Pay' OR AERH.REPORT_HEADER_ID IS NULL)        
UNION 
SELECT 
AI.DESCRIPTION PURPOSE, 
AI.INVOICE_CURRENCY_CODE CURRENCY_CODE, 
AI.INVOICE_DATE REPORT_DATE, 
AERH.REPORT_SUBMITTED_DATE REPORT_SUBMITTED_DATE, 
AI.INVOICE_NUM REPORT_NUMBER, 
TO_CHAR(decode(nvl(AI.AMT_DUE_CCARD_COMPANY, AERH.AMT_DUE_CCARD_COMPANY) + nvl(AI.AMT_DUE_EMPLOYEE, AERH.AMT_DUE_EMPLOYEE) + nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0),
                 0, decode(AI.CANCELLED_DATE, 
                             null, APS.GROSS_AMOUNT, 
                             AERH.TOTAL),
               nvl(AI.AMT_DUE_CCARD_COMPANY, AERH.AMT_DUE_CCARD_COMPANY) + nvl(AI.AMT_DUE_EMPLOYEE, AERH.AMT_DUE_EMPLOYEE) + nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0)) ,   
        FND_CURRENCY_CACHE.GET_FORMAT_MASK
        (AI.INVOICE_CURRENCY_CODE, 30)) ||' '|| AI.INVOICE_CURRENCY_CODE REPORT_TOTAL_CURRENCY, 
TO_CHAR(decode(nvl(AI.AMT_DUE_CCARD_COMPANY, AERH.AMT_DUE_CCARD_COMPANY) + nvl(AI.AMT_DUE_EMPLOYEE, AERH.AMT_DUE_EMPLOYEE) + nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0),
                 0, decode(AI.CANCELLED_DATE, 
                             null, APS.GROSS_AMOUNT, 
                             AERH.TOTAL),
               nvl(AI.AMT_DUE_CCARD_COMPANY, AERH.AMT_DUE_CCARD_COMPANY) + nvl(AI.AMT_DUE_EMPLOYEE, AERH.AMT_DUE_EMPLOYEE) + nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0)),   
        FND_CURRENCY_CACHE.GET_FORMAT_MASK
        (AI.INVOICE_CURRENCY_CODE, 30))
REPORT_TOTAL, 
P.PERSON_ID EMPLOYEE_ID, 
AERH.REPORT_HEADER_ID REPORT_HEADER_ID, 
P.FULL_NAME FULL_NAME , 
DECODE(AI.CANCELLED_DATE,null, 
                          nvl(aerh.expense_status_code, DECODE(APS.GROSS_AMOUNT ,0,'PAID', 
                                decode(AI.Payment_status_flag,'Y','PAID', 
                                                        'N','INVOICED', 
                                                        'P','PARPAID',NULL))), 
                                        'CANCELLED') STATUS_CODE, 
AERH.source SOURCE,
NULL CURRENT_APPROVER, 
ROUND(sysdate - AI.LAST_UPDATE_DATE) DAYS_SINCE_ACTIVITY, 
AERH.RECEIPTS_STATUS RECEIPTS_STATUS_CODE, 
AERH.HOLDING_REPORT_HEADER_ID,
AI.VENDOR_ID VENDOR_ID,
AERH.AMT_DUE_CCARD_COMPANY AMT_DUE_CCARD_COMPANY,
AERH.AMT_DUE_EMPLOYEE AMT_DUE_EMPLOYEE,          
'CurrentApproverName' CURRENT_APPROVER_SWITCHER,
to_char(AERH.LAST_UPDATE_DATE, 'DD-MON-RRRR HH:MI:SS'),
AI.INVOICE_ID INVOICE_ID,
AERH.IMAGE_RECEIPTS_STATUS IMAGE_RECEIPTS_STATUS_CODE,
AERH.ATTRIBUTE5 TRACK_ATTRIBUTE5
FROM 
       AK_WEB_USER_SEC_ATTR_VALUES A, 
       PO_VENDORS PV, 
       AP_INVOICES AI, 
       AP_EXPENSE_REPORT_HEADERS AERH, 
       PER_PEOPLE_X P, 
       AP_PAYMENT_SCHEDULES APS 
WHERE  AI.INVOICE_ID= APS.INVOICE_ID 
AND    AI.INVOICE_ID = AERH.VOUCHNO 
AND AI.INVOICE_TYPE_LOOKUP_CODE||'' in ('STANDARD','MIXED','PAYMENT REQUEST') 
AND AI.SOURCE IN ('SelfService','Both Pay', 'CREDIT CARD')
AND A.ATTRIBUTE_CODE = 'ICX_HR_PERSON_ID' 
AND AI.PAID_ON_BEHALF_EMPLOYEE_ID = A.NUMBER_VALUE 
AND A.WEB_USER_ID = :2 
AND P.PERSON_ID = AI.PAID_ON_BEHALF_EMPLOYEE_ID 
AND PV.VENDOR_ID = AI.VENDOR_ID 
AND DECODE (AI.PAYMENT_STATUS_FLAG, 
         'Y', sysdate - AI.LAST_UPDATE_DATE, 
        decode(APS.GROSS_AMOUNT , 0 ,sysdate - AI.LAST_UPDATE_DATE,0) 
        ) <= 30 
AND (AERH.SOURCE <> 'Both Pay' OR AERH.REPORT_HEADER_ID IS NULL)             
UNION ALL 
SELECT 
AERH.DESCRIPTION PURPOSE, 
AERH.DEFAULT_CURRENCY_CODE CURRENCY_CODE, 
AERH.WEEK_END_DATE REPORT_DATE, 
AERH.REPORT_SUBMITTED_DATE REPORT_SUBMITTED_DATE, 
AERH.INVOICE_NUM REPORT_NUMBER, 
TO_CHAR(nvl(AERH.AMT_DUE_CCARD_COMPANY+AERH.AMT_DUE_EMPLOYEE+nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0),AERH.TOTAL),FND_CURRENCY_CACHE.GET_FORMAT_MASK 
  (AERH.DEFAULT_CURRENCY_CODE,30)) ||' '|| AERH.DEFAULT_CURRENCY_CODE REPORT_TOTAL_CURRENCY, 
TO_CHAR(nvl(AERH.AMT_DUE_CCARD_COMPANY+AERH.AMT_DUE_EMPLOYEE+nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0),AERH.TOTAL),FND_CURRENCY_CACHE.GET_FORMAT_MASK 
  (AERH.DEFAULT_CURRENCY_CODE,30)) REPORT_TOTAL, 
PER_EMPLOYEE.PERSON_ID EMPLOYEE_ID, 
AERH.REPORT_HEADER_ID REPORT_HEADER_ID, 
PER_EMPLOYEE.FULL_NAME FULL_NAME, 
NVL(AERH.expense_status_code, 
  AP_WEB_OA_ACTIVE_PKG.GetReportStatusCode(AERH.Source, AERH.Workflow_approved_flag, 
  AERH.report_header_id, 'Y', 'N')) STATUS_CODE, 
AERH.source SOURCE,
/*NVL (PER_APPROVER.full_name, AP_WEB_OA_ACTIVE_PKG.GetCurrentApprover(AERH.Source, 
        AERH.Workflow_approved_flag, AERH.report_header_id, AERH.expense_status_code)) CURRENT_APPROVER, */
DECODE (NVL (AERH.approval_type, 'PER'), 'PER', NVL (PER_APPROVER.full_name, AP_WEB_OA_ACTIVE_PKG.GetCurrentApprover(AERH.Source, 
         AERH.Workflow_approved_flag, AERH.report_header_id, AERH.expense_status_code)), AP_WEB_OA_ACTIVE_PKG.GetCurrentApprover(AERH.Source, 
         AERH.Workflow_approved_flag, AERH.report_header_id, AERH.expense_status_code)) CURRENT_APPROVER, 
ROUND(NVL(sysdate - AERH.EXPENSE_LAST_STATUS_DATE, 
          sysdate - AERH.LAST_UPDATE_DATE)) DAYS_SINCE_ACTIVITY, 
AERH.RECEIPTS_STATUS RECEIPTS_STATUS_CODE,
AERH.HOLDING_REPORT_HEADER_ID,
0 VENDOR_ID,
AERH.AMT_DUE_CCARD_COMPANY AMT_DUE_CCARD_COMPANY,
AERH.AMT_DUE_EMPLOYEE AMT_DUE_EMPLOYEE,   
DECODE(AERH.expense_current_approver_id,
-99999, 'AMEMultipleApprovers',
decode(PER_APPROVER.full_name,
null,'CurrentApproverName','AMESingleApprover')) CURRENT_APPROVER_SWITCHER,
to_char(AERH.LAST_UPDATE_DATE, 'DD-MON-RRRR HH:MI:SS'),
-1 INVOICE_ID,
AERH.IMAGE_RECEIPTS_STATUS IMAGE_RECEIPTS_STATUS_CODE,
AERH.ATTRIBUTE5 TRACK_ATTRIBUTE5
FROM 
       AK_WEB_USER_SEC_ATTR_VALUES A, 
       AP_EXPENSE_REPORT_HEADERS AERH, 
       PER_PEOPLE_X PER_EMPLOYEE, 
       PER_PEOPLE_X PER_APPROVER 
WHERE  AERH.VOUCHNO +0 =0 
AND A.ATTRIBUTE_CODE = 'ICX_HR_PERSON_ID' 
AND AERH.EMPLOYEE_ID = A.NUMBER_VALUE 
AND A.WEB_USER_ID = :3 
AND PER_EMPLOYEE.PERSON_ID = AERH.EMPLOYEE_ID 
AND (AERH.Source <> 'NonValidatedWebExpense' 
     OR AERH.Workflow_approved_flag IS NULL) 
AND AERH.expense_current_approver_id = PER_APPROVER.person_id (+) 
AND DECODE(AERH.expense_status_code,'PAID',ROUND(NVL(sysdate - AERH.EXPENSE_LAST_STATUS_DATE,sysdate - AERH.LAST_UPDATE_DATE)),30) <= 30 
AND AERH.SOURCE <> 'Both Pay' 
UNION 
SELECT /*+ leading(a aerh) push_pred(per_employee) push_pred(per_approver) */
AERH.DESCRIPTION PURPOSE, 
AERH.DEFAULT_CURRENCY_CODE CURRENCY_CODE, 
AERH.WEEK_END_DATE REPORT_DATE, 
AERH.REPORT_SUBMITTED_DATE REPORT_SUBMITTED_DATE, 
AERH.INVOICE_NUM REPORT_NUMBER, 
TO_CHAR(nvl(AERH.AMT_DUE_CCARD_COMPANY+AERH.AMT_DUE_EMPLOYEE+nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0),AERH.TOTAL),FND_CURRENCY_CACHE.GET_FORMAT_MASK 
  (AERH.DEFAULT_CURRENCY_CODE,30)) ||' '|| AERH.DEFAULT_CURRENCY_CODE REPORT_TOTAL_CURRENCY, 
TO_CHAR(nvl(AERH.AMT_DUE_CCARD_COMPANY+AERH.AMT_DUE_EMPLOYEE+nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0),AERH.TOTAL),FND_CURRENCY_CACHE.GET_FORMAT_MASK 
  (AERH.DEFAULT_CURRENCY_CODE,30)) REPORT_TOTAL, 
PER_EMPLOYEE.PERSON_ID EMPLOYEE_ID, 
AERH.REPORT_HEADER_ID REPORT_HEADER_ID, 
PER_EMPLOYEE.FULL_NAME FULL_NAME, 
NVL(AERH.expense_status_code, 
  AP_WEB_OA_ACTIVE_PKG.GetReportStatusCode(AERH.Source, AERH.Workflow_approved_flag, 
  AERH.report_header_id,'Y','N')) STATUS_CODE, 
AERH.source SOURCE,
/*NVL (PER_APPROVER.full_name, AP_WEB_OA_ACTIVE_PKG.GetCurrentApprover(AERH.Source, 
        AERH.Workflow_approved_flag, AERH.report_header_id, AERH.expense_status_code)) CURRENT_APPROVER, */
DECODE (NVL (AERH.approval_type, 'PER'), 'PER', NVL (PER_APPROVER.full_name, AP_WEB_OA_ACTIVE_PKG.GetCurrentApprover(AERH.Source, 
         AERH.Workflow_approved_flag, AERH.report_header_id, AERH.expense_status_code)), AP_WEB_OA_ACTIVE_PKG.GetCurrentApprover(AERH.Source, 
         AERH.Workflow_approved_flag, AERH.report_header_id, AERH.expense_status_code)) CURRENT_APPROVER, 
ROUND(NVL(sysdate - AERH.EXPENSE_LAST_STATUS_DATE, 
          sysdate - AERH.LAST_UPDATE_DATE)) DAYS_SINCE_ACTIVITY, 
AERH.RECEIPTS_STATUS RECEIPTS_STATUS_CODE,
AERH.HOLDING_REPORT_HEADER_ID,
0 VENDOR_ID,
AERH.AMT_DUE_CCARD_COMPANY AMT_DUE_CCARD_COMPANY,
AERH.AMT_DUE_EMPLOYEE AMT_DUE_EMPLOYEE,   
DECODE(AERH.expense_current_approver_id,
-99999, 'AMEMultipleApprovers',
decode(PER_APPROVER.full_name,
null,'CurrentApproverName','AMESingleApprover')) CURRENT_APPROVER_SWITCHER,
to_char(AERH.LAST_UPDATE_DATE, 'DD-MON-RRRR HH:MI:SS'),
-1 INVOICE_ID,
AERH.IMAGE_RECEIPTS_STATUS IMAGE_RECEIPTS_STATUS_CODE,
AERH.ATTRIBUTE5 TRACK_ATTRIBUTE5
FROM 
       AK_WEB_USER_SEC_ATTR_VALUES A, 
       AP_EXPENSE_REPORT_HEADERS AERH, 
       PER_PEOPLE_X PER_EMPLOYEE, 
       PER_PEOPLE_X PER_APPROVER 
WHERE  AERH.VOUCHNO +0=0 
AND A.ATTRIBUTE_CODE = 'ICX_HR_PERSON_ID' 
AND AERH.PAID_ON_BEHALF_EMPLOYEE_ID = A.NUMBER_VALUE 
AND A.WEB_USER_ID = :4 
AND PER_EMPLOYEE.PERSON_ID = PAID_ON_BEHALF_EMPLOYEE_ID 
AND AERH.EMPLOYEE_ID IS NULL 
AND (AERH.Source <> 'NonValidatedWebExpense' 
     OR AERH.Workflow_approved_flag IS NULL) 
AND AERH.expense_current_approver_id = PER_APPROVER.person_id (+) 
AND DECODE(AERH.expense_status_code,'PAID',ROUND(NVL(sysdate - AERH.EXPENSE_LAST_STATUS_DATE,sysdate - AERH.LAST_UPDATE_DATE)),30) <= 30 
AND AERH.SOURCE <> 'Both Pay' 
UNION ALL 
/* This select is for invoice imported reports by contingent workers */ 
SELECT 
AI.DESCRIPTION PURPOSE, 
AI.INVOICE_CURRENCY_CODE CURRENCY_CODE, 
AI.INVOICE_DATE REPORT_DATE, 
AERH.REPORT_SUBMITTED_DATE REPORT_SUBMITTED_DATE, 
AI.INVOICE_NUM REPORT_NUMBER, 
TO_CHAR(decode(nvl(nvl(AI.AMT_DUE_CCARD_COMPANY, AERH.AMT_DUE_CCARD_COMPANY) + nvl(AI.AMT_DUE_EMPLOYEE, AERH.AMT_DUE_EMPLOYEE) + nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0),0),
                 0, decode(AI.CANCELLED_DATE, 
                             null, APS.GROSS_AMOUNT, 
                             AERH.TOTAL),
               nvl(AI.AMT_DUE_CCARD_COMPANY, AERH.AMT_DUE_CCARD_COMPANY) + nvl(AI.AMT_DUE_EMPLOYEE, AERH.AMT_DUE_EMPLOYEE) + nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0)) ,   
        FND_CURRENCY_CACHE.GET_FORMAT_MASK
        (AI.INVOICE_CURRENCY_CODE, 30)) ||' '|| AI.INVOICE_CURRENCY_CODE REPORT_TOTAL_CURRENCY, 
TO_CHAR(decode(nvl(nvl(AI.AMT_DUE_CCARD_COMPANY, AERH.AMT_DUE_CCARD_COMPANY) + nvl(AI.AMT_DUE_EMPLOYEE, AERH.AMT_DUE_EMPLOYEE) + nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0),0),
                 0, decode(AI.CANCELLED_DATE, 
                             null, APS.GROSS_AMOUNT, 
                             AERH.TOTAL),
               nvl(AI.AMT_DUE_CCARD_COMPANY, AERH.AMT_DUE_CCARD_COMPANY) + nvl(AI.AMT_DUE_EMPLOYEE, AERH.AMT_DUE_EMPLOYEE) + nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0)) ,   
        FND_CURRENCY_CACHE.GET_FORMAT_MASK
        (AI.INVOICE_CURRENCY_CODE, 30))
REPORT_TOTAL, 
P.PERSON_ID EMPLOYEE_ID, 
AERH.REPORT_HEADER_ID REPORT_HEADER_ID, 
P.FULL_NAME FULL_NAME , 
DECODE(AI.CANCELLED_DATE,null, 
                          nvl(aerh.expense_status_code, DECODE(APS.GROSS_AMOUNT ,0,'PAID', 
                                decode(AI.Payment_status_flag,'Y','PAID', 
                                                        'N','INVOICED', 
                                                        'P','PARPAID',NULL))), 
                                        'CANCELLED') STATUS_CODE, 
AERH.source SOURCE,
NULL CURRENT_APPROVER, 
ROUND(sysdate - AI.LAST_UPDATE_DATE) DAYS_SINCE_ACTIVITY, 
AERH.RECEIPTS_STATUS RECEIPTS_STATUS_CODE,
AERH.HOLDING_REPORT_HEADER_ID,
AI.VENDOR_ID VENDOR_ID,
AERH.AMT_DUE_CCARD_COMPANY AMT_DUE_CCARD_COMPANY,
AERH.AMT_DUE_EMPLOYEE AMT_DUE_EMPLOYEE,           
'CurrentApproverName' CURRENT_APPROVER_SWITCHER,
to_char(AERH.LAST_UPDATE_DATE, 'DD-MON-RRRR HH:MI:SS'),
AI.INVOICE_ID INVOICE_ID,
AERH.IMAGE_RECEIPTS_STATUS IMAGE_RECEIPTS_STATUS_CODE,
AERH.ATTRIBUTE5 TRACK_ATTRIBUTE5
FROM 
       AK_WEB_USER_SEC_ATTR_VALUES A, 
       AP_INVOICES AI, 
       AP_EXPENSE_REPORT_HEADERS AERH, 
       PER_PEOPLE_X P, 
       AP_PAYMENT_SCHEDULES APS 
WHERE  AI.INVOICE_ID= APS.INVOICE_ID 
AND    AI.INVOICE_ID = AERH.VOUCHNO 
AND AI.INVOICE_TYPE_LOOKUP_CODE||'' = 'EXPENSE REPORT' 
AND AI.SOURCE in ('XpenseXpress','SelfService', 'CREDIT CARD', 'Both Pay')
AND A.ATTRIBUTE_CODE = 'ICX_HR_PERSON_ID' 
AND AI.PAID_ON_BEHALF_EMPLOYEE_ID = A.NUMBER_VALUE 
AND A.WEB_USER_ID = :5 
AND P.PERSON_ID = AI.PAID_ON_BEHALF_EMPLOYEE_ID 
AND AP_WEB_DB_HR_INT_PKG.IsPersonCwk(AI.PAID_ON_BEHALF_EMPLOYEE_ID)='Y' 
AND DECODE (AI.PAYMENT_STATUS_FLAG, 
         'Y', sysdate - AI.LAST_UPDATE_DATE, 
        decode(APS.GROSS_AMOUNT , 0 ,sysdate - AI.LAST_UPDATE_DATE,0) 
          )  <= 30
AND (AERH.SOURCE <> 'Both Pay' OR AERH.REPORT_HEADER_ID IS NULL)


Step 22:-Paste the Changed Sql query in the VO Object and Click Next.


Step 23:-Select the required Check Box and click Finish.


Step 24:- This is the Extended VO created As Below.



Step 25:- Now We will do Substitution of this Custom view Object.
Right click on the Project and Click Project Properties.

Go to the Substitutions:-



select standard VO and extended VO and Click on Add Button


Click on Ok Button.


Step 26:- Move the VO file in Java_Top and then Import this View Object with the Help of this Script.

java oracle.jrad.tools.xml.importer.XMLImporter $JAVA_TOP/oracle/apps/ap/oie/server/ TrackExpenseReportsVOEx.xml -rootdir $JAVA_TOP -username apps -password apps -dbconnection ""(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ebs.apps.com)(PORT=1521))(CONNECT_DATA=(SID=vis)))" 

Step 27:- To check the extension has done or not go to the sql developer execute the  
              following command

begin                                        
 jdr_utils.listCustomizations('/oracle/apps/ap/oie/server/TrackExpenseReportsVOEx');       end;

            It will give the path.

Step 28:- Bounce the Apache Web Server.

Step 29:- Go to the front end go to the page which u want to extend.

Click on about this page. Expand all in business components check whether the extended VO  is reflecting or not. 

oracle.apps.ap.oie.server.TrackExpenseReportsVOEx


Step 29:- Now again go Back to the Web page in application where we want to do this View Object Extension. Now Click on the 'Personalize Link' Highlighted below.


Step 30:- Now click on Create Item Icon as below to add new field in the View Object.


Step 31:- Create Item with Style 'Message Styled Text'.


Step 32:- Give the Item Properties as below.

Step 33:- Give the name of the Extended View Object  in View Instance and the Name of your New View object Column in the View Attribute as below.



Step 34:- Now we can see below Tracking No. field displaying in the OAF Expense Home Page.


AME (Approval Management Engine)

AME (Approval Management Engine) : AME Stands for Oracle Approval Management Engine. AME is a self service web application that enables...